commit 3f306ccb81eb56a82c9201e1cd4a95aee920929f Author: Jacek Pyziak Date: Sun Nov 10 11:11:35 2024 +0100 first commit diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..b76a96e --- /dev/null +++ b/.htaccess @@ -0,0 +1,31 @@ +RewriteEngine On +RewriteBase / +Options +FollowSymlinks +Options -Indexes + +RewriteCond %{HTTP_USER_AGENT} Bytedance [NC] +RewriteRule .* - [F,L] + +# Blokowanie Bytespider +RewriteCond %{HTTP_USER_AGENT} Bytespider [NC] +RewriteRule .* - [F,L] + +RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] +RewriteRule ^(.*)$ https://%1/$1 [R=301,L] +RewriteCond %{SERVER_PORT} !=443 +RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=permanent] + +RewriteCond %{REQUEST_URI} !^(.*)/libraries/(.*) [NC] +RewriteCond %{REQUEST_URI} !^(.*)/temp/(.*) [NC] +RewriteCond %{REQUEST_URI} !^(.*)/layout/(.*) [NC] +RewriteCond %{REQUEST_URI} !^(.*)/resources/(.*) [NC] +RewriteCond %{REQUEST_URI} !^(.*)/images/(.*) [NC] +RewriteCond %{REQUEST_URI} !^(.*)/posters_images/(.*) [NC] +RewriteCond %{REQUEST_URI} !^(.*)/upload/(.*) [NC] +RewriteRule ^([^/]*)/([^/]*)/(.*)$ index.php?module=$1&action=$2&$3 [L] + +RewriteRule ^logowanie$ index.php?module=users&action=login_form [L] +RewriteRule ^finances/tags.json$ index.php?module=finances&action=tags_json [L] + +SetHandler application/x-lsphp74 /opt/alt/php74 usr/bin/lsphp + diff --git a/.vscode/ftp-kr.json b/.vscode/ftp-kr.json new file mode 100644 index 0000000..884dbca --- /dev/null +++ b/.vscode/ftp-kr.json @@ -0,0 +1,17 @@ +{ + "host": "193.177.164.18", + "username": "www@crmpro.projectpro.pl", + "password": "fgQxh2Yvbj83JguqUgUr", + "remotePath": "/public_html", + "protocol": "ftp", + "port": 0, + "fileNameEncoding": "utf8", + "autoUpload": true, + "autoDelete": false, + "autoDownload": false, + "ignoreRemoteModification": true, + "ignore": [ + ".git", + "/.vscode" + ] +} \ No newline at end of file diff --git a/.vscode/ftp-kr.sync.cache.json b/.vscode/ftp-kr.sync.cache.json new file mode 100644 index 0000000..d6db10b --- /dev/null +++ b/.vscode/ftp-kr.sync.cache.json @@ -0,0 +1,61 @@ +{ + "ftp://193.177.164.18@www@crmpro.projectpro.pl": { + "public_html": { + "ajax.php": { + "type": "-", + "size": 1208, + "lmtime": 0, + "modified": false + }, + "api.php": { + "type": "-", + "size": 2446, + "lmtime": 0, + "modified": false + }, + "autoload": {}, + "ceidg.php": { + "type": "-", + "size": 3862, + "lmtime": 0, + "modified": false + }, + "config.php": { + "type": "-", + "size": 353, + "lmtime": 1731232586056, + "modified": false + }, + "cron.php": { + "type": "-", + "size": 1777, + "lmtime": 0, + "modified": false + }, + ".htaccess": { + "type": "-", + "size": 1151, + "lmtime": 0, + "modified": false + }, + "index.php": { + "type": "-", + "size": 2345, + "lmtime": 0, + "modified": false + }, + "layout": {}, + "libraries": {}, + "robots.txt": { + "type": "-", + "size": 25, + "lmtime": 0, + "modified": false + }, + "temp": {}, + "templates": {}, + "upload": {} + } + }, + "$version": 1 +} \ No newline at end of file diff --git a/.vscode/sftp.json b/.vscode/sftp.json new file mode 100644 index 0000000..55497df --- /dev/null +++ b/.vscode/sftp.json @@ -0,0 +1,12 @@ +{ + "name": "193.177.164.18", + "host": "193.177.164.18", + "protocol": "ftp", + "port": 21, + "username": "www@crmpro.projectpro.pl", + "password": "fgQxh2Yvbj83JguqUgUr", + "remotePath": "/public_html", + "uploadOnSave": false, + "useTempFile": false, + "openSsh": false +} diff --git a/ajax.php b/ajax.php new file mode 100644 index 0000000..12087bf --- /dev/null +++ b/ajax.php @@ -0,0 +1,45 @@ + 'mysql', + 'database_name' => $database['name'], + 'server' => $database['host'], + 'username' => $database['user'], + 'password' => $database['password'], + 'charset' => 'utf8' + ] ); + +$user = \S::get_session( 'user' ); +?> \ No newline at end of file diff --git a/api.php b/api.php new file mode 100644 index 0000000..0828fa4 --- /dev/null +++ b/api.php @@ -0,0 +1,86 @@ + 'mysql', + 'database_name' => $database['name'], + 'server' => $database['host'], + 'username' => $database['user'], + 'password' => $database['password'], + 'charset' => 'utf8' + ] ); + +\R::setup( 'mysql:host=' . $database['host'] . ';dbname=' . $database['name'], $database['user'], $database['password'] ); +\R::ext( 'xdispense', function( $type ) +{ + return R::getRedBean() -> dispense( $type ); +} ); + +// dodawanie domeny przez API +if ( \S::get( 'action' ) == 'domain_tester_add' ) +{ + if ( !$mdb -> count( 'domain_tester', [ 'AND' => [ 'url' => \S::get( 'domain' ), 'hidden' => 0 ] ] ) ) + { + $mdb -> insert( 'domain_tester', [ + 'url' => \S::get( 'domain' ) + ] ); + } + + echo json_encode( ['result' => 'ok'] ); + exit; +} + +// Open Page Rank - pobieranie domeny +if ( \S::get( 'action' ) == 'domain_opr_check' ) +{ + $mdb -> delete( 'domain_tester', [ 'url' => '' ] ); + + $domain = $mdb -> get( 'domain_tester', '*', [ 'opr' => null, 'ORDER' => [ 'date_add' => 'DESC' ] ] ); + if ( $domain ) + { + $result['id'] = $domain['id']; + $result['url'] = $domain['url']; + $result['domains_left'] = $mdb -> count( 'domain_tester', [ 'opr' => null ] ); + $result['result'] = 'ok'; + + echo json_encode( $result ); + } + else + echo json_encode( ['result' => 'bad'] ); + exit; +} + +// Open Page Rank - zapis +if ( \S::get( 'action' ) == 'domain_opr_save' ) +{ + $mdb -> update( 'domain_tester', [ + 'opr' => str_replace( ',', '.', \S::get( 'page_rank' ) ), + 'opr_date' => date( 'Y-m-d H:i:s' ) + ], [ + 'id' => \S::get( 'domain_id' ) + ] ); + + echo json_encode( ['result' => 'ok'] ); + exit; +} \ No newline at end of file diff --git a/autoload/class.Cache.php b/autoload/class.Cache.php new file mode 100644 index 0000000..d268fcb --- /dev/null +++ b/autoload/class.Cache.php @@ -0,0 +1,46 @@ + $data[0] ) + { + if ( file_exists( $filename ) ) + unlink( $filename ); + return false; + } + + return $data[1]; + } +} +?> \ No newline at end of file diff --git a/autoload/class.Chunk.php b/autoload/class.Chunk.php new file mode 100644 index 0000000..b568e0c --- /dev/null +++ b/autoload/class.Chunk.php @@ -0,0 +1,260 @@ + './', // string The path to check for $file in + 'element' => '', // string The XML element to return + 'chunkSize' => 512 // integer The amount of bytes to retrieve in each chunk + ); + + /** + * file + * + * @var string The filename being read + * @access public + */ + public $file = ''; + /** + * pointer + * + * @var integer The current position the file is being read from + * @access public + */ + public $pointer = 0; + + /** + * handle + * + * @var resource The fopen() resource + * @access private + */ + private $handle = null; + /** + * reading + * + * @var boolean Whether the script is currently reading the file + * @access private + */ + private $reading = false; + /** + * readBuffer + * + * @var string Used to make sure start tags aren't missed + * @access private + */ + private $readBuffer = ''; + + /** + * __construct + * + * Builds the Chunk object + * + * @param string $file The filename to work with + * @param array $options The options with which to parse the file + * @author Dom Hastings + * @access public + */ + public function __construct($file, $options = array()) { + // merge the options together + $this->options = array_merge($this->options, (is_array($options) ? $options : array())); + + // check that the path ends with a / + if (substr($this->options['path'], -1) != '/') { + $this->options['path'] .= '/'; + } + + // normalize the filename + $file = basename($file); + + // make sure chunkSize is an int + $this->options['chunkSize'] = intval($this->options['chunkSize']); + + // check it's valid + if ($this->options['chunkSize'] < 64) { + $this->options['chunkSize'] = 512; + } + + // set the filename + $this->file = realpath($this->options['path'].$file); + + // check the file exists + if (!file_exists($this->file)) { + throw new Exception('Cannot load file: '.$this->file); + } + + // open the file + $this->handle = fopen($this->file, 'r'); + + // check the file opened successfully + if (!$this->handle) { + throw new Exception('Error opening file for reading'); + } + } + + /** + * __destruct + * + * Cleans up + * + * @return void + * @author Dom Hastings + * @access public + */ + public function __destruct() { + // close the file resource + fclose($this->handle); + } + + /** + * read + * + * Reads the first available occurence of the XML element $this->options['element'] + * + * @return string The XML string from $this->file + * @author Dom Hastings + * @access public + */ + public function read() { + // check we have an element specified + if (!empty($this->options['element'])) { + // trim it + $element = trim($this->options['element']); + + } else { + $element = ''; + } + + // initialize the buffer + $buffer = false; + + // if the element is empty + if (empty($element)) { + // let the script know we're reading + $this->reading = true; + + // read in the whole doc, cos we don't know what's wanted + while ($this->reading) { + $buffer .= fread($this->handle, $this->options['chunkSize']); + + $this->reading = (!feof($this->handle)); + } + + // return it all + return $buffer; + + // we must be looking for a specific element + } else { + // set up the strings to find + $open = '<'.$element.'>'; + $close = ''; + + // let the script know we're reading + $this->reading = true; + + // reset the global buffer + $this->readBuffer = ''; + + // this is used to ensure all data is read, and to make sure we don't send the start data again by mistake + $store = false; + + // seek to the position we need in the file + fseek($this->handle, $this->pointer); + + // start reading + while ($this->reading && !feof($this->handle)) { + // store the chunk in a temporary variable + $tmp = fread($this->handle, $this->options['chunkSize']); + + // update the global buffer + $this->readBuffer .= $tmp; + + // check for the open string + $checkOpen = strpos($tmp, $open); + + // if it wasn't in the new buffer + if (!$checkOpen && !($store)) { + // check the full buffer (in case it was only half in this buffer) + $checkOpen = strpos($this->readBuffer, $open); + + // if it was in there + if ($checkOpen) { + // set it to the remainder + $checkOpen = $checkOpen % $this->options['chunkSize']; + } + } + + // check for the close string + $checkClose = strpos($tmp, $close); + + // if it wasn't in the new buffer + if (!$checkClose && ($store)) { + // check the full buffer (in case it was only half in this buffer) + $checkClose = strpos($this->readBuffer, $close); + + // if it was in there + if ($checkClose) { + // set it to the remainder plus the length of the close string itself + $checkClose = ($checkClose + strlen($close)) % $this->options['chunkSize']; + } + + // if it was + } elseif ($checkClose) { + // add the length of the close string itself + $checkClose += strlen($close); + } + + // if we've found the opening string and we're not already reading another element + if ($checkOpen !== false && !($store)) { + // if we're found the end element too + if ($checkClose !== false) { + // append the string only between the start and end element + $buffer .= substr($tmp, $checkOpen, ($checkClose - $checkOpen)); + + // update the pointer + $this->pointer += $checkClose; + + // let the script know we're done + $this->reading = false; + + } else { + // append the data we know to be part of this element + $buffer .= substr($tmp, $checkOpen); + + // update the pointer + $this->pointer += $this->options['chunkSize']; + + // let the script know we're gonna be storing all the data until we find the close element + $store = true; + } + + // if we've found the closing element + } elseif ($checkClose !== false) { + // update the buffer with the data upto and including the close tag + $buffer .= substr($tmp, 0, $checkClose); + + // update the pointer + $this->pointer += $checkClose; + + // let the script know we're done + $this->reading = false; + + // if we've found the closing element, but half in the previous chunk + } elseif ($store) { + // update the buffer + $buffer .= $tmp; + + // and the pointer + $this->pointer += $this->options['chunkSize']; + } + } + } + + // return the element (or the whole file if we're not looking for elements) + return $buffer; + } +} \ No newline at end of file diff --git a/autoload/class.Cron.php b/autoload/class.Cron.php new file mode 100644 index 0000000..6685ccc --- /dev/null +++ b/autoload/class.Cron.php @@ -0,0 +1,198 @@ + query( 'SELECT ' + . 't.*, ( SELECT COUNT(0) FROM tasks WHERE parent_id = t.id ) AS quantity ' + . 'FROM ' + . 'tasks AS t ' + . 'WHERE ' + . 'recursively = 1 AND deleted = 0 AND ( status = 1 OR status = 2 ) AND date_end IS NOT NULL AND date_end < \'' . date( 'Y-m-d', strtotime( '+366 days', time() ) ) . '\' ' + . 'HAVING quantity = 0 ORDER BY date_end ASC' ) -> fetchAll( \PDO::FETCH_ASSOC ); + if ( is_array( $results ) and count( $results ) ) + { + foreach ( $results as $row ) + { + if ( $row['date_end_month_day'] == null ) + { + $mdb -> update( 'tasks', ['date_end_month_day' => date( 'j', strtotime( $row['date_end'] ) )], ['id' => $row['id']] ); + $row['date_end_month_day'] = date( 'j', strtotime( $row['date_end'] ) ); + } + + if ( $row['date_start_month_day'] == null ) + { + $mdb -> update( 'tasks', ['date_start_month_day' => date( 'j', strtotime( $row['date_start'] ) )], ['id' => $row['id']] ); + $row['date_start_month_day'] = date( 'j', strtotime( $row['date_start'] ) ); + } + + /* powtarzanie co x dni */ + if ( $row['period'] == 1 ) + { + $new_date_end = date( 'Y-m-d', strtotime( '+' . $row['frequency'] . ' days', strtotime( $row['date_end'] ) ) ); + + if ( $row['date_start'] ) + $new_date_start = date( 'Y-m-d', strtotime( '+' . $row['frequency'] . ' days', strtotime( $row['date_start'] ) ) ); + } + + /* powtarzanie do x miesięcy */ + if ( $row['period'] == 2 ) + { + $new_date_end = date( 'Y-m', strtotime( '+' . $row['frequency'] . ' months', strtotime( date( 'Y-m', strtotime( $row['date_end'] ) ) ) ) ); + $max_days = date( 't', strtotime( $new_date_end ) ); + + if ( $max_days <= $row['date_end_month_day'] ) + $new_date_end = date( 'Y-m-d', strtotime( $new_date_end . '-' . $max_days ) ); + else + $new_date_end = date( 'Y-m-d', strtotime( $new_date_end . '-' . $row['date_end_month_day'] ) ); + + if ( $row['date_start'] ) + { + $new_date_start = date( 'Y-m', strtotime( '+' . $row['frequency'] . ' months', strtotime( date( 'Y-m', strtotime( $row['date_start'] ) ) ) ) ); + $max_days = date( 't', strtotime( $new_date_start ) ); + + if ( $max_days <= $row['date_start_month_day'] ) + $new_date_start = date( 'Y-m-d', strtotime( $new_date_start . '-' . $max_days ) ); + else + $new_date_start = date( 'Y-m-d', strtotime( $new_date_start . '-' . $row['date_start_month_day'] ) ); + } + } + + /* powtarzanie co x lat */ + if ( $row['period'] == 3 ) + { + $new_date_end = date( 'Y-m', strtotime( '+' . $row['frequency'] . ' years', strtotime( date( 'Y-m', strtotime( $row['date_end'] ) ) ) ) ); + $max_days = date( 't', strtotime( $new_date_end ) ); + + if ( $max_days <= $row['date_end_month_day'] ) + $new_date_end = date( 'Y-m-d', strtotime( $new_date_end . '-' . $max_days ) ); + else + $new_date_end = date( 'Y-m-d', strtotime( $new_date_end . '-' . $row['date_end_month_day'] ) ); + + if ( $row['date_start'] ) + { + $new_date_start = date( 'Y-m', strtotime( '+' . $row['frequency'] . ' years', strtotime( date( 'Y-m', strtotime( $row['date_start'] ) ) ) ) ); + $max_days = date( 't', strtotime( $new_date_start ) ); + + if ( $max_days <= $row['date_start_month_day'] ) + $new_date_start = date( 'Y-m-d', strtotime( $new_date_start . '-' . $max_days ) ); + else + $new_date_start = date( 'Y-m-d', strtotime( $new_date_start . '-' . $row['date_start_month_day'] ) ); + } + } + + $days_reminder = explode( ',', $row['reminders_interval'] ); + $max_days_reminder = max( $days_reminder ); + + if ( $row['status'] != 2 ) { + $status = $row['status']; + } else { + $status = 0; + } + + $task_users = $mdb -> select( 'task_user', 'user_id', ['task_id' => $row['id']] ); + + $new_task_id = \factory\Tasks::task_save( + null, $row['id'], $row['created_by'], $row['name'], $row['text'], $new_date_start, $new_date_end, $row['project_id'], $row['client_id'], $row['pay_rate'], $row['reminders_interval'], $row['recursively'] ? 'on' : 'off', $row['frequency'], $row['period'], $task_users, $row['date_end_month_day'], $row['date_start_month_day'], null, $row['task_change_status'], true, $status + ); + + if ( $new_task_id ) { + $task_actions = $mdb -> select( 'task_action', [ 'name' ], [ 'task_id' => $row['id'] ] ); + if ( $task_actions ) foreach ( $task_actions as $task_action ) + $mdb -> insert( 'task_action', [ + 'name' => $task_action['name'], + 'task_id' => $new_task_id + ] ); + } + + return [ + 'status' => 'ok', + 'msg' => 'Dodawanie rekursywnych zadań: ' . $row['name'] . ' - ' . $new_date_end . "" + ]; + } + } + return false; + } + + public static function tasks_emails() + { + global $mdb, $setttings; + + include_once 'libraries/phpmailer/class.phpmailer.php'; + include_once 'libraries/phpmailer/class.smtp.php'; + + $results = $mdb -> query( 'SELECT ' + . 't.* ' + . 'FROM ' + . 'tasks AS t ' + . 'WHERE ' + . 'reminders_interval IS NOT NULL AND reminders_send = 0 AND status != 2 AND deleted = 0 AND date_end IS NOT NULL' ) -> fetchAll(); + if ( is_array( $results ) and!empty( $results ) ) foreach ( $results as $row ) + { + $days_counter = explode( ',', $row['reminders_interval'] ); + rsort( $days_counter ); + + if ( is_array( $days_counter ) and!empty( $days_counter ) ) foreach ( $days_counter as $dc ) + { + if ( !$mdb -> count( 'tasks_reminders', ['AND' => ['task_id' => $row['id'], 'day_counter' => $dc]] ) ) + { + $send = false; + $date_tmp = date( 'Y-m-d', strtotime( '+' . $dc . 'days', strtotime( date( 'Y-m-d' ) ) ) ); + if ( $date_tmp >= $row['date_end'] ) + { + if ( !$mdb -> count( 'tasks_reminders', ['AND' => ['task_id' => $row['id'], 'day_counter' => $dc]] ) ) + { + $users = $mdb -> select( 'task_user', 'user_id', ['task_id' => $row['id']] ); + + if ( is_array( $users ) and count( $users ) ) + { + foreach ( $users as $user ) + { + $user_email = $mdb -> get( 'users', 'email', ['id' => $user] ); + + date( 'Y-m-d', strtotime( $row['date_end'] ) ) == date( 'Y-m-d' ) ? $date = 'dzisiaj' : $date = date( 'Y-m-d', strtotime( $row['date_end'] ) ); + + + $subject = 'crmPRO - ' . $row['name'] . ' (#' . $row['id'] . ')'; + $text = '

Witaj.

' . + '

Otrzymałeś ten email z powodu ustawionego przypomnienia. Poniżej znajdziesz jego treść.

' . + '

---------------------------------------------------------------------------------------

' . + '

' . $row['name'] . ' (termin zadania: ' . $date . ')

' . + '

' . \factory\Crm::get_client_name( (int)$task['client_id'] ) . '

' . + '

' . htmlspecialchars_decode( $row['text'] ) . '

'; + + if ( \S::send_email( $user_email, $subject, $text ) ); + $send = true; + } + + if ( $send ) + { + $mdb -> insert( 'tasks_reminders', ['task_id' => $row['id'], 'day_counter' => $dc] ); + return [ + 'status' => 'ok', + 'msg' => 'Wiadomość została wysłana na adres: ' . $user_email + ]; + } + } + else + { + $mdb -> insert( 'tasks_reminders', ['task_id' => $row['id'], 'day_counter' => $dc] ); + return [ + 'status' => 'ok', + 'msg' => 'Wiadomość nie wysłana z powodu braku odbiorców.' + ]; + } + } + } + } + } + + if ( count( $days_counter ) == $mdb -> count( 'tasks_reminders', ['task_id' => $row['id']] ) ) + $mdb -> update( 'tasks', ['reminders_send' => 1], ['id' => $row['id']] ); + } + return ['status' => 'empty']; + } +} \ No newline at end of file diff --git a/autoload/class.DbModel.php b/autoload/class.DbModel.php new file mode 100644 index 0000000..8ecc2e0 --- /dev/null +++ b/autoload/class.DbModel.php @@ -0,0 +1,58 @@ + get( $this -> table, '*', [ $this -> table_key => $id ] ); + if ( is_array( $result ) ) foreach ( $result as $key => $val ) + $this -> $key = $val; + } + } + + public function __get( $variable ) + { + if ( array_key_exists( $variable, $this -> data ) ) + return $this -> data[$variable]; + } + + public function __set( $variable, $value ) + { + $this -> data[$variable] = $value; + } + + public function save() + { + global $mdb; + + if ( $this -> __get( $this -> table_key ) ) + { + $table_id_param = $this -> table_key; + $table_id_value = $this -> __get( $this -> table_key ); + $data_tmp = $this -> data; + unset( $data_tmp[ $table_id_param ] ); + + return $mdb -> update( $this -> table, $data_tmp, [ $table_id_param => $table_id_value ] ); + } + else + { + $mdb -> insert( $this -> table, $this -> data ); + $this -> __set( $this -> table_key, $mdb -> id() ); + } + return $this -> __get( $this -> table_key ); + } + + public function delete() + { + global $mdb; + return $mdb -> delete( $this -> table, [ $this -> table_key => $this -> __get( $this -> table_key ) ] ); + } + +} diff --git a/autoload/class.Excel.php b/autoload/class.Excel.php new file mode 100644 index 0000000..a0c656b --- /dev/null +++ b/autoload/class.Excel.php @@ -0,0 +1,167 @@ +title = $title; + $this->col = 0; + $this->row = 0; + $this->data = ''; + $this->bofMarker(); + } + + /** + * Transmits the proper headers to cause a download to occur and to identify the file properly + * @return nothing + */ + function headers() { + header("Content-Type: application/force-download"); + header("Content-Type: application/octet-stream"); + header("Content-Type: application/download"); + header("Content-Disposition: attachment;filename=" . Excel::filename($this->title) . ".xls "); + header("Content-Transfer-Encoding: binary "); + } + + function send_to_file( $loc ) + { + $this->eofMarker(); + file_put_contents($loc, $this->data); + } + + function send() { + $this->eofMarker(); + $this->headers(); + echo $this->data; + } + + /** + * Writes the Excel Beginning of File marker + * @see pack() + * @return nothing + */ + private function bofMarker() { + $this->data .= pack("ssssss", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0); + } + + /** + * Writes the Excel End of File marker + * @see pack() + * @return nothing + */ + private function eofMarker() { + $this->data .= pack("ss", 0x0A, 0x00); + } + + /** + * Moves internal cursor left by the amount specified + * @param optional integer $amount The amount to move left by, defaults to 1 + * @return integer The current column after the move + */ + function left($amount = 1) { + $this->col -= $amount; + if($this->col < 0) { + $this->col = 0; + } + return $this->col; + } + + /** + * Moves internal cursor right by the amount specified + * @param optional integer $amount The amount to move right by, defaults to 1 + * @return integer The current column after the move + */ + function right($amount = 1) { + $this->col += $amount; + return $this->col; + } + + /** + * Moves internal cursor up by amount + * @param optional integer $amount The amount to move up by, defaults to 1 + * @return integer The current row after the move + */ + function up($amount = 1) { + $this->row -= $amount; + if($this->row < 0) { + $this->row = 0; + } + return $this->row; + } + + /** + * Moves internal cursor down by amount + * @param optional integer $amount The amount to move down by, defaults to 1 + * @return integer The current row after the move + */ + function down($amount = 1) { + $this->row += $amount; + return $this->row; + } + + /** + * Moves internal cursor to the top of the page, row = 0 + * @return nothing + */ + function top() { + $this->row = 0; + } + + /** + * Moves internal cursor all the way left, col = 0 + * @return nothing + */ + function home() { + $this->col = 0; + } + + /** + * Writes a number to the Excel Spreadsheet + * @see pack() + * @param integer $value The value to write out + * @return nothing + */ + function number($value) { + $this->data .= pack("sssss", 0x203, 14, $this->row, $this->col, 0x0); + $this->data .= pack("d", $value); + } + + /** + * Writes a string (or label) to the Excel Spreadsheet + * @see pack() + * @param string $value The value to write out + * @return nothing + */ + function label($value) { + $length = strlen($value); + $this->data .= pack("ssssss", 0x204, 8 + $length, $this->row, $this->col, 0x0, $length); + $this->data .= $value; + } +} \ No newline at end of file diff --git a/autoload/class.Html.php b/autoload/class.Html.php new file mode 100644 index 0000000..2af941d --- /dev/null +++ b/autoload/class.Html.php @@ -0,0 +1,93 @@ + params = $params; + return $tpl -> render( 'html/form-text' ); + } + + public static function input_switch( array $params = [] ) + { + $tpl = new Tpl; + $tpl -> params = $params; + return $tpl -> render( 'html/input-switch' ); + } + + public static function select( array $params = [] ) + { + $tpl = new Tpl; + $tpl -> params = $params; + return $tpl -> render( 'html/select' ); + } + + public static function textarea( array $params = [] ) + { + $defaults = [ + 'rows' => 4, + ]; + + $params = array_merge( $defaults, $params ); + + $tpl = new Tpl; + $tpl -> params = $params; + return $tpl -> render( 'html/textarea' ); + } + + public static function input_icon( array $params = [] ) + { + $defaults = [ + 'type' => 'text', + ]; + + $params = array_merge( $defaults, $params ); + + $tpl = new Tpl; + $tpl -> params = $params; + return $tpl -> render( 'html/input-icon' ); + } + + public static function input( array $params = [] ) + { + $defaults = [ + 'type' => 'text', + ]; + + $params = array_merge( $defaults, $params ); + + $tpl = new Tpl; + $tpl -> params = $params; + return $tpl -> render( 'html/input' ); + } + + public static function button( array $params = [] ) + { + $defaults = [ + 'class' => 'btn-sm btn-info', + ]; + + $params = array_merge( $defaults, $params ); + + $tpl = new Tpl; + $tpl -> params = $params; + return $tpl -> render( 'html/button' ); + } + + public static function panel( array $params = [] ) + { + $defaults = [ + 'title' => 'panel-title', + 'class' => 'panel-primary', + 'content' => 'panel-content' + ]; + + $params = array_merge( $defaults, $params ); + + $tpl = new Tpl; + $tpl -> params = $params; + return $tpl -> render( 'html/panel' ); + } + +} \ No newline at end of file diff --git a/autoload/class.S.php b/autoload/class.S.php new file mode 100644 index 0000000..5aeffc9 --- /dev/null +++ b/autoload/class.S.php @@ -0,0 +1,249 @@ + $value ) + $query[$key] = urlencode( $key ) . '=' . urlencode( $value ); + return implode( '&', $query ); + } + else + return false; + } + + public static function seo( $val, $delete_rhombs = false ) + { + $array_rep1 = array( '*', '_', ' ', '+', '"', "'", '?', '-', ',', '!', '~', '<', '>', '@', '#', '$', '%', '^', '&', '*' . '(', ')' . '-', '=', '\\', '|', '[', ']', ':', '(', ')' ); + $array_rep2 = array( '-', '-', '-', '-', '', '', '', '-', '-', '', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '', '-', '-', '-', '-', '-', '-', '-', '-' ); + + $val = self::noPl( $val ); + $val = str_replace( $array_rep1, $array_rep2, $val ); + $val = strtolower( $val ); + $val = preg_replace( '/(-){2,}/', '-', $val ); + if ( $delete_rhombs ) + $val = str_replace( '/', '', $val ); + + return $val; + } + + static public function no_pl_excel( $val ) + { + $table = Array( + "\xc4\x85" => "a", "\xc4\x84" => "A", "\xc4\x87" => "c", "\xc4\x86" => "C", + "\xc4\x99" => "e", "\xc4\x98" => "E", "\xc5\x82" => "l", "\xc5\x81" => "L", + "\xc3\xb3" => "o", "\xc3\x93" => "O", "\xc5\x9b" => "s", "\xc5\x9a" => "S", + "\xc5\xbc" => "z", "\xc5\xbb" => "Z", "\xc5\xba" => "z", "\xc5\xb9" => "Z", + "\xc5\x84" => "n", "\xc5\x83" => "N" + ); + + $val = strtr( $val, $table ); + + return $val; + } + + public static function noPL( $val ) + { + $table = array( + "А" => "a", "Б" => "b", "В" => "v", "Г" => "g", "Д" => "d", + "Е" => "e", "Ё" => "yo", "Ж" => "zh", "З" => "z", "И" => "i", + "Й" => "j", "К" => "k", "Л" => "l", "М" => "m", "Н" => "n", + "О" => "o", "П" => "p", "Р" => "r", "С" => "s", "Т" => "t", + "У" => "u", "Ф" => "f", "Х" => "kh", "Ц" => "ts", "Ч" => "ch", + "Ш" => "sh", "Щ" => "sch", "Ъ" => "", "Ы" => "y", "Ь" => "", + "Э" => "e", "Ю" => "yu", "Я" => "ya", "а" => "a", "б" => "b", + "в" => "v", "г" => "g", "д" => "d", "е" => "e", "ё" => "yo", + "ж" => "zh", "з" => "z", "и" => "i", "й" => "j", "к" => "k", + "л" => "l", "м" => "m", "н" => "n", "о" => "o", "п" => "p", + "р" => "r", "с" => "s", "т" => "t", "у" => "u", "ф" => "f", + "х" => "kh", "ц" => "ts", "ч" => "ch", "ш" => "sh", "щ" => "sch", + "ъ" => "", "ы" => "y", "ь" => "", "э" => "e", "ю" => "yu", + "я" => "ya", " " => "-", "." => "", "," => "", + ":" => "", ";" => "", "—" => "", "–" => "-" + ); + + $val = strtr( $val, $table ); + + $val = iconv( 'UTF-8', 'ASCII//TRANSLIT', $val ); + + $table = Array( + "\xc4\x85" => "a", "\xc4\x84" => "A", "\xc4\x87" => "c", "\xc4\x86" => "C", + "\xc4\x99" => "e", "\xc4\x98" => "E", "\xc5\x82" => "l", "\xc5\x81" => "L", + "\xc3\xb3" => "o", "\xc3\x93" => "O", "\xc5\x9b" => "s", "\xc5\x9a" => "S", + "\xc5\xbc" => "z", "\xc5\xbb" => "Z", "\xc5\xba" => "z", "\xc5\xb9" => "Z", + "\xc5\x84" => "n", "\xc5\x83" => "N" + ); + + $val = strtr( $val, $table ); + + return $val; + } + + public static function alert( $text ) + { + \S::set_session( 'alert', $text ); + } + + public static function hash( $qtd ) + { + $Caracteres = 'ABCDEFGHIJKLMOPQRSTUVXWYZ0123456789'; + $QuantidadeCaracteres = strlen($Caracteres); + $QuantidadeCaracteres--; + + $Hash =NULL; + for ( $x = 1; $x <= $qtd; $x++ ) + { + $Posicao = rand( 0, $QuantidadeCaracteres ); + $Hash .= substr( $Caracteres, $Posicao, 1 ); + } + + return $Hash; + } + + public static function sort_array_of_array( &$array, $subfield, $type = SORT_ASC ) + { + $sortarray = array(); + foreach ( $array as $key => $row ) + $sortarray[$key] = $row[$subfield]; + + array_multisort( $sortarray, $type, $array ); + } + + public static function json_to_array( $json ) + { + $values_tmp = json_decode( $json, true ); + + if ( is_array( $values_tmp ) ) foreach ( $values_tmp as $val ) + { + if ( isset( $values[ $val['name'] ] ) ) + { + if ( is_array( $values[ $val['name'] ] ) ) + $values[ $val['name'] ][] = $val['value']; + else + $values[ $val['name'] ] = array( $values[ $val['name'] ], $val['value'] ); + } + else + $values[ $val['name'] ] = $val['value']; + } + return $values; + } + + public static function get_session( $var ) + { + return $_SESSION[ $var ]; + } + + public static function del_session( $var ) { + unset( $_SESSION[ $var ] ); + } + + public static function set_session( $var, $val ) + { + $_SESSION[ $var ] = $val; + } + + public static function get( $var ) + { + if ( isset( $_POST[ $var ] ) ) + { + if ( is_string( $_POST[ $var ] ) ) + return $_POST[ $var ]; + else + return $_POST[ $var ]; + } + else + { + if ( isset( $_GET[ $var ] ) ) + { + if ( is_string( $_GET[ $var ] ) ) + return $_GET[ $var ]; + else + return $_GET[ $var ]; + } + } + } + + public static function pre( $data , $type = '' ) + { + $data = str_replace( 'Array +(' , '' , $data ); + $data = str_replace( ')' , '' , $data ); + + echo '' . print_r( $data , true ) . ''; + } + + public static function email_check( $email ) + { + return filter_var( $email, FILTER_VALIDATE_EMAIL ); + } + + public static function send_email( $email, $subject, $text, $file = '' ) + { + global $settings; + + $mail = new PHPMailer; + $mail -> IsSMTP(); + $mail -> SMTPAuth = true; + $mail -> Host = 'host117523.hostido.net.pl'; + $mail -> Port = 25; + $mail -> Username = 'www@projectpro.pl'; + $mail -> Password = 'pMCZHCHBywtDGaVz'; + $mail -> CharSet = "UTF-8"; + $mail -> SMTPOptions = array( + 'ssl' => array( + 'verify_peer' => false, + 'verify_peer_name' => false, + 'allow_self_signed' => true + ) + ); + $mail -> From = 'www@projectpro.pl'; + $mail -> FromName = 'crmPRO'; + $mail -> addAddress( $email, $email ); + $mail -> addReplyTo( 'biuro@project-pro.pl', 'crmPRO' ); + $mail -> isHTML( true ); + + $mail -> Subject = $subject; + $mail -> Body = $text; + + if ( is_array( $file ) ) + { + foreach ( $file as $file_tmp ) + { + if ( file_exists( $file_tmp ) ) + $mail -> AddAttachment( $file_tmp ); + } + } + else + { + if ( file_exists( $file ) ) + $mail -> AddAttachment( $file ); + } + + return $mail -> send(); + } +} diff --git a/autoload/class.Tpl.php b/autoload/class.Tpl.php new file mode 100644 index 0000000..72960f5 --- /dev/null +++ b/autoload/class.Tpl.php @@ -0,0 +1,73 @@ + dir = $dir; + } + + public static function view( $file, $values = '' ) + { + $tpl = new \Tpl; + if ( is_array( $values ) ) foreach ( $values as $key => $val ) + $tpl -> $key = $val; + return $tpl -> render( $file ); + } + + public function secureHTML( $val ) + { + $out = stripslashes( $val ); + $out = str_replace( "'", "'", $out ); + $out = str_replace( '"', """, $out ); + $out = str_replace( "<", "<", $out ); + $out = str_replace( ">", ">", $out ); + return $out; + } + + public function render( $file ) + { + if ( file_exists( 'templates_user/' . $file . '.php' ) ) + { + ob_start(); + include 'templates_user/' . $file . '.php'; + $out = ob_get_contents(); + ob_end_clean(); + + return $out; + } + else if ( file_exists( 'templates/' . $file . '.php' ) ) + { + ob_start(); + include 'templates/' . $file . '.php'; + $out = ob_get_contents(); + ob_end_clean(); + + return $out; + } + else if ( file_exists( $file . '.php' ) ) + { + ob_start(); + include $file . '.php'; + $out = ob_get_contents(); + ob_end_clean(); + + return $out; + } + else + return '";JSDialog.Config.templateButton='';JSDialog.Config.templateBg='
';JSDialog.Config.classButton="cke_dialog_ui_button";JSDialog.Config.classButtonOk="cke_dialog_ui_button_ok";JSDialog.Config.contentBorders=[3,1,15,1,65];CKEDITOR.skin.loadPart("dialog");C(document,".jsdialog_plugin_jsplus_bootstrap_table_col_move_left.jsdialog_bg { background-color: white; opacity: 0.5; position: fixed; left: 0; top: 0; width: 100%; height: 3000px; z-index: 11111; display: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_left.jsdialog_dlg { font-family: Arial; padding: 0; position: fixed; z-index: 11112; background-color: white; border-radius: 5px; overflow:hidden; display: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_left.jsdialog_show { display: block; }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_left .jsdialog_message_contents { font-size: 16px; padding: 10px 0 10px 7px; display: table; overflow: hidden; }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_left .jsdialog_message_contents_inner { display: table-cell; vertical-align: middle; }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_left .jsdialog_message_icon { padding-left: 100px; min-height: 64px; background-position: 10px 10px; background-repeat: no-repeat; box-sizing: content-box; }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_left .jsdialog_message_icon_info { background-image: url(img/info.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_left .jsdialog_message_icon_warning { background-image: url(img/warning.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_left .jsdialog_message_icon_error { background-image: url(img/error.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_left .jsdialog_message_icon_confirm { background-image: url(img/confirm.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_left .cke_dialog_contents { margin-top: 0; border-top: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_left .cke_dialog_footer div { outline: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_left .cke_dialog_footer_buttons > .cke_dialog_ui_button { margin-right: 5px; }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_left .cke_dialog_footer_buttons > .cke_dialog_ui_button:last-child { margin-right: 0; }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_left .cke_dialog_title { cursor: default; }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_left .cke_dialog_contents { padding: 0; }"); +}function al(){var aH=false;if(aH){var aL=window.location.hostname;var aK=0;var aI;var aJ;if(aL.length!=0){for(aI=0,l=aL.length;aI=20&&(aJ.tagName=="TD"||aJ.tagName=="TH")){aH[0]=aJ;}}else{if(aJ.tagName=="TABLE"){aH[1]=aJ;}}if(aH[1]!=null){var aM;if(q<20){var aI=B(aH[0].parentNode,"tr");aM=(q<=2&&aI[0]!=aH[0])||(q>2&&aI[aI.length-1]!=aH[0]);}else{var aL=Z(aH[0]);aM=(q<=22&&aL>0)||(q>22&&aLaK+1){aN=aM[aK+1];}else{aN=a(aH.parentNode.tagName=="TBODY"||aH.tagName=="TBODY"?"th":"td",aP);}if(aM.length>aK+2){var aL=aM[aK+2];aL.parentNode.insertBefore(aQ,aL);}else{var aJ=aQ.parentNode;aJ.removeChild(aQ);aJ.appendChild(aQ);}return;}if(q==30||q==31||q==32){var aI=d(aQ);if(aI+aK==m){return;}if(aI+aK>aO){var aN;if(aM.length>aI+aK){aN=aM[aI+aK];}else{aN=a(aH.parentNode.tagName=="TBODY"||aH.tagName=="TBODY"?"th":"td",aP);}aQ.parentNode.insertBefore(aN,aQ);return;}}}}function h(aH,aJ){var aL=B(aH.parentNode,"tr");for(var aK=0;aK0){aL[aK-1].parentNode.removeChild(aL[aK-1]);if(aK+1=aM);return aH.toFixed(1)+aJ+aI[aK]+(aL?"b":"");}function ah(aH){return aH.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'");}function aA(aH){return aH.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");}function ap(aH){var aI=document.createElement("div");aI.innerHTML=aH;return aI.childNodes;}function ax(aH){return aH.getElementsByTagName("head")[0];}function au(aH){return aH.getElementsByTagName("body")[0];}function aD(aJ,aL){var aH=aJ.getElementsByTagName("link");var aK=false;for(var aI=aH.length-1;aI>=0;aI--){if(aH[aI].href==aL){aH[aI].parentNode.removeChild(aH[aI]);}}}function af(aK,aM){if(!aK){return;}var aH=aK.getElementsByTagName("link");var aL=false;for(var aI=0;aI-1){aI.splice(aI.indexOf(aH),1);}var aK=aI.join(" ").trim();if(aK.length>0){aJ.className=aK;}else{if(aJ.hasAttribute("class")){aJ.removeAttribute("class");}}}function b(aH){if(typeof(aH.className)==="undefined"||aH.className==null){return[];}return aH.className.split(/\s+/);}function aG(aK,aH){var aJ=b(aK);for(var aI=0;aI-1){aL[aM.substr(0,aH).trim()]=aM.substr(aH+1);}else{aL[aM]="";}}return aL;}function am(aJ,aI){var aK=ac(aJ);for(var aH in aK){var aL=aK[aH];if(aH==aI){return aL;}}return null;}function ag(aK,aJ,aH){var aL=ac(aK);for(var aI in aL){var aM=aL[aI];if(aI==aJ&&aM==aH){return true;}}return false;}function E(aJ,aI,aH){var aK=ac(aJ);aK[aI]=aH;x(aJ,aK);}function ae(aI,aH){var aJ=ac(aI);delete aJ[aH];x(aI,aJ);}function x(aI,aK){var aJ=[];for(var aH in aK){aJ.push(aH+":"+aK[aH]);}if(aJ.length>0){aI.setAttribute("style",aJ.join(";"));}else{if(aI.hasAttribute("style")){aI.removeAttribute("style");}}}function B(aL,aI){var aJ;if(Object.prototype.toString.call(aI)==="[object Array]"){aJ=aI;}else{aJ=[aI];}for(var aK=0;aK-1){aH.push(aL.childNodes[aK]);}}return aH;}function m(aK){var aJ=aq(aK);var aL=0;for(var aI=0;aIaL){aL=aM.length;}}return aL;}function Y(aH){return B(aH,["td","th"]);}function i(aL){var aK;for(var aH=0;aH0){return aI;}}return 1;}function ao(aH){if(aH.hasAttribute("rowspan")){var aI=parseInt(aH.getAttribute("rowspan"));if(!isNaN(aI)&&aI>0){return aI;}}return 1;}function aq(aO){var aJ=[];var aP=[null,"tbody","thead","tfoot"];for(var aI=0;aI0){for(var aM=0;aM0){aJ.push(aK[aM]);}}return aJ;}function o(aL){var aM=[];var aK=aq(aL);for(var aJ=0;aJ0){aJ.setAttribute("style",aI);}aJ.innerHTML=" ";return aJ;}function S(aH,aJ,aI){var aK=ar();if(typeof window["jsplus_"+aK+"_listeners"]==="undefined"){window["jsplus_"+aK+"_listeners"]={};}if(typeof window["jsplus_"+aK+"_listeners"][aJ]==="undefined"){window["jsplus_"+aK+"_listeners"][aJ]={};}if(typeof window["jsplus_"+aK+"_listeners"][aJ][F(aH)]==="undefined"){window["jsplus_"+aK+"_listeners"][aJ][F(aH)]=[];}window["jsplus_"+aK+"_listeners"][aJ][F(aH)].push((function(){var aL=aH;return function(){aI(aL);};})());}function g(aI,aJ){var aK=ar();if(typeof window["jsplus_"+aK+"_listeners"]!=="undefined"&&typeof window["jsplus_"+aK+"_listeners"][aJ]!=="undefined"&&typeof window["jsplus_"+aK+"_listeners"][aJ][F(aI)]!="undefined"){for(var aH=0;aHaP){aQ.setAttribute("colspan",aL+1);return;}}var aJ="td";if(aO.length>0){aJ=aO[aO.length-1].tagName;}else{if(K(aI)){aJ="th";}}for(;aM<=aP;aM++){var aN=a(aQ.tagName,aH);aI.appendChild(aN);}}function D(aJ,aN,aM){var aK=aJ.parentNode.tagName=="THEAD"?"th":"td";var aP=m(aN);var aH=J(aN);var aI=window.document.createElement("tr");for(var aL=0;aL0){aO.setAttribute("style",aH);}aO.innerHTML=" ";aI.appendChild(aO);}if(aM){aJ.parentNode.insertBefore(aI,aJ);}else{if(aJ.nextSibling!=null){aJ.parentNode.insertBefore(aI,aJ.nextSibling);}else{aJ.parentNode.appendChild(aI);}}return aI;}function L(aH,aI){S(aH,"table_tools",aI);}function ak(aH){g(aH,"table_tools");}function an(aH){var aI=aH.parentNode;while(aI!=null){if(aI.tagName=="TABLE"){return aI;}aI=aI.parentNode;}return null;}function v(aS){var aR=aq(aS);var aH=-1;var aQ=[];for(var aL=0;aL'+'
'+'
'+'
'+''+'X'+""+"
"+'
'+'
'+"
"+'"+"
"+"";JSDialog.Config.templateButton='';JSDialog.Config.templateBg='
';JSDialog.Config.classButton="cke_dialog_ui_button";JSDialog.Config.classButtonOk="cke_dialog_ui_button_ok";JSDialog.Config.contentBorders=[3,1,15,1,65];CKEDITOR.skin.loadPart("dialog");C(document,".jsdialog_plugin_jsplus_bootstrap_table_col_move_right.jsdialog_bg { background-color: white; opacity: 0.5; position: fixed; left: 0; top: 0; width: 100%; height: 3000px; z-index: 11111; display: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_right.jsdialog_dlg { font-family: Arial; padding: 0; position: fixed; z-index: 11112; background-color: white; border-radius: 5px; overflow:hidden; display: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_right.jsdialog_show { display: block; }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_right .jsdialog_message_contents { font-size: 16px; padding: 10px 0 10px 7px; display: table; overflow: hidden; }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_right .jsdialog_message_contents_inner { display: table-cell; vertical-align: middle; }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_right .jsdialog_message_icon { padding-left: 100px; min-height: 64px; background-position: 10px 10px; background-repeat: no-repeat; box-sizing: content-box; }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_right .jsdialog_message_icon_info { background-image: url(img/info.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_right .jsdialog_message_icon_warning { background-image: url(img/warning.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_right .jsdialog_message_icon_error { background-image: url(img/error.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_right .jsdialog_message_icon_confirm { background-image: url(img/confirm.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_right .cke_dialog_contents { margin-top: 0; border-top: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_right .cke_dialog_footer div { outline: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_right .cke_dialog_footer_buttons > .cke_dialog_ui_button { margin-right: 5px; }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_right .cke_dialog_footer_buttons > .cke_dialog_ui_button:last-child { margin-right: 0; }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_right .cke_dialog_title { cursor: default; }"+".jsdialog_plugin_jsplus_bootstrap_table_col_move_right .cke_dialog_contents { padding: 0; }"); +}function al(){var aH=false;if(aH){var aL=window.location.hostname;var aK=0;var aI;var aJ;if(aL.length!=0){for(aI=0,l=aL.length;aI=20&&(aJ.tagName=="TD"||aJ.tagName=="TH")){aH[0]=aJ;}}else{if(aJ.tagName=="TABLE"){aH[1]=aJ;}}if(aH[1]!=null){var aM;if(q<20){var aI=B(aH[0].parentNode,"tr");aM=(q<=2&&aI[0]!=aH[0])||(q>2&&aI[aI.length-1]!=aH[0]);}else{var aL=Z(aH[0]);aM=(q<=22&&aL>0)||(q>22&&aLaK+1){aN=aM[aK+1];}else{aN=a(aH.parentNode.tagName=="TBODY"||aH.tagName=="TBODY"?"th":"td",aP);}if(aM.length>aK+2){var aL=aM[aK+2];aL.parentNode.insertBefore(aQ,aL);}else{var aJ=aQ.parentNode;aJ.removeChild(aQ);aJ.appendChild(aQ);}return;}if(q==30||q==31||q==32){var aI=d(aQ);if(aI+aK==m){return;}if(aI+aK>aO){var aN;if(aM.length>aI+aK){aN=aM[aI+aK];}else{aN=a(aH.parentNode.tagName=="TBODY"||aH.tagName=="TBODY"?"th":"td",aP);}aQ.parentNode.insertBefore(aN,aQ);return;}}}}function h(aH,aJ){var aL=B(aH.parentNode,"tr");for(var aK=0;aK0){aL[aK-1].parentNode.removeChild(aL[aK-1]);if(aK+1=aM);return aH.toFixed(1)+aJ+aI[aK]+(aL?"b":"");}function ah(aH){return aH.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'");}function aA(aH){return aH.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");}function ap(aH){var aI=document.createElement("div");aI.innerHTML=aH;return aI.childNodes;}function ax(aH){return aH.getElementsByTagName("head")[0];}function au(aH){return aH.getElementsByTagName("body")[0];}function aD(aJ,aL){var aH=aJ.getElementsByTagName("link");var aK=false;for(var aI=aH.length-1;aI>=0;aI--){if(aH[aI].href==aL){aH[aI].parentNode.removeChild(aH[aI]);}}}function af(aK,aM){if(!aK){return;}var aH=aK.getElementsByTagName("link");var aL=false;for(var aI=0;aI-1){aI.splice(aI.indexOf(aH),1);}var aK=aI.join(" ").trim();if(aK.length>0){aJ.className=aK;}else{if(aJ.hasAttribute("class")){aJ.removeAttribute("class");}}}function b(aH){if(typeof(aH.className)==="undefined"||aH.className==null){return[];}return aH.className.split(/\s+/);}function aG(aK,aH){var aJ=b(aK);for(var aI=0;aI-1){aL[aM.substr(0,aH).trim()]=aM.substr(aH+1);}else{aL[aM]="";}}return aL;}function am(aJ,aI){var aK=ac(aJ);for(var aH in aK){var aL=aK[aH];if(aH==aI){return aL;}}return null;}function ag(aK,aJ,aH){var aL=ac(aK);for(var aI in aL){var aM=aL[aI];if(aI==aJ&&aM==aH){return true;}}return false;}function E(aJ,aI,aH){var aK=ac(aJ);aK[aI]=aH;x(aJ,aK);}function ae(aI,aH){var aJ=ac(aI);delete aJ[aH];x(aI,aJ);}function x(aI,aK){var aJ=[];for(var aH in aK){aJ.push(aH+":"+aK[aH]);}if(aJ.length>0){aI.setAttribute("style",aJ.join(";"));}else{if(aI.hasAttribute("style")){aI.removeAttribute("style");}}}function B(aL,aI){var aJ;if(Object.prototype.toString.call(aI)==="[object Array]"){aJ=aI;}else{aJ=[aI];}for(var aK=0;aK-1){aH.push(aL.childNodes[aK]);}}return aH;}function m(aK){var aJ=aq(aK);var aL=0;for(var aI=0;aIaL){aL=aM.length;}}return aL;}function Y(aH){return B(aH,["td","th"]);}function i(aL){var aK;for(var aH=0;aH0){return aI;}}return 1;}function ao(aH){if(aH.hasAttribute("rowspan")){var aI=parseInt(aH.getAttribute("rowspan"));if(!isNaN(aI)&&aI>0){return aI;}}return 1;}function aq(aO){var aJ=[];var aP=[null,"tbody","thead","tfoot"];for(var aI=0;aI0){for(var aM=0;aM0){aJ.push(aK[aM]);}}return aJ;}function o(aL){var aM=[];var aK=aq(aL);for(var aJ=0;aJ0){aJ.setAttribute("style",aI);}aJ.innerHTML=" ";return aJ;}function S(aH,aJ,aI){var aK=ar();if(typeof window["jsplus_"+aK+"_listeners"]==="undefined"){window["jsplus_"+aK+"_listeners"]={};}if(typeof window["jsplus_"+aK+"_listeners"][aJ]==="undefined"){window["jsplus_"+aK+"_listeners"][aJ]={};}if(typeof window["jsplus_"+aK+"_listeners"][aJ][F(aH)]==="undefined"){window["jsplus_"+aK+"_listeners"][aJ][F(aH)]=[];}window["jsplus_"+aK+"_listeners"][aJ][F(aH)].push((function(){var aL=aH;return function(){aI(aL);};})());}function g(aI,aJ){var aK=ar();if(typeof window["jsplus_"+aK+"_listeners"]!=="undefined"&&typeof window["jsplus_"+aK+"_listeners"][aJ]!=="undefined"&&typeof window["jsplus_"+aK+"_listeners"][aJ][F(aI)]!="undefined"){for(var aH=0;aHaP){aQ.setAttribute("colspan",aL+1);return;}}var aJ="td";if(aO.length>0){aJ=aO[aO.length-1].tagName;}else{if(K(aI)){aJ="th";}}for(;aM<=aP;aM++){var aN=a(aQ.tagName,aH);aI.appendChild(aN);}}function D(aJ,aN,aM){var aK=aJ.parentNode.tagName=="THEAD"?"th":"td";var aP=m(aN);var aH=J(aN);var aI=window.document.createElement("tr");for(var aL=0;aL0){aO.setAttribute("style",aH);}aO.innerHTML=" ";aI.appendChild(aO);}if(aM){aJ.parentNode.insertBefore(aI,aJ);}else{if(aJ.nextSibling!=null){aJ.parentNode.insertBefore(aI,aJ.nextSibling);}else{aJ.parentNode.appendChild(aI);}}return aI;}function L(aH,aI){S(aH,"table_tools",aI);}function ak(aH){g(aH,"table_tools");}function an(aH){var aI=aH.parentNode;while(aI!=null){if(aI.tagName=="TABLE"){return aI;}aI=aI.parentNode;}return null;}function v(aS){var aR=aq(aS);var aH=-1;var aQ=[];for(var aL=0;aL'+'
'+'
'+'
'+''+'X'+""+"
"+'
'+'
'+"
"+'"+"
"+"";JSDialog.Config.templateButton='';JSDialog.Config.templateBg='
';JSDialog.Config.classButton="cke_dialog_ui_button";JSDialog.Config.classButtonOk="cke_dialog_ui_button_ok";JSDialog.Config.contentBorders=[3,1,15,1,65];CKEDITOR.skin.loadPart("dialog");D(document,".jsdialog_plugin_jsplus_bootstrap_table_conf.jsdialog_bg { background-color: white; opacity: 0.5; position: fixed; left: 0; top: 0; width: 100%; height: 3000px; z-index: 11111; display: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_conf.jsdialog_dlg { font-family: Arial; padding: 0; position: fixed; z-index: 11112; background-color: white; border-radius: 5px; overflow:hidden; display: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_conf.jsdialog_show { display: block; }"+".jsdialog_plugin_jsplus_bootstrap_table_conf .jsdialog_message_contents { font-size: 16px; padding: 10px 0 10px 7px; display: table; overflow: hidden; }"+".jsdialog_plugin_jsplus_bootstrap_table_conf .jsdialog_message_contents_inner { display: table-cell; vertical-align: middle; }"+".jsdialog_plugin_jsplus_bootstrap_table_conf .jsdialog_message_icon { padding-left: 100px; min-height: 64px; background-position: 10px 10px; background-repeat: no-repeat; box-sizing: content-box; }"+".jsdialog_plugin_jsplus_bootstrap_table_conf .jsdialog_message_icon_info { background-image: url(img/info.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_conf .jsdialog_message_icon_warning { background-image: url(img/warning.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_conf .jsdialog_message_icon_error { background-image: url(img/error.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_conf .jsdialog_message_icon_confirm { background-image: url(img/confirm.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_conf .cke_dialog_contents { margin-top: 0; border-top: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_conf .cke_dialog_footer div { outline: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_conf .cke_dialog_footer_buttons > .cke_dialog_ui_button { margin-right: 5px; }"+".jsdialog_plugin_jsplus_bootstrap_table_conf .cke_dialog_footer_buttons > .cke_dialog_ui_button:last-child { margin-right: 0; }"+".jsdialog_plugin_jsplus_bootstrap_table_conf .cke_dialog_title { cursor: default; }"+".jsdialog_plugin_jsplus_bootstrap_table_conf .cke_dialog_contents { padding: 0; }"); +}function aG(){var ba=false;if(ba){var be=window.location.hostname;var bd=0;var bb;var bc;if(be.length!=0){for(bb=0,l=be.length;bb',parseValuesFromElement:function(bc){I["features_initial"].tag_name=bc.tagName.toLowerCase();},setGUIByValues:function(bc){window.document.getElementById("jsplus_bootstrap_table_conf_feature_tag_name_"+J(bc)).value=I["features_initial"].tag_name;},parseValuesFromGUI:function(bc){I["features_current"].tag_name=window.document.getElementById("jsplus_bootstrap_table_conf_feature_tag_name_"+J(bc)).value;},apply:function(bd){if(I["features_initial"].tag_name==I["features_current"].tag_name.toLowerCase()){return;}if(I["features_current"].tag_name.length>0){var be=document.createElement(I["features_current"].tag_name);for(var bc=0;bc'+'"+'"+"",parseValuesFromElement:function(be){var bd=C(be,"thead");var bc=bd.length>0;I["features_initial"].header=bc;},setGUIByValues:function(bc){window.document.getElementById("jsplus_bootstrap_table_conf_feature_header_"+J(bc)).value=I["features_initial"].header?"added":"removed";},parseValuesFromGUI:function(bc){I["features_current"].header=window.document.getElementById("jsplus_bootstrap_table_conf_feature_header_"+J(bc)).value=="added";},apply:function(bg){if(I["features_initial"].header==I["features_current"].header){return;}if(I["features_current"].header===true){var bi=bg.ownerDocument;var bd=bi.createElement("thead");var bc=bi.createElement("tr");bd.appendChild(bc);var bh=m(bg);for(var bf=0;bf',parseValuesFromElement:function(be){var bc=C(be,"caption");var bd=bc.length>0;I["features_initial"].caption=bd?bc[0].innerHTML:"";},setGUIByValues:function(bc){window.document.getElementById("jsplus_bootstrap_table_conf_feature_caption_"+J(bc)).value=I["features_initial"].caption; +},parseValuesFromGUI:function(bc){I["features_current"].caption=window.document.getElementById("jsplus_bootstrap_table_conf_feature_caption_"+J(bc)).value;},apply:function(be){if(I["features_initial"].caption==I["features_current"].caption){return;}if(I["features_current"].caption.length>0){var bc=C(be,"caption");var bg=null;if(bc.length>0){bg=bc[0];}else{var bf=be.ownerDocument;bg=bf.createElement("caption");if(be.firstChild!=null){be.insertBefore(bg,be.firstChild);}else{be.appendChild(bg);}}bg.innerHTML=I["features_current"].caption;}else{var bg=C(be,"caption");for(var bd=0;bd'+'"+'"+'"+'"+"",parseValuesFromElement:function(bc){var bd=ae(bc);I["features_initial"].horizontalAlign=i(bd);},setGUIByValues:function(be){var bd="jsplus_bootstrap_table_conf_feature_cells_horizontal_align_"+J(be);var bg="jsplus_bootstrap_table_conf_feature_cells_horizontal_align_do_not_change"+J(be);var bf=window.document.getElementById(bg);if(bf){if(I["features_initial"].horizontalAlign!="do_not_change"){bf.parentNode.removeChild(bf);}}else{if(I["features_initial"].horizontalAlign=="do_not_change"){var bc=window.document.getElementById(bd);bf=window.document.createElement("option");bf.id=bg;bf.value="do_not_change";bf.innerText=A(be,"do_not_change");bc.insertBefore(bf,bc.firstChild);}}window.document.getElementById("jsplus_bootstrap_table_conf_feature_cells_horizontal_align_"+J(be)).value=I["features_initial"].horizontalAlign;},parseValuesFromGUI:function(bc){I["features_current"].horizontalAlign=window.document.getElementById("jsplus_bootstrap_table_conf_feature_cells_horizontal_align_"+J(bc)).value;},apply:function(bc){var bd=I["features_current"].horizontalAlign;if(bd!="do_not_change"){aq(ae(bc),bd);}}},{str:"cells_vertical_align",html:'",parseValuesFromElement:function(bc){var bd=ae(bc);I["features_initial"].verticalAlign=M(bd);},setGUIByValues:function(be){var bd="jsplus_bootstrap_table_conf_feature_cells_vertical_align_"+J(be);var bg="jsplus_bootstrap_table_conf_feature_cells_vertical_align_do_not_change"+J(be);var bf=window.document.getElementById(bg);if(bf){if(I["features_initial"].verticalAlign!="do_not_change"){bf.parentNode.removeChild(bf);}}else{if(I["features_initial"].verticalAlign=="do_not_change"){var bc=window.document.getElementById(bd);bf=window.document.createElement("option");bf.id=bg;bf.value="do_not_change";bf.innerText=A(be,"do_not_change");bc.insertBefore(bf,bc.firstChild);}}window.document.getElementById("jsplus_bootstrap_table_conf_feature_cells_vertical_align_"+J(be)).value=I["features_initial"].verticalAlign;},parseValuesFromGUI:function(bc){I["features_current"].verticalAlign=window.document.getElementById("jsplus_bootstrap_table_conf_feature_cells_vertical_align_"+J(bc)).value;},apply:function(bc){var bd=I["features_current"].verticalAlign;if(bd!="do_not_change"){aZ(ae(bc),bd);}}});}if(s==0||s==1||s==2){aP[J(bb)].push([{type:"link",str:"width_100",add_styles:[["width","100%"]]}],[{type:"text",str:"border"},{type:"link",str:"none",add_styles:[["border","none"]]},{type:"text",str:"/",localize:false},{type:"link",str:"black",add_styles:[["border","black solid 1px"]]},{type:"text",str:"/",localize:false},{type:"link",str:"silver",add_styles:[["border","silver solid 1px"]]},{type:"text",str:"/",localize:false},{type:"link",str:"white",add_styles:[["border","white solid 1px"]]}]);}if(s!=4){aP[J(bb)].push([{type:"text",str:"background_color"},{type:"link",str:"transparent",add_styles:[["background-color","transparent"]]},{type:"text",str:"/",localize:false},{type:"link",str:"white",add_styles:[["background-color","white"]]},{type:"text",str:"/",localize:false},{type:"link",str:"black",add_styles:[["background-color","black"]]}]);}if(s==20||s==21||s==22||s==30||s==31||s==32){aP[J(bb)].push([{type:"text",str:"font_color"},{type:"link",str:"white",add_styles:[["color","white"]]},{type:"text",str:"/",localize:false},{type:"link",str:"black",add_styles:[["color","black"]]},{type:"text",str:"/",localize:false},{type:"link",str:"gray",add_styles:[["color","gray"]]}]);}if(s==20||s==21||s==22){aP[J(bb)].push([{type:"text",str:"cells_horizontal_align"},{type:"link",str:"left",add_styles:[["text-align","left"]]},{type:"text",str:"/",localize:false},{type:"link",str:"center",add_styles:[["text-align","center"]]},{type:"text",str:"/",localize:false},{type:"link",str:"right",add_styles:[["text-align","right"]]},{type:"text",str:"/",localize:false},{type:"link",str:"def",remove_styles:["text-align"]}]); +aP[J(bb)].push([{type:"text",str:"cells_vertical_align"},{type:"link",str:"top",add_styles:[["vertical-align","top"]]},{type:"text",str:"/",localize:false},{type:"link",str:"middle",add_styles:[["vertical-align","middle"]]},{type:"text",str:"/",localize:false},{type:"link",str:"bottom",add_styles:[["vertical-align","bottom"]]},{type:"text",str:"/",localize:false},{type:"link",str:"def",remove_styles:["vertical-align"]}]);}if(s==0||s==1||s==2){aP[J(bb)].push([{type:"text",str:"align_table"},{type:"link",str:"left",add_styles:[["margin-left","0"],["margin-right","auto"]]},{type:"text",str:"/",localize:false},{type:"link",str:"center",add_styles:[["margin-left","auto"],["margin-right","auto"]]},{type:"text",str:"/",localize:false},{type:"link",str:"right",add_styles:[["margin-left","auto"],["margin-right","0"]]}]);if(s==1){aP[J(bb)].push([{col:2,type:"text",str:"jsplus_bootstrap_table_conf_striped"},{type:"link",str:"enable",add_classes:["table-striped"]},{type:"text",str:"/",localize:false},{type:"link",str:"disable",remove_classes:["table-striped"]}],[{col:2,type:"text",str:"jsplus_bootstrap_table_conf_bordered"},{type:"link",str:"enable",add_classes:["table-bordered"]},{type:"text",str:"/",localize:false},{type:"link",str:"disable",remove_classes:["table-bordered"]}],[{col:2,type:"text",str:"jsplus_bootstrap_table_conf_condensed"},{type:"link",str:"enable",add_classes:["table-condensed"]},{type:"text",str:"/",localize:false},{type:"link",str:"disable",remove_classes:["table-condensed"]}]);}}for(var ba=0;ba'+(bc>0?" ":"")+aB(ba)+(bc");}else{if(bb.type=="link"){bd.push(''+aB(ba)+"");}}}return bd.join(" ");}function ax(bf){X(bf);var bd="";var bb=[[],[]];for(var bc=0;bc0||aP[J(bf)].length>0){var ba=aS[J(bf)].length;if(bb[0].length>ba){ba=bb[0].length;}if(bb[1].length>ba){ba=bb[1].length;}bd+=''+"";bd+="";if(aS[J(bf)].length>0){bd+='";}if(bb[0].length>0||bb[1].length>0){bd+='";}bd+="";for(var bc=0;bc";if(aS[J(bf)].length>0){bd+='";bd+='";}if(bb[0].length>0||bb[1].length>0){bd+="";}if(bb[1].length>0){bd+='";}bd+="";}bd+=""+"
';bd+=s==4?"":A(bf,"apply_features");bd+="0){bd+=' colspan="2"';}bd+=">";if(bb[0].length>0||bb[1].length>0){bd+=A(bf,"quick_styling");}bd+="
';}if(aS[J(bf)].length>bc){bd+=A(bf,aS[J(bf)][bc].str);}if(aS[J(bf)].length>0){bd+="';}if(aS[J(bf)].length>bc){bd+=aS[J(bf)][bc].html;}if(aS[J(bf)].length>0){bd+="";if(bb[0].length>bc){bd+=an(bf,bb[0][bc]);}bd+="';if(bb[1].length>bc){bd+=an(bf,bb[1][bc]);}bd+="
";}bd+="";bd+=''+""+""+'"+'"+'"+""+""+'"+'"+'"+""+""+'"+'"+'"+""+""+"
'+"
"+'
'+A(bf,"classes")+"
"+'"+"
"+"
'+"
"+'
'+A(bf,"styles")+"
"+'"+"
"+"
'+"
"+'
'+A(bf,"attributes")+"
"+'"+"
"+"
'+A(bf,"desc_classes")+"'+A(bf,"desc_styles")+"'+A(bf,"desc_attrs")+"
'+'
'+"
"+"
'+'
'+"
"+"
'+'
'+"
"+"
"; +return bd.replace(/%id%/g,J(bf));}function R(bb){var ba=av(bb);if(af.length==0||ba==null){return ba;}while(!(af.indexOf(ba.tagName.toLowerCase())>-1)){if(ba.parentNode!=null&&ba.parentNode.tagName!="HTML"){ba=ba.parentNode;}else{return null;}}return ba;}function S(bg){var bb={};var bd=bg.getAttribute("class");bb["classes"]=(bd==null||bd.trim().length==0)?[]:bd.split(/\s+/);var ba=bg.getAttribute("style");var be=(ba==null||ba.trim().length==0)?[]:ba.split(/\s*;\s*/);bb["styles"]=[];var bj;var bh;for(var bc in be){var bk=be[bc];var bf=bk.indexOf(":");if(bf!=-1){bj=bk.substr(0,bf).trim();bh=bk.substr(bf+1).trim();if(bj.length>0&&bh.length>0){bb["styles"].push([bj,bh]);}}}bb["attrs"]=[];var bi=bg.attributes;for(var bf=0;bfbd?bh[bd]:null;if(ba!=null&&(bb==0||be[bb-1]!=ba)){be.push(ba);}}return be;}function aL(ba){var bb=[ba];if(s==30||s==31||s==32){bb=aN(ba);}return bb;}function aV(bj){var ba=aL(bj);I=S(ba[0]);I["features_initial"]=[];I["features_current"]=[];I["dirty_classes"]=[];I["dirty_styles"]=[];I["dirty_attrs"]=[];for(var bk=1;bk0&&I["classes"].indexOf(bn)==-1){I["classes"].push(bn);}}var bj=bm.getElementsByClassName("jsplus_bootstrap_table_conf_styles_name_"+J(bh));var bb=bm.getElementsByClassName("jsplus_bootstrap_table_conf_styles_value_"+J(bh));for(var bg=0;bg0&&bl.length>0){var bk=false;for(var bf=0;bf0&&bl.length>0&&bc!="class"&&bc!="style"){var bk=false;for(var bf=0;bf0){ba[I["attrs"][bb][0]]=I["attrs"][bb][1];}}return ba;}function F(bh,bj){var bi=function(){this.parentNode.parentNode.removeChild(this.parentNode);};var be=function(){var bo=this.parentNode.getElementsByTagName("input")[0];bo.removeAttribute("readonly"); +var bq=aw(bo);delete bq["background-color"];bq["width"]="167px";y(bo,bq);var bp=I["dirty_classes"].indexOf(bo.value);if(bp>-1){I["dirty_classes"].splice(bp,1);}this.parentNode.removeChild(this);};var bl=window.document;var bb=bl.getElementById("jsplus_bootstrap_table_conf_classes_"+J(bh));var bn=I["dirty_classes"].indexOf(bj)>-1;var bg=bn?140:167;var bf=bn?"background-color:#eee;":"";var bk=bl.createElement("input");if(bn){bk.setAttribute("readonly","readonly");}bk.setAttribute("class","jsplus_bootstrap_table_conf_class_value_"+J(bh));bk.setAttribute("style",bf+"float:left;width:"+bg+"px;margin:1px 5px 0 1px;padding:3px 4px;border:1px solid silver;font-size:12px");bk.setAttribute("value",bj);if(bn){var bd=bl.createElement("div");bd.setAttribute("class","jsplus_bootstrap_table_conf_dirty_"+J(bh));bd.setAttribute("style","line-height:25px;margin-right:5px;float:left;width:22px;height:22px;text-align:center;color:black;border-radius:2px;background-color:yellow;font-size:17px;font-weight:bold;cursor:pointer");bd.setAttribute("title",A(bh,"dirty_class"));bd.innerHTML="⚠";}var ba=bl.createElement("div");ba.setAttribute("class","jsplus_bootstrap_table_conf_class_delete_"+J(bh));ba.setAttribute("style","float:left;width:22px;height:22px;text-align:center;color:white;border-radius:2px;background-color:lightcoral;font-size:17px;font-weight:bold;cursor:pointer");ba.setAttribute("title",A(bh,"del"));ba.innerHTML="-";var bc=bl.createElement("div");var bm=false;if(bj=="cke_show_border"||bj.indexOf("jsplus_advanced_blocks")===0||bj.indexOf("jsplus_bootstrap_advanced_blocks")===0||bj.indexOf("jsplus_foundation_advanced_blocks")===0){bm=true;}bc.setAttribute("style","padding-bottom:5px;height:27px"+(bm?";display:none":""));bc.appendChild(bk);if(bn){bc.appendChild(bd);}bc.appendChild(ba);bb.appendChild(bc);ba.onclick=bi;if(bn){bd.onclick=be;}}function a0(bc,bb,ba){a7(bc,bb,ba,true);}function P(bb,ba,bc){a7(bb,ba,bc,false);}function a7(bj,bb,bn,bp){var bl=function(){this.parentNode.parentNode.removeChild(this.parentNode);};var be=function(){var bv=this.parentNode.getElementsByTagName("input");bs=bv[1];bs.removeAttribute("readonly");var bu=aw(bs);delete bu["background-color"];bu["width"]="151px";y(bs,bu);var bs=bv[0];bs.removeAttribute("readonly");ay(bs,"background-color");var br=bp?"dirty_styles":"dirty_attrs";var bt=I[br].indexOf(bs.value);if(bt>-1){I[br].splice(bt,1);}this.parentNode.removeChild(this);};var bq=I[bp?"dirty_styles":"dirty_attrs"].indexOf(bb)>-1;var bf=bq?124:151;var bi=bq?"background-color:#eee;":"";var bo=bp?"styles":"attrs";var bm=window.document;var bk=bm.getElementById("jsplus_bootstrap_table_conf_"+bo+"_"+J(bj));var bh=bm.createElement("input");if(bq){bh.setAttribute("readonly","readonly");}bh.setAttribute("class","jsplus_bootstrap_table_conf_"+bo+"_name_"+J(bj));bh.setAttribute("style",bi+"float:left;width:85px;margin:1px 5px 0 1px;padding:3px 4px;border:1px solid silver;font-size:12px");bh.setAttribute("value",bb);var bg=bm.createElement("input");if(bq){bg.setAttribute("readonly","readonly");}bg.setAttribute("class","jsplus_bootstrap_table_conf_"+bo+"_value_"+J(bj));bg.setAttribute("style",bi+"float:left;width:"+bf+"px;margin:1px 5px 0 1px;padding:3px 4px;border:1px solid silver;font-size:12px");bg.setAttribute("value",bn);if(bq){var bd=bm.createElement("div");bd.setAttribute("class","jsplus_bootstrap_table_conf_dirty_"+J(bj));bd.setAttribute("style","line-height:25px;margin-right:5px;float:left;width:22px;height:22px;text-align:center;color:black;border-radius:2px;background-color:yellow;font-size:17px;font-weight:bold;cursor:pointer");bd.setAttribute("title",A(bj,bp?"dirty_style":"dirty_attr"));bd.innerHTML="⚠";}var ba=bm.createElement("div");ba.setAttribute("class","jsplus_bootstrap_table_conf_"+bo+"_delete_"+J(bj));ba.setAttribute("style","float:left;width:22px;height:22px;text-align:center;color:white;border-radius:2px;background-color:lightcoral;font-size:17px;font-weight:bold;cursor:pointer");ba.setAttribute("title",A(bj,"del"));ba.innerHTML="-";var bc=bm.createElement("div");bc.setAttribute("style","padding-bottom:5px;height:27px");bc.appendChild(bh);bc.appendChild(bg);if(bq){bc.appendChild(bd);}bc.appendChild(ba);bk.appendChild(bc);ba.onclick=bl;if(bq){bd.onclick=be;}}function aR(bd){var bf=window.document;var ba=bf.getElementById("jsplus_bootstrap_table_conf_classes_"+J(bd));ba.innerHTML="";for(var bc in I["classes"]){F(bd,I["classes"][bc]);}var be=bf.getElementById("jsplus_bootstrap_table_conf_styles_"+J(bd));be.innerHTML="";for(var bc in I["styles"]){a0(bd,I["styles"][bc][0],I["styles"][bc][1]);}var bb=bf.getElementById("jsplus_bootstrap_table_conf_attrs_"+J(bd));bb.innerHTML="";for(var bc in I["attrs"]){P(bd,I["attrs"][bc][0],I["attrs"][bc][1]);}}function h(bc){window.document.getElementById("jsplus_bootstrap_table_conf_add_class_"+J(bc)).onclick=function(){F(bc,"");};window.document.getElementById("jsplus_bootstrap_table_conf_add_style_"+J(bc)).onclick=function(){a0(bc,"","");};window.document.getElementById("jsplus_bootstrap_table_conf_add_attr_"+J(bc)).onclick=function(){P(bc,"",""); +};var bd=(function(){var be=bc;return function(){var bj=aP[J(bc)][parseInt(this.getAttribute("data-id-1"))][parseInt(this.getAttribute("data-id-2"))];if(bj.hasOwnProperty("add_styles")){for(var bk=0;bk-1){bt.push(bh);}}for(var bq=0;bq0){bb.setAttribute("class",bs);}else{bb.removeAttribute("class");}var bc=aw(bb);var bg={};for(var bq=0;bq=bf);return ba.toFixed(1)+bc+bb[bd]+(be?"b":"");}function aB(ba){return ba.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'");}function aY(ba){return ba.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");}function aK(ba){var bb=document.createElement("div");bb.innerHTML=ba;return bb.childNodes;}function aT(ba){return ba.getElementsByTagName("head")[0];}function aQ(ba){return ba.getElementsByTagName("body")[0];}function a4(bc,be){var ba=bc.getElementsByTagName("link");var bd=false;for(var bb=ba.length-1;bb>=0;bb--){if(ba[bb].href==be){ba[bb].parentNode.removeChild(ba[bb]);}}}function az(bd,bf){if(!bd){return;}var ba=bd.getElementsByTagName("link");var be=false;for(var bb=0;bb-1){bb.splice(bb.indexOf(ba),1);}var bd=bb.join(" ").trim();if(bd.length>0){bc.className=bd;}else{if(bc.hasAttribute("class")){bc.removeAttribute("class");}}}function b(ba){if(typeof(ba.className)==="undefined"||ba.className==null){return[];}return ba.className.split(/\s+/);}function a8(bd,ba){var bc=b(bd);for(var bb=0;bb-1){be[bf.substr(0,ba).trim()]=bf.substr(ba+1);}else{be[bf]="";}}return be;}function aF(bc,bb){var bd=aw(bc);for(var ba in bd){var be=bd[ba];if(ba==bb){return be;}}return null;}function aA(bd,bc,ba){var be=aw(bd);for(var bb in be){var bf=be[bb];if(bb==bc&&bf==ba){return true;}}return false;}function H(bc,bb,ba){var bd=aw(bc);bd[bb]=ba;y(bc,bd);}function ay(bb,ba){var bc=aw(bb);delete bc[ba];y(bb,bc);}function y(bb,bd){var bc=[];for(var ba in bd){bc.push(ba+":"+bd[ba]);}if(bc.length>0){bb.setAttribute("style",bc.join(";"));}else{if(bb.hasAttribute("style")){bb.removeAttribute("style");}}}function C(be,bb){var bc;if(Object.prototype.toString.call(bb)==="[object Array]"){bc=bb;}else{bc=[bb];}for(var bd=0;bd-1){ba.push(be.childNodes[bd]);}}return ba;}function m(bd){var bc=aJ(bd);var be=0;for(var bb=0;bbbe){be=bf.length;}}return be;}function ar(ba){return C(ba,["td","th"]);}function i(be){var bd;for(var ba=0;ba0){return bb;}}return 1;}function aI(ba){if(ba.hasAttribute("rowspan")){var bb=parseInt(ba.getAttribute("rowspan"));if(!isNaN(bb)&&bb>0){return bb;}}return 1;}function aJ(bh){var bc=[];var bi=[null,"tbody","thead","tfoot"];for(var bb=0;bb0){for(var bf=0;bf0){bc.push(bd[bf]);}}return bc;}function p(be){var bf=[];var bd=aJ(be);for(var bc=0;bc0){bc.setAttribute("style",bb);}bc.innerHTML=" ";return bc;}function ah(ba,bc,bb){var bd=aM();if(typeof window["jsplus_"+bd+"_listeners"]==="undefined"){window["jsplus_"+bd+"_listeners"]={};}if(typeof window["jsplus_"+bd+"_listeners"][bc]==="undefined"){window["jsplus_"+bd+"_listeners"][bc]={};}if(typeof window["jsplus_"+bd+"_listeners"][bc][J(ba)]==="undefined"){window["jsplus_"+bd+"_listeners"][bc][J(ba)]=[];}window["jsplus_"+bd+"_listeners"][bc][J(ba)].push((function(){var be=ba;return function(){bb(be);};})());}function g(bb,bc){var bd=aM();if(typeof window["jsplus_"+bd+"_listeners"]!=="undefined"&&typeof window["jsplus_"+bd+"_listeners"][bc]!=="undefined"&&typeof window["jsplus_"+bd+"_listeners"][bc][J(bb)]!="undefined"){for(var ba=0; +babi){bj.setAttribute("colspan",be+1);return;}}var bc="td";if(bh.length>0){bc=bh[bh.length-1].tagName;}else{if(O(bb)){bc="th";}}for(;bf<=bi;bf++){var bg=a(bj.tagName,ba);bb.appendChild(bg);}}function E(bc,bg,bf){var bd=bc.parentNode.tagName=="THEAD"?"th":"td";var bi=m(bg);var ba=N(bg);var bb=window.document.createElement("tr");for(var be=0;be0){bh.setAttribute("style",ba);}bh.innerHTML=" ";bb.appendChild(bh);}if(bf){bc.parentNode.insertBefore(bb,bc);}else{if(bc.nextSibling!=null){bc.parentNode.insertBefore(bb,bc.nextSibling);}else{bc.parentNode.appendChild(bb);}}return bb;}function T(ba,bb){ah(ba,"table_tools",bb);}function aE(ba){g(ba,"table_tools");}function aH(ba){var bb=ba.parentNode;while(bb!=null){if(bb.tagName=="TABLE"){return bb;}bb=bb.parentNode;}return null;}function x(bl){var bk=aJ(bl);var ba=-1;var bj=[];for(var be=0;beA){A=B.length;}}return A;}function f(w){return getElementsByTagNameOnlyChildren(w,["td","th"]);}function n(A){var z;for(var w=0;w0){return x;}}return 1;}function e(w){if(w.hasAttribute("rowspan")){var x=parseInt(w.getAttribute("rowspan"));if(!isNaN(x)&&x>0){return x;}}return 1;}function u(D){var y=[];var E=[null,"tbody","thead","tfoot"];for(var x=0;x0){for(var B=0;B0){y.push(z[B]);}}return y;}function m(A){var B=[];var z=u(A);for(var y=0;y0){y.setAttribute("style",x);}y.innerHTML=" ";return y;}function o(w,y,x){var z=getEditorName();if(typeof window["jsplus_"+z+"_listeners"]==="undefined"){window["jsplus_"+z+"_listeners"]={};}if(typeof window["jsplus_"+z+"_listeners"][y]==="undefined"){window["jsplus_"+z+"_listeners"][y]={};}if(typeof window["jsplus_"+z+"_listeners"][y][getEditorId(w)]==="undefined"){window["jsplus_"+z+"_listeners"][y][getEditorId(w)]=[];}window["jsplus_"+z+"_listeners"][y][getEditorId(w)].push((function(){var A=w;return function(){x(A);};})());}function q(x,y){var z=getEditorName();if(typeof window["jsplus_"+z+"_listeners"]!=="undefined"&&typeof window["jsplus_"+z+"_listeners"][y]!=="undefined"&&typeof window["jsplus_"+z+"_listeners"][y][getEditorId(x)]!="undefined"){for(var w=0;wE){F.setAttribute("colspan",A+1);return;}}var y="td";if(D.length>0){y=D[D.length-1].tagName;}else{if(p(x)){y="th";}}for(;B<=E;B++){var C=l(F.tagName,w);x.appendChild(C);}}function c(y,C,B){var z=y.parentNode.tagName=="THEAD"?"th":"td";var E=s(C);var w=a(C);var x=window.document.createElement("tr");for(var A=0;A0){D.setAttribute("style",w);}D.innerHTML=" ";x.appendChild(D);}if(B){y.parentNode.insertBefore(x,y);}else{if(y.nextSibling!=null){y.parentNode.insertBefore(x,y.nextSibling);}else{y.parentNode.appendChild(x);}}return x;}function d(w,x){o(w,"table_tools",x);}function k(w){q(w,"table_tools");}function r(w){var x=w.parentNode;while(x!=null){if(x.tagName=="TABLE"){return x;}x=x.parentNode;}return null;}function j(H){var G=u(H);var w=-1;var F=[];for(var A=0;AA){A=B.length;}}return A;}function f(w){return getElementsByTagNameOnlyChildren(w,["td","th"]);}function n(A){var z;for(var w=0;w0){return x;}}return 1;}function e(w){if(w.hasAttribute("rowspan")){var x=parseInt(w.getAttribute("rowspan"));if(!isNaN(x)&&x>0){return x;}}return 1;}function u(D){var y=[];var E=[null,"tbody","thead","tfoot"];for(var x=0;x0){for(var B=0;B0){y.push(z[B]);}}return y;}function m(A){var B=[];var z=u(A);for(var y=0;y0){y.setAttribute("style",x);}y.innerHTML=" ";return y;}function o(w,y,x){var z=getEditorName();if(typeof window["jsplus_"+z+"_listeners"]==="undefined"){window["jsplus_"+z+"_listeners"]={};}if(typeof window["jsplus_"+z+"_listeners"][y]==="undefined"){window["jsplus_"+z+"_listeners"][y]={};}if(typeof window["jsplus_"+z+"_listeners"][y][getEditorId(w)]==="undefined"){window["jsplus_"+z+"_listeners"][y][getEditorId(w)]=[];}window["jsplus_"+z+"_listeners"][y][getEditorId(w)].push((function(){var A=w;return function(){x(A);};})());}function q(x,y){var z=getEditorName();if(typeof window["jsplus_"+z+"_listeners"]!=="undefined"&&typeof window["jsplus_"+z+"_listeners"][y]!=="undefined"&&typeof window["jsplus_"+z+"_listeners"][y][getEditorId(x)]!="undefined"){for(var w=0;wE){F.setAttribute("colspan",A+1);return;}}var y="td";if(D.length>0){y=D[D.length-1].tagName;}else{if(p(x)){y="th";}}for(;B<=E;B++){var C=l(F.tagName,w);x.appendChild(C);}}function c(y,C,B){var z=y.parentNode.tagName=="THEAD"?"th":"td";var E=s(C);var w=a(C);var x=window.document.createElement("tr");for(var A=0;A0){D.setAttribute("style",w);}D.innerHTML=" ";x.appendChild(D);}if(B){y.parentNode.insertBefore(x,y);}else{if(y.nextSibling!=null){y.parentNode.insertBefore(x,y.nextSibling);}else{y.parentNode.appendChild(x);}}return x;}function d(w,x){o(w,"table_tools",x);}function k(w){q(w,"table_tools");}function r(w){var x=w.parentNode;while(x!=null){if(x.tagName=="TABLE"){return x;}x=x.parentNode;}return null;}function j(H){var G=u(H);var w=-1;var F=[];for(var A=0;AA){A=B.length;}}return A;}function f(w){return getElementsByTagNameOnlyChildren(w,["td","th"]);}function n(A){var z;for(var w=0;w0){return x;}}return 1;}function e(w){if(w.hasAttribute("rowspan")){var x=parseInt(w.getAttribute("rowspan"));if(!isNaN(x)&&x>0){return x;}}return 1;}function u(D){var y=[];var E=[null,"tbody","thead","tfoot"];for(var x=0;x0){for(var B=0;B0){y.push(z[B]);}}return y;}function m(A){var B=[];var z=u(A);for(var y=0;y0){y.setAttribute("style",x);}y.innerHTML=" ";return y;}function o(w,y,x){var z=getEditorName();if(typeof window["jsplus_"+z+"_listeners"]==="undefined"){window["jsplus_"+z+"_listeners"]={};}if(typeof window["jsplus_"+z+"_listeners"][y]==="undefined"){window["jsplus_"+z+"_listeners"][y]={};}if(typeof window["jsplus_"+z+"_listeners"][y][getEditorId(w)]==="undefined"){window["jsplus_"+z+"_listeners"][y][getEditorId(w)]=[];}window["jsplus_"+z+"_listeners"][y][getEditorId(w)].push((function(){var A=w;return function(){x(A);};})());}function q(x,y){var z=getEditorName();if(typeof window["jsplus_"+z+"_listeners"]!=="undefined"&&typeof window["jsplus_"+z+"_listeners"][y]!=="undefined"&&typeof window["jsplus_"+z+"_listeners"][y][getEditorId(x)]!="undefined"){for(var w=0;wE){F.setAttribute("colspan",A+1);return;}}var y="td";if(D.length>0){y=D[D.length-1].tagName;}else{if(p(x)){y="th";}}for(;B<=E;B++){var C=l(F.tagName,w);x.appendChild(C);}}function c(y,C,B){var z=y.parentNode.tagName=="THEAD"?"th":"td";var E=s(C);var w=a(C);var x=window.document.createElement("tr");for(var A=0;A0){D.setAttribute("style",w);}D.innerHTML=" ";x.appendChild(D);}if(B){y.parentNode.insertBefore(x,y);}else{if(y.nextSibling!=null){y.parentNode.insertBefore(x,y.nextSibling);}else{y.parentNode.appendChild(x);}}return x;}function d(w,x){o(w,"table_tools",x);}function k(w){q(w,"table_tools");}function r(w){var x=w.parentNode;while(x!=null){if(x.tagName=="TABLE"){return x;}x=x.parentNode;}return null;}function j(H){var G=u(H);var w=-1;var F=[];for(var A=0;AA){A=B.length;}}return A;}function f(w){return getElementsByTagNameOnlyChildren(w,["td","th"]);}function n(A){var z;for(var w=0;w0){return x;}}return 1;}function e(w){if(w.hasAttribute("rowspan")){var x=parseInt(w.getAttribute("rowspan"));if(!isNaN(x)&&x>0){return x;}}return 1;}function u(D){var y=[];var E=[null,"tbody","thead","tfoot"];for(var x=0;x0){for(var B=0;B0){y.push(z[B]);}}return y;}function m(A){var B=[];var z=u(A);for(var y=0;y0){y.setAttribute("style",x);}y.innerHTML=" ";return y;}function o(w,y,x){var z=getEditorName();if(typeof window["jsplus_"+z+"_listeners"]==="undefined"){window["jsplus_"+z+"_listeners"]={};}if(typeof window["jsplus_"+z+"_listeners"][y]==="undefined"){window["jsplus_"+z+"_listeners"][y]={};}if(typeof window["jsplus_"+z+"_listeners"][y][getEditorId(w)]==="undefined"){window["jsplus_"+z+"_listeners"][y][getEditorId(w)]=[];}window["jsplus_"+z+"_listeners"][y][getEditorId(w)].push((function(){var A=w;return function(){x(A);};})());}function q(x,y){var z=getEditorName();if(typeof window["jsplus_"+z+"_listeners"]!=="undefined"&&typeof window["jsplus_"+z+"_listeners"][y]!=="undefined"&&typeof window["jsplus_"+z+"_listeners"][y][getEditorId(x)]!="undefined"){for(var w=0;wE){F.setAttribute("colspan",A+1);return;}}var y="td";if(D.length>0){y=D[D.length-1].tagName;}else{if(p(x)){y="th";}}for(;B<=E;B++){var C=l(F.tagName,w);x.appendChild(C);}}function c(y,C,B){var z=y.parentNode.tagName=="THEAD"?"th":"td";var E=s(C);var w=a(C);var x=window.document.createElement("tr");for(var A=0;A0){D.setAttribute("style",w);}D.innerHTML=" ";x.appendChild(D);}if(B){y.parentNode.insertBefore(x,y);}else{if(y.nextSibling!=null){y.parentNode.insertBefore(x,y.nextSibling);}else{y.parentNode.appendChild(x);}}return x;}function d(w,x){o(w,"table_tools",x);}function k(w){q(w,"table_tools");}function r(w){var x=w.parentNode;while(x!=null){if(x.tagName=="TABLE"){return x;}x=x.parentNode;}return null;}function j(H){var G=u(H);var w=-1;var F=[];for(var A=0;AA){A=B.length;}}return A;}function f(w){return getElementsByTagNameOnlyChildren(w,["td","th"]);}function n(A){var z;for(var w=0;w0){return x;}}return 1;}function e(w){if(w.hasAttribute("rowspan")){var x=parseInt(w.getAttribute("rowspan"));if(!isNaN(x)&&x>0){return x;}}return 1;}function u(D){var y=[];var E=[null,"tbody","thead","tfoot"];for(var x=0;x0){for(var B=0;B0){y.push(z[B]);}}return y;}function m(A){var B=[];var z=u(A);for(var y=0;y0){y.setAttribute("style",x);}y.innerHTML=" ";return y;}function o(w,y,x){var z=getEditorName();if(typeof window["jsplus_"+z+"_listeners"]==="undefined"){window["jsplus_"+z+"_listeners"]={};}if(typeof window["jsplus_"+z+"_listeners"][y]==="undefined"){window["jsplus_"+z+"_listeners"][y]={};}if(typeof window["jsplus_"+z+"_listeners"][y][getEditorId(w)]==="undefined"){window["jsplus_"+z+"_listeners"][y][getEditorId(w)]=[];}window["jsplus_"+z+"_listeners"][y][getEditorId(w)].push((function(){var A=w;return function(){x(A);};})());}function q(x,y){var z=getEditorName();if(typeof window["jsplus_"+z+"_listeners"]!=="undefined"&&typeof window["jsplus_"+z+"_listeners"][y]!=="undefined"&&typeof window["jsplus_"+z+"_listeners"][y][getEditorId(x)]!="undefined"){for(var w=0;wE){F.setAttribute("colspan",A+1);return;}}var y="td";if(D.length>0){y=D[D.length-1].tagName;}else{if(p(x)){y="th";}}for(;B<=E;B++){var C=l(F.tagName,w);x.appendChild(C);}}function c(y,C,B){var z=y.parentNode.tagName=="THEAD"?"th":"td";var E=s(C);var w=a(C);var x=window.document.createElement("tr");for(var A=0;A0){D.setAttribute("style",w);}D.innerHTML=" ";x.appendChild(D);}if(B){y.parentNode.insertBefore(x,y);}else{if(y.nextSibling!=null){y.parentNode.insertBefore(x,y.nextSibling);}else{y.parentNode.appendChild(x);}}return x;}function d(w,x){o(w,"table_tools",x);}function k(w){q(w,"table_tools");}function r(w){var x=w.parentNode;while(x!=null){if(x.tagName=="TABLE"){return x;}x=x.parentNode;}return null;}function j(H){var G=u(H);var w=-1;var F=[];for(var A=0;AA){A=B.length;}}return A;}function f(w){return getElementsByTagNameOnlyChildren(w,["td","th"]);}function n(A){var z;for(var w=0;w0){return x;}}return 1;}function e(w){if(w.hasAttribute("rowspan")){var x=parseInt(w.getAttribute("rowspan"));if(!isNaN(x)&&x>0){return x;}}return 1;}function u(D){var y=[];var E=[null,"tbody","thead","tfoot"];for(var x=0;x0){for(var B=0;B0){y.push(z[B]);}}return y;}function m(A){var B=[];var z=u(A);for(var y=0;y0){y.setAttribute("style",x);}y.innerHTML=" ";return y;}function o(w,y,x){var z=getEditorName();if(typeof window["jsplus_"+z+"_listeners"]==="undefined"){window["jsplus_"+z+"_listeners"]={};}if(typeof window["jsplus_"+z+"_listeners"][y]==="undefined"){window["jsplus_"+z+"_listeners"][y]={};}if(typeof window["jsplus_"+z+"_listeners"][y][getEditorId(w)]==="undefined"){window["jsplus_"+z+"_listeners"][y][getEditorId(w)]=[];}window["jsplus_"+z+"_listeners"][y][getEditorId(w)].push((function(){var A=w;return function(){x(A);};})());}function q(x,y){var z=getEditorName();if(typeof window["jsplus_"+z+"_listeners"]!=="undefined"&&typeof window["jsplus_"+z+"_listeners"][y]!=="undefined"&&typeof window["jsplus_"+z+"_listeners"][y][getEditorId(x)]!="undefined"){for(var w=0;wE){F.setAttribute("colspan",A+1);return;}}var y="td";if(D.length>0){y=D[D.length-1].tagName;}else{if(p(x)){y="th";}}for(;B<=E;B++){var C=l(F.tagName,w);x.appendChild(C);}}function c(y,C,B){var z=y.parentNode.tagName=="THEAD"?"th":"td";var E=s(C);var w=a(C);var x=window.document.createElement("tr");for(var A=0;A0){D.setAttribute("style",w);}D.innerHTML=" ";x.appendChild(D);}if(B){y.parentNode.insertBefore(x,y);}else{if(y.nextSibling!=null){y.parentNode.insertBefore(x,y.nextSibling);}else{y.parentNode.appendChild(x);}}return x;}function d(w,x){o(w,"table_tools",x);}function k(w){q(w,"table_tools");}function r(w){var x=w.parentNode;while(x!=null){if(x.tagName=="TABLE"){return x;}x=x.parentNode;}return null;}function j(H){var G=u(H);var w=-1;var F=[];for(var A=0;A'+'
'+'
'+'
'+''+'X'+""+"
"+'
'+'
'+"
"+'"+"
"+"";JSDialog.Config.templateButton='';JSDialog.Config.templateBg='
';JSDialog.Config.classButton="cke_dialog_ui_button";JSDialog.Config.classButtonOk="cke_dialog_ui_button_ok";JSDialog.Config.contentBorders=[3,1,15,1,65];CKEDITOR.skin.loadPart("dialog");x(document,".jsdialog_plugin_jsplus_bootstrap_table_new.jsdialog_bg { background-color: white; opacity: 0.5; position: fixed; left: 0; top: 0; width: 100%; height: 3000px; z-index: 11111; display: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_new.jsdialog_dlg { font-family: Arial; padding: 0; position: fixed; z-index: 11112; background-color: white; border-radius: 5px; overflow:hidden; display: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_new.jsdialog_show { display: block; }"+".jsdialog_plugin_jsplus_bootstrap_table_new .jsdialog_message_contents { font-size: 16px; padding: 10px 0 10px 7px; display: table; overflow: hidden; }"+".jsdialog_plugin_jsplus_bootstrap_table_new .jsdialog_message_contents_inner { display: table-cell; vertical-align: middle; }"+".jsdialog_plugin_jsplus_bootstrap_table_new .jsdialog_message_icon { padding-left: 100px; min-height: 64px; background-position: 10px 10px; background-repeat: no-repeat; box-sizing: content-box; }"+".jsdialog_plugin_jsplus_bootstrap_table_new .jsdialog_message_icon_info { background-image: url(img/info.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_new .jsdialog_message_icon_warning { background-image: url(img/warning.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_new .jsdialog_message_icon_error { background-image: url(img/error.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_new .jsdialog_message_icon_confirm { background-image: url(img/confirm.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_new .cke_dialog_contents { margin-top: 0; border-top: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_new .cke_dialog_footer div { outline: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_new .cke_dialog_footer_buttons > .cke_dialog_ui_button { margin-right: 5px; }"+".jsdialog_plugin_jsplus_bootstrap_table_new .cke_dialog_footer_buttons > .cke_dialog_ui_button:last-child { margin-right: 0; }"+".jsdialog_plugin_jsplus_bootstrap_table_new .cke_dialog_title { cursor: default; }"+".jsdialog_plugin_jsplus_bootstrap_table_new .cke_dialog_contents { padding: 0; }"); +}var m=21;var k=null;var j=null;var i=[];var av;var aw;var ap;var D="";var y="";var B="";var aj={};if(m==20||m==21||m==22){t("use_dialog",false);t("show_options",true);t("show_advanced_options",true);if(m==20){t("default_width_100",false);}t("default_add_header",false);t("default_class","");t("default_style","");if(m==21){t("default_striped",true);t("default_bordered",false);t("default_condensed",false);}i=[];var T="border:1px solid rgb(171, 207, 255);background-color:rgb(195, 217, 255)";if(m==21){T="border:1px solid #6f5499;background-color:#9174C0";}else{if(m==22){T="border:1px solid #007095;background-color:#008cba";}}for(var al=0;al<6;al++){for(var F=0;F<6;F++){i.push(['
',F+","+al,"table"]);}}D=''+""+""+'"+'"+""+""+"
';B="'+(m==20?'
':"")+'
'+(m==21?'
'+'
'+'
':"")+'
'+'
'+'
'+"
"+"
";if(m==20){aj["width_100"]=true;}aj["add_header"]=false;aj["class"]="";aj["style"]="";if(m==21){aj["striped"]=true;aj["bordered"]=false;aj["condensed"]=false;}}else{if(m==3){t("use_dialog",false);X("jsplus_bootstrap_table_new",[]);t("popup_width",400);t("dialog_width",400);t("dialog_height",400);}else{if(m==0){t("use_dialog",false);av=360;aw=384;ap=335;i=[['','

33%

67%

',"html"],['','

50%

50%

',"html"],['','

67%

33%

',"html"],['','

25%

25%

50%

',"html"],['','

25%

25%

25%

25%

',"html"],['','

50%

25%

25%

',"html"],['','

Text text text

',"html"],['','

25%

50%

25%

',"html"],['','

Text text text

',"html"]]; +}else{if(m==1){t("use_dialog",false);t("default_col_type","xs");av=660;aw=675;ap=215;aj["col-type"]="xs";D=''+""+""+'"+'"+'"+""+""+"
'+'
Columns:
'+'
Rows:
'+"
';B="'+'
Column type:
'+'
'+'"+"
"+'
'+'"+"
"+'
'+'"+"
"+'
'+'"+"
"+'
'+'"+"
"+"
";i=[['
1
','

col-xs-1

',"html"],['
2
','

col-xs-2

',"html"],['
3
','

col-xs-3

',"html"],['
4
','

col-xs-4

',"html"],['
5
','

col-xs-5

',"html"],['
6
','

col-xs-6

',"html"],['
7
','

col-xs-7

',"html"],['
8
','

col-xs-8

',"html"],['
9
','

col-xs-9

',"html"],['
10
','

col-xs-10

',"html"],['
11
','

col-xs-11

',"html"],['
12
','

col-xs-12

',"html"],['
6 / 6
','

col-xs-6

col-xs-6

',"html"],['
4 / 4 / 4
','

col-xs-4

col-xs-4

col-xs-4

',"html"],['
3 / 3 / 3 / 3
','

col-xs-3

col-xs-3

col-xs-3

col-xs-3

',"html"],['
9 / 3
','

col-xs-9

col-xs-3

',"html"],['
3 / 9
','

col-xs-3

col-xs-9

',"html"],['
8 / 4
','

col-xs-8

col-xs-4

',"html"],['
12
','

col-xs-12

',"html"],['
4 / 8
','

col-xs-4

col-xs-8

',"html"],['
7 / 5
','

col-xs-7

col-xs-5

',"html"],['
5 / 7
','

col-xs-5

col-xs-7

',"html"],['
6 / 3 / 3
','

col-xs-6

col-xs-3

col-xs-3

',"html"],['
3 / 6 / 3
','

col-xs-3

col-xs-6

col-xs-3

',"html"],['
3 / 3 / 6
','

col-xs-3

col-xs-3

col-xs-6

',"html"],['
0
','
',"html"],]; +}else{if(m==2){t("use_dialog",false);t("default_col_type","small");av=660;aw=675;ap=215;aj["col-type"]="small";D=''+""+""+'"+'
'+'
Columns:
'+'
Rows:
'+"
';B=''+'
Column type:

'+''+''+''+"
";i=[['
1
','
col-1
',"html"],['
2
','
col-2
',"html"],['
3
','
col-3
',"html"],['
4
','
col-4
',"html"],['
5
','
col-5
',"html"],['
6
','
col-6
',"html"],['
7
','
col-7
',"html"],['
8
','
col-8
',"html"],['
9
','
col-9
',"html"],['
10
','
col-10
',"html"],['
11
','
col-11
',"html"],['
12
','
col-12
',"html"],['
6 / 6
','
col-6
col-6
',"html"],['
4 / 4 / 4
','
col-4
col-4
col-4
',"html"],['
3 / 3 / 3 / 3
','
col-3
col-3
col-3
col-3
',"html"],['
9 / 3
','
col-9
col-3
',"html"],['
3 / 9
','
col-3
col-9
',"html"],['
8 / 4
','
col-8
col-4
',"html"],['
12
','
col-12
',"html"],['
4 / 8
','
col-4
col-8
',"html"],['
7 / 5
','
col-7
col-5
',"html"],['
5 / 7
','
col-5
col-7
',"html"],['
6 / 3 / 3
','
col-6
col-3
col-3
',"html"],['
3 / 6 / 3
','
col-3
col-6
col-3
',"html"],['
3 / 3 / 6
','
col-3
col-3
col-6
',"html"],['
0
','
',"html"],]; +}else{if(m==10){t("use_dialog",false);av=345;aw=370;ap=360;i=[['
'+'
'+'Success! Your request was finished successfully.'+"
"+"
",'
'+"Success! Your request was finished successfully."+"
","html"],['
'+'
'+'Info. Here are details for your query.'+"
"+"
",'
'+"Info. Here are details for your query."+"
","html"],['
'+'
'+'Warning! Are you sure you want to proceed?'+"
"+"
",'
'+"Warning! Are you sure you want to proceed?"+"
","html"],['
'+'
'+'Danger! System state is critical, check the configuration!'+"
"+"
",'
'+"Danger! System state is critical, check the configuration!"+"
","html"],['
'+'
'+'Message. Lorem ipsum dolor sit amet, consectetur.'+"
"+"
",'
'+"Message. Lorem ipsum dolor sit amet, consectetur."+"
","html"]];}else{if(m==11){t("use_dialog",false);av=400;aw=420;ap=300;i=[['
Success! Your request was finished successfully
','',"html"],['
Info. Here are details for your query.
','',"html"],['
Warning! Are you sure you want to proceed?
','',"html"],['
Danger! System state is critical, check the configuration!
','',"html"]]; +}else{if(m==12){av=345;aw=370;ap=300;i=[['
Success! Your request was finished successfully
','',"html"],['
Info. Here are details for your query.
','',"html"],['
Warning! Are you sure you want to proceed?
','',"html"],['
Danger! System state is critical, check the configuration!
','',"html"],['
Message. Lorem ipsum dolor sit amet, consectetur.
','',"html"]];}}}}}}}}function d(aG){var aF="-"+C(aG);var aE=document.getElementById("jsplus_bootstrap_table_new-dialog-root"+aF);if(aE!=null&&aE.children.length==0){aE.innerHTML="";}aE=j.getElementById("jsplus_bootstrap_table_new-popup-root"+aF);aE.innerHTML=y.replace(/%id%/g,C(aG)).replace(/\{\{([^}]*)\}\}/g,function(aI,aH){return u(aG,aH);});e(aG,aE.ownerDocument);}function z(aH){var aF=document.getElementsByClassName("jsplus_bootstrap_table_new-selected");var aG=null;for(var aE=0;aE '+aj["col-type"].toUpperCase(),'jsplus_bootstrap_table_new_radio_%id%" checked/> '+aj["col-type"].toUpperCase());}else{if(m==2){if(["small","medium","large"].indexOf(V(aF,"default_col_type").toLowerCase())!=-1){aj["col-type"]=V(aF,"default_col_type").toLowerCase();}}else{if(m==10){}else{if(m==11){}else{if(m==12){}}}}}}}y="";for(var aE=0;aE'+i[aE][0].replace(/\{path\}/g,ax(aF))+"";}if(m==20||m==21||m==22){D=D.replace(/%table_width%/g,tableWidth);B=B.replace(/%options_width%/g,optionsWidth);}y='"+'
'+y+"
";}function s(aE,aF){K(aE,aF);ag(aE);}function W(aG,aH){var aF=document.getElementsByClassName("jsplus_bootstrap_table_new-template-"+C(aG));for(var aE=0;aE1){aJ=i[aG][1].slice(0);if(i[aG].length>2){aN=i[aG][2];}}if(Object.prototype.toString.call(aJ)==="[object Array]"){for(var aH=0;aH0){aQ.push(aj["class"].trim());}if(ak()=="ckeditor"){aQ.push("cke_show_border");}var aP=aj["style"].trim();if(m==20&&aj["width_100"]){if(aP.length>0&&aP.substr(aP.length-1,1)!=";"){aP+="; ";}aP+="width: 100%";}aJ="0?(" class='"+aQ.join(" ")+"'"):"")+(aP.length>0?(" style='"+aP+"'"):"")+">\n";if(aj["add_header"]){aJ+="\t\n\t\t\n";for(var aH=0;aH<=aF;aH++){aJ+="\t\t\t \n";}aJ+="\t\t\n\t\n";}aJ+="\t\n";for(var aE=0;aE<=aR;aE++){aJ+="\t\t\n";for(var aM=0;aM<=aF;aM++){aJ+="\t\t\t \n";}aJ+="\t\t\n";}aJ+="\t\n";aJ+="\n";ar(aL,aJ);}else{if(aN=="text"){ar(aL,""+aJ+"");}else{if(aN=="html"){if(m==1){if(aj["col-type"]=="sm"){aJ=aJ.replace(/col-xs/g,"col-sm");}else{if(aj["col-type"]=="md"){aJ=aJ.replace(/col-xs/g,"col-md");}else{if(aj["col-type"]=="lg"){aJ=aJ.replace(/col-xs/g,"col-lg");}else{if(aj["col-type"]=="xl"){aJ=aJ.replace(/col-xs/g,"col-xl");}}}}}else{if(m==2){if(aj["col-type"]!="small"){aJ=aJ.replace(/small/g,aj["col-type"]);}}}ao(aL,aJ,aO);}}}}function ao(aF,aE,aG){if(typeof(aG)=="undefined"||aG==null){ar(aF,aE);}else{o(aF,aG,aE);}}function I(aE,aI,aG){if(typeof aI=="undefined"){aI=true;}if(typeof aG=="undefined"){aG=" ";}if(typeof(aE)=="undefined"){return"";}var aJ=1000;if(aE=aJ);return aE.toFixed(1)+aG+aF[aH]+(aI?"b":"");}function ad(aE){return aE.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'");}function au(aE){return aE.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");}function ai(aE){var aF=document.createElement("div");aF.innerHTML=aE;return aF.childNodes;}function aq(aE){return aE.getElementsByTagName("head")[0];}function an(aE){return aE.getElementsByTagName("body")[0];}function aA(aG,aI){var aE=aG.getElementsByTagName("link");var aH=false;for(var aF=aE.length-1;aF>=0;aF--){if(aE[aF].href==aI){aE[aF].parentNode.removeChild(aE[aF]);}}}function ab(aH,aJ){if(!aH){return;}var aE=aH.getElementsByTagName("link");var aI=false;for(var aF=0;aF-1){aF.splice(aF.indexOf(aE),1);}var aH=aF.join(" ").trim();if(aH.length>0){aG.className=aH;}else{if(aG.hasAttribute("class")){aG.removeAttribute("class");}}}function a(aE){if(typeof(aE.className)==="undefined"||aE.className==null){return[];}return aE.className.split(/\s+/);}function aD(aH,aE){var aG=a(aH);for(var aF=0;aF-1){aI[aJ.substr(0,aE).trim()]=aJ.substr(aE+1);}else{aI[aJ]="";}}return aI;}function ah(aG,aF){var aH=Z(aG);for(var aE in aH){var aI=aH[aE];if(aE==aF){return aI;}}return null;}function ac(aH,aG,aE){var aI=Z(aH);for(var aF in aI){var aJ=aI[aF]; +if(aF==aG&&aJ==aE){return true;}}return false;}function A(aG,aF,aE){var aH=Z(aG);aH[aF]=aE;r(aG,aH);}function aa(aF,aE){var aG=Z(aF);delete aG[aE];r(aF,aG);}function r(aF,aH){var aG=[];for(var aE in aH){aG.push(aE+":"+aH[aE]);}if(aG.length>0){aF.setAttribute("style",aG.join(";"));}else{if(aF.hasAttribute("style")){aF.removeAttribute("style");}}}function w(aI,aF){var aG;if(Object.prototype.toString.call(aF)==="[object Array]"){aG=aF;}else{aG=[aF];}for(var aH=0;aH-1){aE.push(aI.childNodes[aH]);}}return aE;}function ag(){}function o(aF,aG,aE){CKEDITOR.tools.callFunction(aG,aE);}CKEDITOR.plugins.add("jsplus_bootstrap_table_new",{requires:"panelbutton,floatpanel",lang:"en",afterInit:function(aF){P(aF);y=(D+y+B);CKEDITOR.dialog.add("jsplus_bootstrap_table_new-"+C(aF),function(aG){return{resizable:0,width:aw,minWidth:aw,height:ap,maxHeight:ap,title:u(aG,"jsplus_bootstrap_table_new_title"),onShow:function(){J(aG);},onOk:function(){z(aG);},onCancel:function(){az(aG);},contents:[{id:"jsplus_bootstrap_table_new-tab-"+C(aG),expand:true,focus:true,elements:[{type:"vbox",padding:10,children:[{type:"html",html:'
'}]}]}]};});if(H(aF)){var aE=aF.addCommand("jsplus_bootstrap_table_new-"+C(aF),new CKEDITOR.dialogCommand("jsplus_bootstrap_table_new-"+C(aF)));aF.ui.addButton("jsplus_bootstrap_table_new",{label:u(aF,"jsplus_bootstrap_table_new_title"),title:u(aF,"jsplus_bootstrap_table_new_title"),icon:this.path+"/icons/jsplus_bootstrap_table_new.png",command:"jsplus_bootstrap_table_new-"+C(aF)});}else{aF.ui.add("jsplus_bootstrap_table_new",CKEDITOR.UI_PANELBUTTON,{icon:this.path+"icons/jsplus_bootstrap_table_new.png",label:u(aF,"jsplus_bootstrap_table_new_title"),command:"jsplus_bootstrap_table_new",modes:{wysiwyg:1},editorFocus:0,caption:null,table:null,panel:{css:CKEDITOR.skin.getPath("editor"),attributes:{role:"listbox","aria-label":""}},onBlock:function(aG,aI){aI.autoSize=true;aI.element.addClass("cke_colorblock");k=aG;j=aI.element.getDocument().$;var aH=new CKEDITOR.dom.element("div");aH.$.setAttribute("id","jsplus_bootstrap_table_new-popup-root-"+C(aF));aH.$.setAttribute("style",((typeof(av)=="undefined"&&av!=null)?"":"width:"+av+"px;")+"padding:10px");aI.element.append(aH);CKEDITOR.ui.fire("ready",this);},onOpen:function(){d(aF);}});}}});})(); \ No newline at end of file diff --git a/libraries/ckeditor/plugins/jsplus_bootstrap_table_row_conf/icons/jsplus_bootstrap_table_row_conf.png b/libraries/ckeditor/plugins/jsplus_bootstrap_table_row_conf/icons/jsplus_bootstrap_table_row_conf.png new file mode 100644 index 0000000..4fc7366 Binary files /dev/null and b/libraries/ckeditor/plugins/jsplus_bootstrap_table_row_conf/icons/jsplus_bootstrap_table_row_conf.png differ diff --git a/libraries/ckeditor/plugins/jsplus_bootstrap_table_row_conf/lang/en.js b/libraries/ckeditor/plugins/jsplus_bootstrap_table_row_conf/lang/en.js new file mode 100644 index 0000000..6280382 --- /dev/null +++ b/libraries/ckeditor/plugins/jsplus_bootstrap_table_row_conf/lang/en.js @@ -0,0 +1 @@ +CKEDITOR.plugins.setLang('jsplus_bootstrap_table_row_conf', 'en', { jsplus_edit_tag_title: 'Edytuj tag', jsplus_tag_conf_title: 'Parametry tagu', jsplus_table_conf_title: 'Ustawienia tabeli', jsplus_bootstrap_table_conf_title: 'Ustawienia tabeli Bootstrap', jsplus_foundation_table_conf_title: 'Ustawienia tabeli Foundation', jsplus_table_row_conf_title: 'Ustawienia wiersza tabeli', jsplus_bootstrap_table_row_conf_title: 'Ustawienia wiersza tabeli Bootstrap', jsplus_foundation_table_row_conf_title: 'Ustawienia wiersza tabeli Foundation', jsplus_table_cell_conf_title: 'Ustawienia komórki tabeli', jsplus_bootstrap_table_cell_conf_title: 'Ustawienia komórki tabeli Bootstrap', jsplus_foundation_table_cell_conf_title: 'Ustawienia komórki tabeli Foundation', jsplus_table_col_conf_title: 'Ustawienia kolumny tabeli', jsplus_bootstrap_table_col_conf_title: 'Ustawienia kolumny tabeli Bootstrap', jsplus_foundation_table_col_conf_title: 'Ustawienia kolumny tabeli Foundation', dirty_class: 'Niektóre elementy mają różne wartości dla parametru klasa. Kliknij, aby ustawić jedną wspólną klasę dla nich wszystkich.', dirty_style: 'Niektóre elementy mają różne wartości dla parametru styl. Kliknij, aby ustawić jeden wspólny styl dla nich wszystkich.', dirty_attr: 'Niektóre elementy mają różne wartości dla parametru atrybut. Kliknij, aby ustawić jedną wspólny artybut dla nich wszystkich.', tag_name: 'Nazwa tagu', apply_features: 'Zastosuj funkcje', caption: 'Opis', cells_horizontal_align: 'Wyrównanie w poziomie w komórkach', cells_vertical_align: 'Wyrównanie w pionie w komórkach', do_not_change: 'Nie zmieniaj', def: 'Domyślnie', left: 'Do lewej', center: 'Do środka', middle: 'Do środka', right: 'Do prawej', top: 'Do góry', bottom: 'Do dołu', header: 'Nagłówek', added: 'Dodaj', removed: 'Usuń', quick_styling: 'Szybkie style', width_100: 'szerokość 100%', border: 'Ramka', none: 'brak', black: 'czarny', silver: 'srebrny', white: 'biały', font_color: 'Kolor czcionki', gray: 'szary', background_color: 'Kolor tła', transparent: 'brak', align_table: 'Wyrównanie tabeli', jsplus_bootstrap_table_conf_striped: 'Pasiasta', jsplus_bootstrap_table_conf_bordered: 'Z ramką', jsplus_bootstrap_table_conf_condensed: 'Zagęszczona', enable: 'Aktywna', disable: 'Nieaktywna', classes: 'Klasy', styles: 'Style', attributes: 'Atrybuty', desc_classes: 'Jedna klasa w linii', desc_styles: 'Pary nazwa:wartość', desc_attrs: 'Wyłączając klasy i style', del: 'Usuń', add: 'Dodaj', btn_ok: "Zatwierdź", btn_cancel: "Anuluj" } ); \ No newline at end of file diff --git a/libraries/ckeditor/plugins/jsplus_bootstrap_table_row_conf/lang/ru.js b/libraries/ckeditor/plugins/jsplus_bootstrap_table_row_conf/lang/ru.js new file mode 100644 index 0000000..5ee33cf --- /dev/null +++ b/libraries/ckeditor/plugins/jsplus_bootstrap_table_row_conf/lang/ru.js @@ -0,0 +1 @@ +CKEDITOR.plugins.setLang('jsplus_bootstrap_table_row_conf', 'en', { jsplus_edit_tag_title: 'Редактировать тег', jsplus_tag_conf_title: 'Параметры тега', jsplus_table_conf_title: 'Настройка таблицы', jsplus_bootstrap_table_conf_title: 'Настройка Bootstrap таблицы', jsplus_foundation_table_conf_title: 'Настройка Foundation таблицы', jsplus_table_row_conf_title: 'Настройка строки таблицы', jsplus_bootstrap_table_row_conf_title: 'Настройка строки Bootstrap таблицы', jsplus_foundation_table_row_conf_title: 'Настройка строки Foundation таблицы', jsplus_table_cell_conf_title: 'Настройка ячейки таблицы', jsplus_bootstrap_table_cell_conf_title: 'Настройка ячейки Bootstrap таблицы', jsplus_foundation_table_cell_conf_title: 'Настройка ячейки Foundation таблицы', jsplus_table_col_conf_title: 'Настройка ячеек колонки таблицы', jsplus_bootstrap_table_col_conf_title: 'Настройка ячеек колонки Bootstrap таблицы', jsplus_foundation_table_col_conf_title: 'Настройка ячеек колонки Foundation таблицы', dirty_class: 'Значения этого класса различаются у нескольких элементов. Кликните, чтобы задать единый класс.', dirty_style: 'Значения этого стиля различаются у нескольких элементов. Кликните, чтобы задать единый стиль.', dirty_attr: 'Значения этого атрибута различаются у нескольких элементов. Кликните, чтобы задать единое значение атрибута.', tag_name: 'Имя тега', apply_features: 'Применить свойства', caption: 'Заголовок', cells_horizontal_align: 'Гризонтальное выравнивание в ячейках', cells_vertical_align: 'Вертикальное выравнивание в ячейках', do_not_change: 'Не менять', def: 'По умолчанию', left: 'Слева', center: 'По центру', middle: 'По центру', right: 'Справа', top: 'Сверху', bottom: 'Снизу', header: 'Шапка', added: 'Добавлен', removed: 'Удалён', quick_styling: 'Быстрая стилизация', width_100: '100% ширина', border: 'Стиль рамки', none: 'Нет', black: 'Черный', silver: 'Светло-серый', white: 'Белый', font_color: 'Цвет шрифта', gray: 'Серый', background_color: 'Цвет фона', transparent: 'Прозрачный', align_table: 'Выравнивание таблицы', jsplus_bootstrap_table_striped: 'Полосатая', jsplus_bootstrap_table_bordered: 'С границами', jsplus_bootstrap_table_condensed: 'Компактная', enable: 'Да', disable: 'Нет', classes: 'Классы', styles: 'Стили', attributes: 'Атрибуты', desc_classes: 'Один класс на строку', desc_styles: 'Пары ключ:значение', desc_attrs: 'Кроме "class" и "style"', del: 'Удалить', add: 'Добавить', btn_ok: "OK", btn_cancel: "Отмена" } ); \ No newline at end of file diff --git a/libraries/ckeditor/plugins/jsplus_bootstrap_table_row_conf/plugin.js b/libraries/ckeditor/plugins/jsplus_bootstrap_table_row_conf/plugin.js new file mode 100644 index 0000000..d2f979e --- /dev/null +++ b/libraries/ckeditor/plugins/jsplus_bootstrap_table_row_conf/plugin.js @@ -0,0 +1,9 @@ +(function(){function aM(){return"ckeditor";}function j(ba){return ba.elementMode==3;}function J(ba){return ba.name.replace(/\[/,"_").replace(/\]/,"_");}function o(ba){return ba.container.$;}function e(ba){return ba.document.$;}function ac(ba){return ba.getSnapshot();}function ag(bb,ba){bb.loadSnapshot(ba);}function av(bb){if(bb.getSelection()==null){return null;}var ba=bb.getSelection().getStartElement();if(ba&&ba.$){return ba.$;}return null;}function am(){return CKEDITOR.basePath;}function a1(){return k("jsplus_bootstrap_table_row_conf");}function k(ba){return CKEDITOR.plugins.getPath(ba);}function Z(){return CKEDITOR.version.charAt(0)=="3"?3:4;}function A(bc,bb){if(Z()==3){var ba=(bb.indexOf("jsplus_bootstrap_table_row_conf_")==-1)?("jsplus_bootstrap_table_row_conf_"+bb):bb;if(typeof(bc.lang[ba])!=="undefined"){return bc.lang[ba];}else{console.log("(v3) editor.lang['jsplus_bootstrap_table_row_conf'] not defined");}}else{if(typeof(bc.lang["jsplus_bootstrap_table_row_conf"])!=="undefined"){if(typeof(bc.lang["jsplus_bootstrap_table_row_conf"][bb])!=="undefined"){return bc.lang["jsplus_bootstrap_table_row_conf"][bb];}else{console.log("editor.lang['jsplus_bootstrap_table_row_conf']['"+bb+"'] not defined");}}else{console.log("editor.lang['jsplus_bootstrap_table_row_conf'] not defined");}}return"";}function ao(bb,ba){return al(bb,"jsplus_bootstrap_table_row_conf_"+ba);}function al(bb,ba){var bc=bb.config[ba];return bc;}function z(ba,bb){au("jsplus_bootstrap_table_row_conf_"+ba,bb);}function au(ba,bb){CKEDITOR.config[ba]=bb;}function aX(bc,bb){var ba=CKEDITOR.dom.element.createFromHtml(bb);bc.insertElement(ba);}function w(){return"";}var ai=0;var L=1;var Y=2;function u(ba,bd,bb){var bc=null;if(bb==ai){bc=CKEDITOR.TRISTATE_DISABLED;}else{if(bb==L){bc=CKEDITOR.TRISTATE_OFF;}else{if(bb==Y){bc=CKEDITOR.TRISTATE_ON;}}}if(bc!=null&&ba.ui&&ba.ui.get(bd)){ba.ui.get(bd).setState(bc);}}function ad(ba,bb){ba.on("selectionChange",function(bc){bb(bc.editor);});}function K(bb,ba,bc){if(ba=="beforeGetOutputHTML"){bb.on("toDataFormat",function(bd){return bc(bb,bd.data.dataValue);},null,null,4);return;}bb.on(ba,(function(){var bd=bb;return function(){bc(bd);};})());}function B(bc,ba,bf,bd,be,bb){bc.addCommand(ba,{exec:be});bc.ui.addButton(ba,{title:A(bc,bd.replace(/^jsplus_/,"")),label:A(bc,bd.replace(/^jsplus_/,"")),icon:a1()+"icons/"+bf+".png",command:bf});}function v(ba){return ba.mode=="wysiwyg";}function aD(bb,ba,bc){CKEDITOR.plugins.add(bb,{icons:bb,lang:ba,init:function(bd){bc(bd);}});}function f(){JSDialog.Config.skin=null;JSDialog.Config.templateDialog='
'+'
'+'
'+'
'+''+'X'+""+"
"+'
'+'
'+"
"+'"+"
"+"
";JSDialog.Config.templateButton='';JSDialog.Config.templateBg='
';JSDialog.Config.classButton="cke_dialog_ui_button";JSDialog.Config.classButtonOk="cke_dialog_ui_button_ok";JSDialog.Config.contentBorders=[3,1,15,1,65];CKEDITOR.skin.loadPart("dialog");D(document,".jsdialog_plugin_jsplus_bootstrap_table_row_conf.jsdialog_bg { background-color: white; opacity: 0.5; position: fixed; left: 0; top: 0; width: 100%; height: 3000px; z-index: 11111; display: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_conf.jsdialog_dlg { font-family: Arial; padding: 0; position: fixed; z-index: 11112; background-color: white; border-radius: 5px; overflow:hidden; display: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_conf.jsdialog_show { display: block; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_conf .jsdialog_message_contents { font-size: 16px; padding: 10px 0 10px 7px; display: table; overflow: hidden; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_conf .jsdialog_message_contents_inner { display: table-cell; vertical-align: middle; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_conf .jsdialog_message_icon { padding-left: 100px; min-height: 64px; background-position: 10px 10px; background-repeat: no-repeat; box-sizing: content-box; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_conf .jsdialog_message_icon_info { background-image: url(img/info.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_row_conf .jsdialog_message_icon_warning { background-image: url(img/warning.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_row_conf .jsdialog_message_icon_error { background-image: url(img/error.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_row_conf .jsdialog_message_icon_confirm { background-image: url(img/confirm.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_row_conf .cke_dialog_contents { margin-top: 0; border-top: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_conf .cke_dialog_footer div { outline: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_conf .cke_dialog_footer_buttons > .cke_dialog_ui_button { margin-right: 5px; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_conf .cke_dialog_footer_buttons > .cke_dialog_ui_button:last-child { margin-right: 0; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_conf .cke_dialog_title { cursor: default; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_conf .cke_dialog_contents { padding: 0; }"); +}function aG(){var ba=false;if(ba){var be=window.location.hostname;var bd=0;var bb;var bc;if(be.length!=0){for(bb=0,l=be.length;bb',parseValuesFromElement:function(bc){I["features_initial"].tag_name=bc.tagName.toLowerCase();},setGUIByValues:function(bc){window.document.getElementById("jsplus_bootstrap_table_row_conf_feature_tag_name_"+J(bc)).value=I["features_initial"].tag_name;},parseValuesFromGUI:function(bc){I["features_current"].tag_name=window.document.getElementById("jsplus_bootstrap_table_row_conf_feature_tag_name_"+J(bc)).value;},apply:function(bd){if(I["features_initial"].tag_name==I["features_current"].tag_name.toLowerCase()){return;}if(I["features_current"].tag_name.length>0){var be=document.createElement(I["features_current"].tag_name);for(var bc=0;bc'+'"+'"+"",parseValuesFromElement:function(be){var bd=C(be,"thead");var bc=bd.length>0;I["features_initial"].header=bc;},setGUIByValues:function(bc){window.document.getElementById("jsplus_bootstrap_table_row_conf_feature_header_"+J(bc)).value=I["features_initial"].header?"added":"removed";},parseValuesFromGUI:function(bc){I["features_current"].header=window.document.getElementById("jsplus_bootstrap_table_row_conf_feature_header_"+J(bc)).value=="added";},apply:function(bg){if(I["features_initial"].header==I["features_current"].header){return;}if(I["features_current"].header===true){var bi=bg.ownerDocument;var bd=bi.createElement("thead");var bc=bi.createElement("tr");bd.appendChild(bc);var bh=m(bg);for(var bf=0;bf',parseValuesFromElement:function(be){var bc=C(be,"caption");var bd=bc.length>0;I["features_initial"].caption=bd?bc[0].innerHTML:"";},setGUIByValues:function(bc){window.document.getElementById("jsplus_bootstrap_table_row_conf_feature_caption_"+J(bc)).value=I["features_initial"].caption; +},parseValuesFromGUI:function(bc){I["features_current"].caption=window.document.getElementById("jsplus_bootstrap_table_row_conf_feature_caption_"+J(bc)).value;},apply:function(be){if(I["features_initial"].caption==I["features_current"].caption){return;}if(I["features_current"].caption.length>0){var bc=C(be,"caption");var bg=null;if(bc.length>0){bg=bc[0];}else{var bf=be.ownerDocument;bg=bf.createElement("caption");if(be.firstChild!=null){be.insertBefore(bg,be.firstChild);}else{be.appendChild(bg);}}bg.innerHTML=I["features_current"].caption;}else{var bg=C(be,"caption");for(var bd=0;bd'+'"+'"+'"+'"+"",parseValuesFromElement:function(bc){var bd=ae(bc);I["features_initial"].horizontalAlign=i(bd);},setGUIByValues:function(be){var bd="jsplus_bootstrap_table_row_conf_feature_cells_horizontal_align_"+J(be);var bg="jsplus_bootstrap_table_row_conf_feature_cells_horizontal_align_do_not_change"+J(be);var bf=window.document.getElementById(bg);if(bf){if(I["features_initial"].horizontalAlign!="do_not_change"){bf.parentNode.removeChild(bf);}}else{if(I["features_initial"].horizontalAlign=="do_not_change"){var bc=window.document.getElementById(bd);bf=window.document.createElement("option");bf.id=bg;bf.value="do_not_change";bf.innerText=A(be,"do_not_change");bc.insertBefore(bf,bc.firstChild);}}window.document.getElementById("jsplus_bootstrap_table_row_conf_feature_cells_horizontal_align_"+J(be)).value=I["features_initial"].horizontalAlign;},parseValuesFromGUI:function(bc){I["features_current"].horizontalAlign=window.document.getElementById("jsplus_bootstrap_table_row_conf_feature_cells_horizontal_align_"+J(bc)).value;},apply:function(bc){var bd=I["features_current"].horizontalAlign;if(bd!="do_not_change"){aq(ae(bc),bd);}}},{str:"cells_vertical_align",html:'",parseValuesFromElement:function(bc){var bd=ae(bc);I["features_initial"].verticalAlign=M(bd);},setGUIByValues:function(be){var bd="jsplus_bootstrap_table_row_conf_feature_cells_vertical_align_"+J(be);var bg="jsplus_bootstrap_table_row_conf_feature_cells_vertical_align_do_not_change"+J(be);var bf=window.document.getElementById(bg);if(bf){if(I["features_initial"].verticalAlign!="do_not_change"){bf.parentNode.removeChild(bf);}}else{if(I["features_initial"].verticalAlign=="do_not_change"){var bc=window.document.getElementById(bd);bf=window.document.createElement("option");bf.id=bg;bf.value="do_not_change";bf.innerText=A(be,"do_not_change");bc.insertBefore(bf,bc.firstChild);}}window.document.getElementById("jsplus_bootstrap_table_row_conf_feature_cells_vertical_align_"+J(be)).value=I["features_initial"].verticalAlign;},parseValuesFromGUI:function(bc){I["features_current"].verticalAlign=window.document.getElementById("jsplus_bootstrap_table_row_conf_feature_cells_vertical_align_"+J(bc)).value;},apply:function(bc){var bd=I["features_current"].verticalAlign;if(bd!="do_not_change"){aZ(ae(bc),bd);}}});}if(s==0||s==1||s==2){aP[J(bb)].push([{type:"link",str:"width_100",add_styles:[["width","100%"]]}],[{type:"text",str:"border"},{type:"link",str:"none",add_styles:[["border","none"]]},{type:"text",str:"/",localize:false},{type:"link",str:"black",add_styles:[["border","black solid 1px"]]},{type:"text",str:"/",localize:false},{type:"link",str:"silver",add_styles:[["border","silver solid 1px"]]},{type:"text",str:"/",localize:false},{type:"link",str:"white",add_styles:[["border","white solid 1px"]]}]);}if(s!=4){aP[J(bb)].push([{type:"text",str:"background_color"},{type:"link",str:"transparent",add_styles:[["background-color","transparent"]]},{type:"text",str:"/",localize:false},{type:"link",str:"white",add_styles:[["background-color","white"]]},{type:"text",str:"/",localize:false},{type:"link",str:"black",add_styles:[["background-color","black"]]}]);}if(s==20||s==21||s==22||s==30||s==31||s==32){aP[J(bb)].push([{type:"text",str:"font_color"},{type:"link",str:"white",add_styles:[["color","white"]]},{type:"text",str:"/",localize:false},{type:"link",str:"black",add_styles:[["color","black"]]},{type:"text",str:"/",localize:false},{type:"link",str:"gray",add_styles:[["color","gray"]]}]);}if(s==20||s==21||s==22){aP[J(bb)].push([{type:"text",str:"cells_horizontal_align"},{type:"link",str:"left",add_styles:[["text-align","left"]]},{type:"text",str:"/",localize:false},{type:"link",str:"center",add_styles:[["text-align","center"]]},{type:"text",str:"/",localize:false},{type:"link",str:"right",add_styles:[["text-align","right"]]},{type:"text",str:"/",localize:false},{type:"link",str:"def",remove_styles:["text-align"]}]); +aP[J(bb)].push([{type:"text",str:"cells_vertical_align"},{type:"link",str:"top",add_styles:[["vertical-align","top"]]},{type:"text",str:"/",localize:false},{type:"link",str:"middle",add_styles:[["vertical-align","middle"]]},{type:"text",str:"/",localize:false},{type:"link",str:"bottom",add_styles:[["vertical-align","bottom"]]},{type:"text",str:"/",localize:false},{type:"link",str:"def",remove_styles:["vertical-align"]}]);}if(s==0||s==1||s==2){aP[J(bb)].push([{type:"text",str:"align_table"},{type:"link",str:"left",add_styles:[["margin-left","0"],["margin-right","auto"]]},{type:"text",str:"/",localize:false},{type:"link",str:"center",add_styles:[["margin-left","auto"],["margin-right","auto"]]},{type:"text",str:"/",localize:false},{type:"link",str:"right",add_styles:[["margin-left","auto"],["margin-right","0"]]}]);if(s==1){aP[J(bb)].push([{col:2,type:"text",str:"jsplus_bootstrap_table_row_conf_striped"},{type:"link",str:"enable",add_classes:["table-striped"]},{type:"text",str:"/",localize:false},{type:"link",str:"disable",remove_classes:["table-striped"]}],[{col:2,type:"text",str:"jsplus_bootstrap_table_row_conf_bordered"},{type:"link",str:"enable",add_classes:["table-bordered"]},{type:"text",str:"/",localize:false},{type:"link",str:"disable",remove_classes:["table-bordered"]}],[{col:2,type:"text",str:"jsplus_bootstrap_table_row_conf_condensed"},{type:"link",str:"enable",add_classes:["table-condensed"]},{type:"text",str:"/",localize:false},{type:"link",str:"disable",remove_classes:["table-condensed"]}]);}}for(var ba=0;ba'+(bc>0?" ":"")+aB(ba)+(bc");}else{if(bb.type=="link"){bd.push(''+aB(ba)+"");}}}return bd.join(" ");}function ax(bf){X(bf);var bd="";var bb=[[],[]];for(var bc=0;bc0||aP[J(bf)].length>0){var ba=aS[J(bf)].length;if(bb[0].length>ba){ba=bb[0].length;}if(bb[1].length>ba){ba=bb[1].length;}bd+=''+"";bd+="";if(aS[J(bf)].length>0){bd+='";}if(bb[0].length>0||bb[1].length>0){bd+='";}bd+="";for(var bc=0;bc";if(aS[J(bf)].length>0){bd+='";bd+='";}if(bb[0].length>0||bb[1].length>0){bd+="";}if(bb[1].length>0){bd+='";}bd+="";}bd+=""+"
';bd+=s==4?"":A(bf,"apply_features");bd+="0){bd+=' colspan="2"';}bd+=">";if(bb[0].length>0||bb[1].length>0){bd+=A(bf,"quick_styling");}bd+="
';}if(aS[J(bf)].length>bc){bd+=A(bf,aS[J(bf)][bc].str);}if(aS[J(bf)].length>0){bd+="';}if(aS[J(bf)].length>bc){bd+=aS[J(bf)][bc].html;}if(aS[J(bf)].length>0){bd+="";if(bb[0].length>bc){bd+=an(bf,bb[0][bc]);}bd+="';if(bb[1].length>bc){bd+=an(bf,bb[1][bc]);}bd+="
";}bd+="";bd+=''+""+""+'"+'"+'"+""+""+'"+'"+'"+""+""+'"+'"+'"+""+""+"
'+"
"+'
'+A(bf,"classes")+"
"+'"+"
"+"
'+"
"+'
'+A(bf,"styles")+"
"+'"+"
"+"
'+"
"+'
'+A(bf,"attributes")+"
"+'"+"
"+"
'+A(bf,"desc_classes")+"'+A(bf,"desc_styles")+"'+A(bf,"desc_attrs")+"
'+'
'+"
"+"
'+'
'+"
"+"
'+'
'+"
"+"
"; +return bd.replace(/%id%/g,J(bf));}function R(bb){var ba=av(bb);if(af.length==0||ba==null){return ba;}while(!(af.indexOf(ba.tagName.toLowerCase())>-1)){if(ba.parentNode!=null&&ba.parentNode.tagName!="HTML"){ba=ba.parentNode;}else{return null;}}return ba;}function S(bg){var bb={};var bd=bg.getAttribute("class");bb["classes"]=(bd==null||bd.trim().length==0)?[]:bd.split(/\s+/);var ba=bg.getAttribute("style");var be=(ba==null||ba.trim().length==0)?[]:ba.split(/\s*;\s*/);bb["styles"]=[];var bj;var bh;for(var bc in be){var bk=be[bc];var bf=bk.indexOf(":");if(bf!=-1){bj=bk.substr(0,bf).trim();bh=bk.substr(bf+1).trim();if(bj.length>0&&bh.length>0){bb["styles"].push([bj,bh]);}}}bb["attrs"]=[];var bi=bg.attributes;for(var bf=0;bfbd?bh[bd]:null;if(ba!=null&&(bb==0||be[bb-1]!=ba)){be.push(ba);}}return be;}function aL(ba){var bb=[ba];if(s==30||s==31||s==32){bb=aN(ba);}return bb;}function aV(bj){var ba=aL(bj);I=S(ba[0]);I["features_initial"]=[];I["features_current"]=[];I["dirty_classes"]=[];I["dirty_styles"]=[];I["dirty_attrs"]=[];for(var bk=1;bk0&&I["classes"].indexOf(bn)==-1){I["classes"].push(bn);}}var bj=bm.getElementsByClassName("jsplus_bootstrap_table_row_conf_styles_name_"+J(bh));var bb=bm.getElementsByClassName("jsplus_bootstrap_table_row_conf_styles_value_"+J(bh));for(var bg=0;bg0&&bl.length>0){var bk=false;for(var bf=0;bf0&&bl.length>0&&bc!="class"&&bc!="style"){var bk=false;for(var bf=0;bf0){ba[I["attrs"][bb][0]]=I["attrs"][bb][1];}}return ba;}function F(bh,bj){var bi=function(){this.parentNode.parentNode.removeChild(this.parentNode);};var be=function(){var bo=this.parentNode.getElementsByTagName("input")[0]; +bo.removeAttribute("readonly");var bq=aw(bo);delete bq["background-color"];bq["width"]="167px";y(bo,bq);var bp=I["dirty_classes"].indexOf(bo.value);if(bp>-1){I["dirty_classes"].splice(bp,1);}this.parentNode.removeChild(this);};var bl=window.document;var bb=bl.getElementById("jsplus_bootstrap_table_row_conf_classes_"+J(bh));var bn=I["dirty_classes"].indexOf(bj)>-1;var bg=bn?140:167;var bf=bn?"background-color:#eee;":"";var bk=bl.createElement("input");if(bn){bk.setAttribute("readonly","readonly");}bk.setAttribute("class","jsplus_bootstrap_table_row_conf_class_value_"+J(bh));bk.setAttribute("style",bf+"float:left;width:"+bg+"px;margin:1px 5px 0 1px;padding:3px 4px;border:1px solid silver;font-size:12px");bk.setAttribute("value",bj);if(bn){var bd=bl.createElement("div");bd.setAttribute("class","jsplus_bootstrap_table_row_conf_dirty_"+J(bh));bd.setAttribute("style","line-height:25px;margin-right:5px;float:left;width:22px;height:22px;text-align:center;color:black;border-radius:2px;background-color:yellow;font-size:17px;font-weight:bold;cursor:pointer");bd.setAttribute("title",A(bh,"dirty_class"));bd.innerHTML="⚠";}var ba=bl.createElement("div");ba.setAttribute("class","jsplus_bootstrap_table_row_conf_class_delete_"+J(bh));ba.setAttribute("style","float:left;width:22px;height:22px;text-align:center;color:white;border-radius:2px;background-color:lightcoral;font-size:17px;font-weight:bold;cursor:pointer");ba.setAttribute("title",A(bh,"del"));ba.innerHTML="-";var bc=bl.createElement("div");var bm=false;if(bj=="cke_show_border"||bj.indexOf("jsplus_advanced_blocks")===0||bj.indexOf("jsplus_bootstrap_advanced_blocks")===0||bj.indexOf("jsplus_foundation_advanced_blocks")===0){bm=true;}bc.setAttribute("style","padding-bottom:5px;height:27px"+(bm?";display:none":""));bc.appendChild(bk);if(bn){bc.appendChild(bd);}bc.appendChild(ba);bb.appendChild(bc);ba.onclick=bi;if(bn){bd.onclick=be;}}function a0(bc,bb,ba){a7(bc,bb,ba,true);}function P(bb,ba,bc){a7(bb,ba,bc,false);}function a7(bj,bb,bn,bp){var bl=function(){this.parentNode.parentNode.removeChild(this.parentNode);};var be=function(){var bv=this.parentNode.getElementsByTagName("input");bs=bv[1];bs.removeAttribute("readonly");var bu=aw(bs);delete bu["background-color"];bu["width"]="151px";y(bs,bu);var bs=bv[0];bs.removeAttribute("readonly");ay(bs,"background-color");var br=bp?"dirty_styles":"dirty_attrs";var bt=I[br].indexOf(bs.value);if(bt>-1){I[br].splice(bt,1);}this.parentNode.removeChild(this);};var bq=I[bp?"dirty_styles":"dirty_attrs"].indexOf(bb)>-1;var bf=bq?124:151;var bi=bq?"background-color:#eee;":"";var bo=bp?"styles":"attrs";var bm=window.document;var bk=bm.getElementById("jsplus_bootstrap_table_row_conf_"+bo+"_"+J(bj));var bh=bm.createElement("input");if(bq){bh.setAttribute("readonly","readonly");}bh.setAttribute("class","jsplus_bootstrap_table_row_conf_"+bo+"_name_"+J(bj));bh.setAttribute("style",bi+"float:left;width:85px;margin:1px 5px 0 1px;padding:3px 4px;border:1px solid silver;font-size:12px");bh.setAttribute("value",bb);var bg=bm.createElement("input");if(bq){bg.setAttribute("readonly","readonly");}bg.setAttribute("class","jsplus_bootstrap_table_row_conf_"+bo+"_value_"+J(bj));bg.setAttribute("style",bi+"float:left;width:"+bf+"px;margin:1px 5px 0 1px;padding:3px 4px;border:1px solid silver;font-size:12px");bg.setAttribute("value",bn);if(bq){var bd=bm.createElement("div");bd.setAttribute("class","jsplus_bootstrap_table_row_conf_dirty_"+J(bj));bd.setAttribute("style","line-height:25px;margin-right:5px;float:left;width:22px;height:22px;text-align:center;color:black;border-radius:2px;background-color:yellow;font-size:17px;font-weight:bold;cursor:pointer");bd.setAttribute("title",A(bj,bp?"dirty_style":"dirty_attr"));bd.innerHTML="⚠";}var ba=bm.createElement("div");ba.setAttribute("class","jsplus_bootstrap_table_row_conf_"+bo+"_delete_"+J(bj));ba.setAttribute("style","float:left;width:22px;height:22px;text-align:center;color:white;border-radius:2px;background-color:lightcoral;font-size:17px;font-weight:bold;cursor:pointer");ba.setAttribute("title",A(bj,"del"));ba.innerHTML="-";var bc=bm.createElement("div");bc.setAttribute("style","padding-bottom:5px;height:27px");bc.appendChild(bh);bc.appendChild(bg);if(bq){bc.appendChild(bd);}bc.appendChild(ba);bk.appendChild(bc);ba.onclick=bl;if(bq){bd.onclick=be;}}function aR(bd){var bf=window.document;var ba=bf.getElementById("jsplus_bootstrap_table_row_conf_classes_"+J(bd));ba.innerHTML="";for(var bc in I["classes"]){F(bd,I["classes"][bc]);}var be=bf.getElementById("jsplus_bootstrap_table_row_conf_styles_"+J(bd));be.innerHTML="";for(var bc in I["styles"]){a0(bd,I["styles"][bc][0],I["styles"][bc][1]);}var bb=bf.getElementById("jsplus_bootstrap_table_row_conf_attrs_"+J(bd));bb.innerHTML="";for(var bc in I["attrs"]){P(bd,I["attrs"][bc][0],I["attrs"][bc][1]);}}function h(bc){window.document.getElementById("jsplus_bootstrap_table_row_conf_add_class_"+J(bc)).onclick=function(){F(bc,"");};window.document.getElementById("jsplus_bootstrap_table_row_conf_add_style_"+J(bc)).onclick=function(){a0(bc,"",""); +};window.document.getElementById("jsplus_bootstrap_table_row_conf_add_attr_"+J(bc)).onclick=function(){P(bc,"","");};var bd=(function(){var be=bc;return function(){var bj=aP[J(bc)][parseInt(this.getAttribute("data-id-1"))][parseInt(this.getAttribute("data-id-2"))];if(bj.hasOwnProperty("add_styles")){for(var bk=0;bk-1){bt.push(bh);}}for(var bq=0;bq0){bb.setAttribute("class",bs);}else{bb.removeAttribute("class");}var bc=aw(bb);var bg={};for(var bq=0;bq=bf);return ba.toFixed(1)+bc+bb[bd]+(be?"b":"");}function aB(ba){return ba.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'");}function aY(ba){return ba.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");}function aK(ba){var bb=document.createElement("div");bb.innerHTML=ba;return bb.childNodes;}function aT(ba){return ba.getElementsByTagName("head")[0];}function aQ(ba){return ba.getElementsByTagName("body")[0];}function a4(bc,be){var ba=bc.getElementsByTagName("link");var bd=false;for(var bb=ba.length-1;bb>=0;bb--){if(ba[bb].href==be){ba[bb].parentNode.removeChild(ba[bb]);}}}function az(bd,bf){if(!bd){return;}var ba=bd.getElementsByTagName("link");var be=false;for(var bb=0;bb-1){bb.splice(bb.indexOf(ba),1);}var bd=bb.join(" ").trim();if(bd.length>0){bc.className=bd;}else{if(bc.hasAttribute("class")){bc.removeAttribute("class");}}}function b(ba){if(typeof(ba.className)==="undefined"||ba.className==null){return[];}return ba.className.split(/\s+/);}function a8(bd,ba){var bc=b(bd);for(var bb=0;bb-1){be[bf.substr(0,ba).trim()]=bf.substr(ba+1);}else{be[bf]="";}}return be;}function aF(bc,bb){var bd=aw(bc);for(var ba in bd){var be=bd[ba];if(ba==bb){return be;}}return null;}function aA(bd,bc,ba){var be=aw(bd);for(var bb in be){var bf=be[bb];if(bb==bc&&bf==ba){return true;}}return false;}function H(bc,bb,ba){var bd=aw(bc);bd[bb]=ba;y(bc,bd);}function ay(bb,ba){var bc=aw(bb);delete bc[ba];y(bb,bc);}function y(bb,bd){var bc=[];for(var ba in bd){bc.push(ba+":"+bd[ba]);}if(bc.length>0){bb.setAttribute("style",bc.join(";"));}else{if(bb.hasAttribute("style")){bb.removeAttribute("style");}}}function C(be,bb){var bc;if(Object.prototype.toString.call(bb)==="[object Array]"){bc=bb;}else{bc=[bb];}for(var bd=0;bd-1){ba.push(be.childNodes[bd]);}}return ba;}function m(bd){var bc=aJ(bd);var be=0;for(var bb=0;bbbe){be=bf.length;}}return be;}function ar(ba){return C(ba,["td","th"]);}function i(be){var bd;for(var ba=0;ba0){return bb;}}return 1;}function aI(ba){if(ba.hasAttribute("rowspan")){var bb=parseInt(ba.getAttribute("rowspan"));if(!isNaN(bb)&&bb>0){return bb;}}return 1;}function aJ(bh){var bc=[];var bi=[null,"tbody","thead","tfoot"];for(var bb=0;bb0){for(var bf=0;bf0){bc.push(bd[bf]);}}return bc;}function p(be){var bf=[];var bd=aJ(be);for(var bc=0;bc0){bc.setAttribute("style",bb);}bc.innerHTML=" ";return bc;}function ah(ba,bc,bb){var bd=aM();if(typeof window["jsplus_"+bd+"_listeners"]==="undefined"){window["jsplus_"+bd+"_listeners"]={};}if(typeof window["jsplus_"+bd+"_listeners"][bc]==="undefined"){window["jsplus_"+bd+"_listeners"][bc]={};}if(typeof window["jsplus_"+bd+"_listeners"][bc][J(ba)]==="undefined"){window["jsplus_"+bd+"_listeners"][bc][J(ba)]=[];}window["jsplus_"+bd+"_listeners"][bc][J(ba)].push((function(){var be=ba; +return function(){bb(be);};})());}function g(bb,bc){var bd=aM();if(typeof window["jsplus_"+bd+"_listeners"]!=="undefined"&&typeof window["jsplus_"+bd+"_listeners"][bc]!=="undefined"&&typeof window["jsplus_"+bd+"_listeners"][bc][J(bb)]!="undefined"){for(var ba=0;babi){bj.setAttribute("colspan",be+1);return;}}var bc="td";if(bh.length>0){bc=bh[bh.length-1].tagName;}else{if(O(bb)){bc="th";}}for(;bf<=bi;bf++){var bg=a(bj.tagName,ba);bb.appendChild(bg);}}function E(bc,bg,bf){var bd=bc.parentNode.tagName=="THEAD"?"th":"td";var bi=m(bg);var ba=N(bg);var bb=window.document.createElement("tr");for(var be=0;be0){bh.setAttribute("style",ba);}bh.innerHTML=" ";bb.appendChild(bh);}if(bf){bc.parentNode.insertBefore(bb,bc);}else{if(bc.nextSibling!=null){bc.parentNode.insertBefore(bb,bc.nextSibling);}else{bc.parentNode.appendChild(bb);}}return bb;}function T(ba,bb){ah(ba,"table_tools",bb);}function aE(ba){g(ba,"table_tools");}function aH(ba){var bb=ba.parentNode;while(bb!=null){if(bb.tagName=="TABLE"){return bb;}bb=bb.parentNode;}return null;}function x(bl){var bk=aJ(bl);var ba=-1;var bj=[];for(var be=0;be'+'
'+'
'+'
'+''+'X'+""+"
"+'
'+'
'+"
"+'"+"
"+"";JSDialog.Config.templateButton='';JSDialog.Config.templateBg='
';JSDialog.Config.classButton="cke_dialog_ui_button";JSDialog.Config.classButtonOk="cke_dialog_ui_button_ok";JSDialog.Config.contentBorders=[3,1,15,1,65];CKEDITOR.skin.loadPart("dialog");C(document,".jsdialog_plugin_jsplus_bootstrap_table_row_move_down.jsdialog_bg { background-color: white; opacity: 0.5; position: fixed; left: 0; top: 0; width: 100%; height: 3000px; z-index: 11111; display: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_down.jsdialog_dlg { font-family: Arial; padding: 0; position: fixed; z-index: 11112; background-color: white; border-radius: 5px; overflow:hidden; display: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_down.jsdialog_show { display: block; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_down .jsdialog_message_contents { font-size: 16px; padding: 10px 0 10px 7px; display: table; overflow: hidden; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_down .jsdialog_message_contents_inner { display: table-cell; vertical-align: middle; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_down .jsdialog_message_icon { padding-left: 100px; min-height: 64px; background-position: 10px 10px; background-repeat: no-repeat; box-sizing: content-box; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_down .jsdialog_message_icon_info { background-image: url(img/info.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_down .jsdialog_message_icon_warning { background-image: url(img/warning.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_down .jsdialog_message_icon_error { background-image: url(img/error.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_down .jsdialog_message_icon_confirm { background-image: url(img/confirm.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_down .cke_dialog_contents { margin-top: 0; border-top: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_down .cke_dialog_footer div { outline: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_down .cke_dialog_footer_buttons > .cke_dialog_ui_button { margin-right: 5px; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_down .cke_dialog_footer_buttons > .cke_dialog_ui_button:last-child { margin-right: 0; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_down .cke_dialog_title { cursor: default; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_down .cke_dialog_contents { padding: 0; }"); +}function al(){var aH=false;if(aH){var aL=window.location.hostname;var aK=0;var aI;var aJ;if(aL.length!=0){for(aI=0,l=aL.length;aI=20&&(aJ.tagName=="TD"||aJ.tagName=="TH")){aH[0]=aJ;}}else{if(aJ.tagName=="TABLE"){aH[1]=aJ;}}if(aH[1]!=null){var aM;if(q<20){var aI=B(aH[0].parentNode,"tr");aM=(q<=2&&aI[0]!=aH[0])||(q>2&&aI[aI.length-1]!=aH[0]);}else{var aL=Z(aH[0]);aM=(q<=22&&aL>0)||(q>22&&aLaK+1){aN=aM[aK+1];}else{aN=a(aH.parentNode.tagName=="TBODY"||aH.tagName=="TBODY"?"th":"td",aP);}if(aM.length>aK+2){var aL=aM[aK+2];aL.parentNode.insertBefore(aQ,aL);}else{var aJ=aQ.parentNode;aJ.removeChild(aQ);aJ.appendChild(aQ);}return;}if(q==30||q==31||q==32){var aI=d(aQ);if(aI+aK==m){return;}if(aI+aK>aO){var aN;if(aM.length>aI+aK){aN=aM[aI+aK];}else{aN=a(aH.parentNode.tagName=="TBODY"||aH.tagName=="TBODY"?"th":"td",aP);}aQ.parentNode.insertBefore(aN,aQ);return;}}}}function h(aH,aJ){var aL=B(aH.parentNode,"tr");for(var aK=0;aK0){aL[aK-1].parentNode.removeChild(aL[aK-1]);if(aK+1=aM);return aH.toFixed(1)+aJ+aI[aK]+(aL?"b":"");}function ah(aH){return aH.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'");}function aA(aH){return aH.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");}function ap(aH){var aI=document.createElement("div");aI.innerHTML=aH;return aI.childNodes;}function ax(aH){return aH.getElementsByTagName("head")[0];}function au(aH){return aH.getElementsByTagName("body")[0];}function aD(aJ,aL){var aH=aJ.getElementsByTagName("link");var aK=false;for(var aI=aH.length-1;aI>=0;aI--){if(aH[aI].href==aL){aH[aI].parentNode.removeChild(aH[aI]);}}}function af(aK,aM){if(!aK){return;}var aH=aK.getElementsByTagName("link");var aL=false;for(var aI=0;aI-1){aI.splice(aI.indexOf(aH),1);}var aK=aI.join(" ").trim();if(aK.length>0){aJ.className=aK;}else{if(aJ.hasAttribute("class")){aJ.removeAttribute("class");}}}function b(aH){if(typeof(aH.className)==="undefined"||aH.className==null){return[];}return aH.className.split(/\s+/);}function aG(aK,aH){var aJ=b(aK);for(var aI=0;aI-1){aL[aM.substr(0,aH).trim()]=aM.substr(aH+1);}else{aL[aM]="";}}return aL;}function am(aJ,aI){var aK=ac(aJ);for(var aH in aK){var aL=aK[aH];if(aH==aI){return aL;}}return null;}function ag(aK,aJ,aH){var aL=ac(aK);for(var aI in aL){var aM=aL[aI];if(aI==aJ&&aM==aH){return true;}}return false;}function E(aJ,aI,aH){var aK=ac(aJ);aK[aI]=aH;x(aJ,aK);}function ae(aI,aH){var aJ=ac(aI);delete aJ[aH];x(aI,aJ);}function x(aI,aK){var aJ=[];for(var aH in aK){aJ.push(aH+":"+aK[aH]);}if(aJ.length>0){aI.setAttribute("style",aJ.join(";"));}else{if(aI.hasAttribute("style")){aI.removeAttribute("style");}}}function B(aL,aI){var aJ;if(Object.prototype.toString.call(aI)==="[object Array]"){aJ=aI;}else{aJ=[aI];}for(var aK=0;aK-1){aH.push(aL.childNodes[aK]);}}return aH;}function m(aK){var aJ=aq(aK);var aL=0;for(var aI=0;aIaL){aL=aM.length;}}return aL;}function Y(aH){return B(aH,["td","th"]);}function i(aL){var aK;for(var aH=0;aH0){return aI;}}return 1;}function ao(aH){if(aH.hasAttribute("rowspan")){var aI=parseInt(aH.getAttribute("rowspan"));if(!isNaN(aI)&&aI>0){return aI;}}return 1;}function aq(aO){var aJ=[];var aP=[null,"tbody","thead","tfoot"];for(var aI=0;aI0){for(var aM=0;aM0){aJ.push(aK[aM]);}}return aJ;}function o(aL){var aM=[];var aK=aq(aL);for(var aJ=0;aJ0){aJ.setAttribute("style",aI);}aJ.innerHTML=" ";return aJ;}function S(aH,aJ,aI){var aK=ar();if(typeof window["jsplus_"+aK+"_listeners"]==="undefined"){window["jsplus_"+aK+"_listeners"]={};}if(typeof window["jsplus_"+aK+"_listeners"][aJ]==="undefined"){window["jsplus_"+aK+"_listeners"][aJ]={};}if(typeof window["jsplus_"+aK+"_listeners"][aJ][F(aH)]==="undefined"){window["jsplus_"+aK+"_listeners"][aJ][F(aH)]=[];}window["jsplus_"+aK+"_listeners"][aJ][F(aH)].push((function(){var aL=aH;return function(){aI(aL);};})());}function g(aI,aJ){var aK=ar();if(typeof window["jsplus_"+aK+"_listeners"]!=="undefined"&&typeof window["jsplus_"+aK+"_listeners"][aJ]!=="undefined"&&typeof window["jsplus_"+aK+"_listeners"][aJ][F(aI)]!="undefined"){for(var aH=0;aHaP){aQ.setAttribute("colspan",aL+1);return;}}var aJ="td";if(aO.length>0){aJ=aO[aO.length-1].tagName;}else{if(K(aI)){aJ="th";}}for(;aM<=aP;aM++){var aN=a(aQ.tagName,aH);aI.appendChild(aN);}}function D(aJ,aN,aM){var aK=aJ.parentNode.tagName=="THEAD"?"th":"td";var aP=m(aN);var aH=J(aN);var aI=window.document.createElement("tr");for(var aL=0;aL0){aO.setAttribute("style",aH);}aO.innerHTML=" ";aI.appendChild(aO);}if(aM){aJ.parentNode.insertBefore(aI,aJ);}else{if(aJ.nextSibling!=null){aJ.parentNode.insertBefore(aI,aJ.nextSibling);}else{aJ.parentNode.appendChild(aI);}}return aI;}function L(aH,aI){S(aH,"table_tools",aI);}function ak(aH){g(aH,"table_tools");}function an(aH){var aI=aH.parentNode;while(aI!=null){if(aI.tagName=="TABLE"){return aI;}aI=aI.parentNode;}return null;}function v(aS){var aR=aq(aS);var aH=-1;var aQ=[];for(var aL=0;aL'+'
'+'
'+'
'+''+'X'+""+"
"+'
'+'
'+"
"+'"+"
"+"";JSDialog.Config.templateButton='';JSDialog.Config.templateBg='
';JSDialog.Config.classButton="cke_dialog_ui_button";JSDialog.Config.classButtonOk="cke_dialog_ui_button_ok";JSDialog.Config.contentBorders=[3,1,15,1,65];CKEDITOR.skin.loadPart("dialog");C(document,".jsdialog_plugin_jsplus_bootstrap_table_row_move_up.jsdialog_bg { background-color: white; opacity: 0.5; position: fixed; left: 0; top: 0; width: 100%; height: 3000px; z-index: 11111; display: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_up.jsdialog_dlg { font-family: Arial; padding: 0; position: fixed; z-index: 11112; background-color: white; border-radius: 5px; overflow:hidden; display: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_up.jsdialog_show { display: block; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_up .jsdialog_message_contents { font-size: 16px; padding: 10px 0 10px 7px; display: table; overflow: hidden; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_up .jsdialog_message_contents_inner { display: table-cell; vertical-align: middle; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_up .jsdialog_message_icon { padding-left: 100px; min-height: 64px; background-position: 10px 10px; background-repeat: no-repeat; box-sizing: content-box; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_up .jsdialog_message_icon_info { background-image: url(img/info.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_up .jsdialog_message_icon_warning { background-image: url(img/warning.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_up .jsdialog_message_icon_error { background-image: url(img/error.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_up .jsdialog_message_icon_confirm { background-image: url(img/confirm.png); }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_up .cke_dialog_contents { margin-top: 0; border-top: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_up .cke_dialog_footer div { outline: none; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_up .cke_dialog_footer_buttons > .cke_dialog_ui_button { margin-right: 5px; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_up .cke_dialog_footer_buttons > .cke_dialog_ui_button:last-child { margin-right: 0; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_up .cke_dialog_title { cursor: default; }"+".jsdialog_plugin_jsplus_bootstrap_table_row_move_up .cke_dialog_contents { padding: 0; }"); +}function al(){var aH=false;if(aH){var aL=window.location.hostname;var aK=0;var aI;var aJ;if(aL.length!=0){for(aI=0,l=aL.length;aI=20&&(aJ.tagName=="TD"||aJ.tagName=="TH")){aH[0]=aJ;}}else{if(aJ.tagName=="TABLE"){aH[1]=aJ;}}if(aH[1]!=null){var aM;if(q<20){var aI=B(aH[0].parentNode,"tr");aM=(q<=2&&aI[0]!=aH[0])||(q>2&&aI[aI.length-1]!=aH[0]);}else{var aL=Z(aH[0]);aM=(q<=22&&aL>0)||(q>22&&aLaK+1){aN=aM[aK+1];}else{aN=a(aH.parentNode.tagName=="TBODY"||aH.tagName=="TBODY"?"th":"td",aP);}if(aM.length>aK+2){var aL=aM[aK+2];aL.parentNode.insertBefore(aQ,aL);}else{var aJ=aQ.parentNode;aJ.removeChild(aQ);aJ.appendChild(aQ);}return;}if(q==30||q==31||q==32){var aI=d(aQ);if(aI+aK==m){return;}if(aI+aK>aO){var aN;if(aM.length>aI+aK){aN=aM[aI+aK];}else{aN=a(aH.parentNode.tagName=="TBODY"||aH.tagName=="TBODY"?"th":"td",aP);}aQ.parentNode.insertBefore(aN,aQ);return;}}}}function h(aH,aJ){var aL=B(aH.parentNode,"tr");for(var aK=0;aK0){aL[aK-1].parentNode.removeChild(aL[aK-1]);if(aK+1=aM);return aH.toFixed(1)+aJ+aI[aK]+(aL?"b":"");}function ah(aH){return aH.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'");}function aA(aH){return aH.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");}function ap(aH){var aI=document.createElement("div");aI.innerHTML=aH;return aI.childNodes;}function ax(aH){return aH.getElementsByTagName("head")[0];}function au(aH){return aH.getElementsByTagName("body")[0];}function aD(aJ,aL){var aH=aJ.getElementsByTagName("link");var aK=false;for(var aI=aH.length-1;aI>=0;aI--){if(aH[aI].href==aL){aH[aI].parentNode.removeChild(aH[aI]);}}}function af(aK,aM){if(!aK){return;}var aH=aK.getElementsByTagName("link");var aL=false;for(var aI=0;aI-1){aI.splice(aI.indexOf(aH),1);}var aK=aI.join(" ").trim();if(aK.length>0){aJ.className=aK;}else{if(aJ.hasAttribute("class")){aJ.removeAttribute("class");}}}function b(aH){if(typeof(aH.className)==="undefined"||aH.className==null){return[];}return aH.className.split(/\s+/);}function aG(aK,aH){var aJ=b(aK);for(var aI=0;aI-1){aL[aM.substr(0,aH).trim()]=aM.substr(aH+1);}else{aL[aM]="";}}return aL;}function am(aJ,aI){var aK=ac(aJ);for(var aH in aK){var aL=aK[aH];if(aH==aI){return aL;}}return null;}function ag(aK,aJ,aH){var aL=ac(aK);for(var aI in aL){var aM=aL[aI];if(aI==aJ&&aM==aH){return true;}}return false;}function E(aJ,aI,aH){var aK=ac(aJ);aK[aI]=aH;x(aJ,aK);}function ae(aI,aH){var aJ=ac(aI);delete aJ[aH];x(aI,aJ);}function x(aI,aK){var aJ=[];for(var aH in aK){aJ.push(aH+":"+aK[aH]);}if(aJ.length>0){aI.setAttribute("style",aJ.join(";"));}else{if(aI.hasAttribute("style")){aI.removeAttribute("style");}}}function B(aL,aI){var aJ;if(Object.prototype.toString.call(aI)==="[object Array]"){aJ=aI;}else{aJ=[aI];}for(var aK=0;aK-1){aH.push(aL.childNodes[aK]);}}return aH;}function m(aK){var aJ=aq(aK);var aL=0;for(var aI=0;aIaL){aL=aM.length;}}return aL;}function Y(aH){return B(aH,["td","th"]);}function i(aL){var aK;for(var aH=0;aH0){return aI;}}return 1;}function ao(aH){if(aH.hasAttribute("rowspan")){var aI=parseInt(aH.getAttribute("rowspan"));if(!isNaN(aI)&&aI>0){return aI;}}return 1;}function aq(aO){var aJ=[];var aP=[null,"tbody","thead","tfoot"];for(var aI=0;aI0){for(var aM=0;aM0){aJ.push(aK[aM]);}}return aJ;}function o(aL){var aM=[];var aK=aq(aL);for(var aJ=0;aJ0){aJ.setAttribute("style",aI);}aJ.innerHTML=" ";return aJ;}function S(aH,aJ,aI){var aK=ar();if(typeof window["jsplus_"+aK+"_listeners"]==="undefined"){window["jsplus_"+aK+"_listeners"]={};}if(typeof window["jsplus_"+aK+"_listeners"][aJ]==="undefined"){window["jsplus_"+aK+"_listeners"][aJ]={};}if(typeof window["jsplus_"+aK+"_listeners"][aJ][F(aH)]==="undefined"){window["jsplus_"+aK+"_listeners"][aJ][F(aH)]=[];}window["jsplus_"+aK+"_listeners"][aJ][F(aH)].push((function(){var aL=aH;return function(){aI(aL);};})());}function g(aI,aJ){var aK=ar();if(typeof window["jsplus_"+aK+"_listeners"]!=="undefined"&&typeof window["jsplus_"+aK+"_listeners"][aJ]!=="undefined"&&typeof window["jsplus_"+aK+"_listeners"][aJ][F(aI)]!="undefined"){for(var aH=0;aHaP){aQ.setAttribute("colspan",aL+1);return;}}var aJ="td";if(aO.length>0){aJ=aO[aO.length-1].tagName;}else{if(K(aI)){aJ="th";}}for(;aM<=aP;aM++){var aN=a(aQ.tagName,aH);aI.appendChild(aN);}}function D(aJ,aN,aM){var aK=aJ.parentNode.tagName=="THEAD"?"th":"td";var aP=m(aN);var aH=J(aN);var aI=window.document.createElement("tr");for(var aL=0;aL0){aO.setAttribute("style",aH);}aO.innerHTML=" ";aI.appendChild(aO);}if(aM){aJ.parentNode.insertBefore(aI,aJ);}else{if(aJ.nextSibling!=null){aJ.parentNode.insertBefore(aI,aJ.nextSibling);}else{aJ.parentNode.appendChild(aI);}}return aI;}function L(aH,aI){S(aH,"table_tools",aI);}function ak(aH){g(aH,"table_tools");}function an(aH){var aI=aH.parentNode;while(aI!=null){if(aI.tagName=="TABLE"){return aI;}aI=aI.parentNode;}return null;}function v(aS){var aR=aq(aS);var aH=-1;var aQ=[];for(var aL=0;aLA){A=B.length;}}return A;}function f(w){return getElementsByTagNameOnlyChildren(w,["td","th"]);}function n(A){var z;for(var w=0;w0){return x;}}return 1;}function e(w){if(w.hasAttribute("rowspan")){var x=parseInt(w.getAttribute("rowspan"));if(!isNaN(x)&&x>0){return x;}}return 1;}function u(D){var y=[];var E=[null,"tbody","thead","tfoot"];for(var x=0;x0){for(var B=0;B0){y.push(z[B]);}}return y;}function m(A){var B=[];var z=u(A);for(var y=0;y0){y.setAttribute("style",x);}y.innerHTML=" ";return y;}function o(w,y,x){var z=getEditorName();if(typeof window["jsplus_"+z+"_listeners"]==="undefined"){window["jsplus_"+z+"_listeners"]={};}if(typeof window["jsplus_"+z+"_listeners"][y]==="undefined"){window["jsplus_"+z+"_listeners"][y]={};}if(typeof window["jsplus_"+z+"_listeners"][y][getEditorId(w)]==="undefined"){window["jsplus_"+z+"_listeners"][y][getEditorId(w)]=[];}window["jsplus_"+z+"_listeners"][y][getEditorId(w)].push((function(){var A=w;return function(){x(A);};})());}function q(x,y){var z=getEditorName();if(typeof window["jsplus_"+z+"_listeners"]!=="undefined"&&typeof window["jsplus_"+z+"_listeners"][y]!=="undefined"&&typeof window["jsplus_"+z+"_listeners"][y][getEditorId(x)]!="undefined"){for(var w=0;wE){F.setAttribute("colspan",A+1);return;}}var y="td";if(D.length>0){y=D[D.length-1].tagName;}else{if(p(x)){y="th";}}for(;B<=E;B++){var C=l(F.tagName,w);x.appendChild(C);}}function c(y,C,B){var z=y.parentNode.tagName=="THEAD"?"th":"td";var E=s(C);var w=a(C);var x=window.document.createElement("tr");for(var A=0;A0){D.setAttribute("style",w);}D.innerHTML=" ";x.appendChild(D);}if(B){y.parentNode.insertBefore(x,y);}else{if(y.nextSibling!=null){y.parentNode.insertBefore(x,y.nextSibling);}else{y.parentNode.appendChild(x);}}return x;}function d(w,x){o(w,"table_tools",x);}function k(w){q(w,"table_tools");}function r(w){var x=w.parentNode;while(x!=null){if(x.tagName=="TABLE"){return x;}x=x.parentNode;}return null;}function j(H){var G=u(H);var w=-1;var F=[];for(var A=0;AA){A=B.length;}}return A;}function f(w){return getElementsByTagNameOnlyChildren(w,["td","th"]);}function n(A){var z;for(var w=0;w0){return x;}}return 1;}function e(w){if(w.hasAttribute("rowspan")){var x=parseInt(w.getAttribute("rowspan"));if(!isNaN(x)&&x>0){return x;}}return 1;}function u(D){var y=[];var E=[null,"tbody","thead","tfoot"];for(var x=0;x0){for(var B=0;B0){y.push(z[B]);}}return y;}function m(A){var B=[];var z=u(A);for(var y=0;y0){y.setAttribute("style",x);}y.innerHTML=" ";return y;}function o(w,y,x){var z=getEditorName();if(typeof window["jsplus_"+z+"_listeners"]==="undefined"){window["jsplus_"+z+"_listeners"]={};}if(typeof window["jsplus_"+z+"_listeners"][y]==="undefined"){window["jsplus_"+z+"_listeners"][y]={};}if(typeof window["jsplus_"+z+"_listeners"][y][getEditorId(w)]==="undefined"){window["jsplus_"+z+"_listeners"][y][getEditorId(w)]=[];}window["jsplus_"+z+"_listeners"][y][getEditorId(w)].push((function(){var A=w;return function(){x(A);};})());}function q(x,y){var z=getEditorName();if(typeof window["jsplus_"+z+"_listeners"]!=="undefined"&&typeof window["jsplus_"+z+"_listeners"][y]!=="undefined"&&typeof window["jsplus_"+z+"_listeners"][y][getEditorId(x)]!="undefined"){for(var w=0;wE){F.setAttribute("colspan",A+1);return;}}var y="td";if(D.length>0){y=D[D.length-1].tagName;}else{if(p(x)){y="th";}}for(;B<=E;B++){var C=l(F.tagName,w);x.appendChild(C);}}function c(y,C,B){var z=y.parentNode.tagName=="THEAD"?"th":"td";var E=s(C);var w=a(C);var x=window.document.createElement("tr");for(var A=0;A0){D.setAttribute("style",w);}D.innerHTML=" ";x.appendChild(D);}if(B){y.parentNode.insertBefore(x,y);}else{if(y.nextSibling!=null){y.parentNode.insertBefore(x,y.nextSibling);}else{y.parentNode.appendChild(x);}}return x;}function d(w,x){o(w,"table_tools",x);}function k(w){q(w,"table_tools");}function r(w){var x=w.parentNode;while(x!=null){if(x.tagName=="TABLE"){return x;}x=x.parentNode;}return null;}function j(H){var G=u(H);var w=-1;var F=[];for(var A=0;A' + '
' + '
' + '' + 'X' + "" + "
" + '
' + '
' + "
" + '" + "" + ""; + JSDialog.Config.templateButton = ''; + JSDialog.Config.templateBg = '
'; + JSDialog.Config.classButton = "cke_dialog_ui_button"; + JSDialog.Config.classButtonOk = "cke_dialog_ui_button_ok"; + JSDialog.Config.contentBorders = [3, 1, 15, 1, 65]; + CKEDITOR.skin.loadPart("dialog"); + x(document, ".jsdialog_plugin_jsplus_bootstrap_templates.jsdialog_bg { background-color: white; opacity: 0.5; position: fixed; left: 0; top: 0; width: 100%; height: 3000px; z-index: 11111; display: none; }" + ".jsdialog_plugin_jsplus_bootstrap_templates.jsdialog_dlg { font-family: Arial; padding: 0; position: fixed; z-index: 11112; background-color: white; border-radius: 5px; overflow:hidden; display: none; }" + ".jsdialog_plugin_jsplus_bootstrap_templates.jsdialog_show { display: block; }" + ".jsdialog_plugin_jsplus_bootstrap_templates .jsdialog_message_contents { font-size: 16px; padding: 10px 0 10px 7px; display: table; overflow: hidden; }" + ".jsdialog_plugin_jsplus_bootstrap_templates .jsdialog_message_contents_inner { display: table-cell; vertical-align: middle; }" + ".jsdialog_plugin_jsplus_bootstrap_templates .jsdialog_message_icon { padding-left: 100px; min-height: 64px; background-position: 10px 10px; background-repeat: no-repeat; box-sizing: content-box; }" + ".jsdialog_plugin_jsplus_bootstrap_templates .jsdialog_message_icon_info { background-image: url(img/info.png); }" + ".jsdialog_plugin_jsplus_bootstrap_templates .jsdialog_message_icon_warning { background-image: url(img/warning.png); }" + ".jsdialog_plugin_jsplus_bootstrap_templates .jsdialog_message_icon_error { background-image: url(img/error.png); }" + ".jsdialog_plugin_jsplus_bootstrap_templates .jsdialog_message_icon_confirm { background-image: url(img/confirm.png); }" + ".jsdialog_plugin_jsplus_bootstrap_templates .cke_dialog_contents { margin-top: 0; border-top: none; }" + ".jsdialog_plugin_jsplus_bootstrap_templates .cke_dialog_footer div { outline: none; }" + ".jsdialog_plugin_jsplus_bootstrap_templates .cke_dialog_footer_buttons > .cke_dialog_ui_button { margin-right: 5px; }" + ".jsdialog_plugin_jsplus_bootstrap_templates .cke_dialog_footer_buttons > .cke_dialog_ui_button:last-child { margin-right: 0; }" + ".jsdialog_plugin_jsplus_bootstrap_templates .cke_dialog_title { cursor: default; }" + ".jsdialog_plugin_jsplus_bootstrap_templates .cke_dialog_contents { padding: 0; }"); + } + var m = 1; + var k = null; + var j = null; + var i = []; + var av; + var aw; + var ap; + var D = ""; + var y = ""; + var B = ""; + var aj = {}; + if (m == 20 || m == 21 || m == 22) { + t("use_dialog", false); + t("show_options", true); + t("show_advanced_options", true); + if (m == 20) { + t("default_width_100", false); + } + t("default_add_header", false); + t("default_class", ""); + t("default_style", ""); + if (m == 21) { + t("default_striped", true); + t("default_bordered", false); + t("default_condensed", false); + } + i = []; + var T = "border:1px solid rgb(171, 207, 255);background-color:rgb(195, 217, 255)"; + if (m == 21) { + T = "border:1px solid #6f5499;background-color:#9174C0"; + } else { + if (m == 22) { + T = "border:1px solid #007095;background-color:#008cba"; + } + } + for (var al = 0; al < 6; al++) { + for (var F = 0; F < 6; F++) { + i.push(['
', F + "," + al, "table"]); + } + } + D = '' + "" + "" + '" + '" + "" + "" + "
'; + B = "' + (m == 20 ? '
' : "") + '
' + (m == 21 ? '
' + '
' + '
' : "") + '
' + '
' + '
' + "
" + "
"; + if (m == 20) { + aj["width_100"] = true; + } + aj["add_header"] = false; + aj["class"] = ""; + aj["style"] = ""; + if (m == 21) { + aj["striped"] = true; + aj["bordered"] = false; + aj["condensed"] = false; + } + } else { + if (m == 3) { + t("use_dialog", false); + X("jsplus_bootstrap_templates", []); + t("popup_width", 400); + t("dialog_width", 400); + t("dialog_height", 400); + } else { + if (m == 0) { + t("use_dialog", false); + av = 360; + aw = 384; + ap = 335; + i = [ + ['', '

33%

67%

', "html"], + ['', '

50%

50%

', "html"], + ['', '

67%

33%

', "html"], + ['', '

25%

25%

50%

', "html"], + ['', '

25%

25%

25%

25%

', "html"], + ['', '

50%

25%

25%

', "html"], + ['', '

Text text text

', "html"], + ['', '

25%

50%

25%

', "html"], + ['', '

Text text text

', "html"] + ]; + } else { + if (m == 1) { + t("use_dialog", false); + t("default_col_type", "xs"); + av = 660; + aw = 675; + ap = 215; + aj["col-type"] = "xs"; + D = '' + "" + "" + '" + '" + '" + "" + "" + "
' + '
Columns:
' + '
Rows:
' + "
'; + B = "' + '
Column type:
' + '
' + '" + "
" + '
' + '" + "
" + '
' + '" + "
" + '
' + '" + "
" + '
' + '" + "
" + "
"; + i = [ + ['
1
', '

col-1

', "html"], + ['
2
', '

col-2

', "html"], + ['
3
', '

col-3

', "html"], + ['
4
', '

col-4

', "html"], + ['
5
', '

col-5

', "html"], + ['
6
', '

col-6

', "html"], + ['
7
', '

col-7

', "html"], + ['
8
', '

col-8

', "html"], + ['
9
', '

col-9

', "html"], + ['
10
', '

col-10

', "html"], + ['
11
', '

col-11

', "html"], + ['
12
', '

col-12

', "html"], + ['
6 / 6
', '

col-6

col-6

', "html"], + ['
4 / 4 / 4
', '

col-4

col-4

col-4

', "html"], + ['
3 / 3 / 3 / 3
', '

col-3

col-3

col-3

col-3

', "html"], + ['
9 / 3
', '

col-9

col-3

', "html"], + ['
3 / 9
', '

col-3

col-9

', "html"], + ['
8 / 4
', '

col-8

col-4

', "html"], + ['
12
', '

col-12

', "html"], + ['
4 / 8
', '

col-4

col-8

', "html"], + ['
7 / 5
', '

col-7

col-5

', "html"], + ['
5 / 7
', '

col-5

col-7

', "html"], + ['
6 / 3 / 3
', '

col-6

col-3

col-3

', "html"], + ['
3 / 6 / 3
', '

col-3

col-6

col-3

', "html"], + ['
3 / 3 / 6
', '

col-3

col-3

col-6

', "html"], + ['
0
', '
', "html"], + ]; + } else { + if (m == 2) { + t("use_dialog", false); + t("default_col_type", "small"); + av = 660; + aw = 675; + ap = 215; + aj["col-type"] = "small"; + D = '' + "" + "" + '" + '
' + '
Columns:
' + '
Rows:
' + "
'; + B = '' + '
Column type:

' + '' + '' + '' + "
"; + i = [ + ['
1
', '
col-1
', "html"], + ['
2
', '
col-2
', "html"], + ['
3
', '
col-3
', "html"], + ['
4
', '
col-4
', "html"], + ['
5
', '
col-5
', "html"], + ['
6
', '
col-6
', "html"], + ['
7
', '
col-7
', "html"], + ['
8
', '
col-8
', "html"], + ['
9
', '
col-9
', "html"], + ['
10
', '
col-10
', "html"], + ['
11
', '
col-11
', "html"], + ['
12
', '
col-12
', "html"], + ['
6 / 6
', '
col-6
col-6
', "html"], + ['
4 / 4 / 4
', '
col-4
col-4
col-4
', "html"], + ['
3 / 3 / 3 / 3
', '
col-3
col-3
col-3
col-3
', "html"], + ['
9 / 3
', '
col-9
col-3
', "html"], + ['
3 / 9
', '
col-3
col-9
', "html"], + ['
8 / 4
', '
col-8
col-4
', "html"], + ['
12
', '
col-12
', "html"], + ['
4 / 8
', '
col-4
col-8
', "html"], + ['
7 / 5
', '
col-7
col-5
', "html"], + ['
5 / 7
', '
col-5
col-7
', "html"], + ['
6 / 3 / 3
', '
col-6
col-3
col-3
', "html"], + ['
3 / 6 / 3
', '
col-3
col-6
col-3
', "html"], + ['
3 / 3 / 6
', '
col-3
col-3
col-6
', "html"], + ['
0
', '
', "html"], + ]; + } else { + if (m == 10) { + t("use_dialog", false); + av = 345; + aw = 370; + ap = 360; + i = [ + ['
' + '
' + 'Success! Your request was finished successfully.' + "
" + "
", '
' + "Success! Your request was finished successfully." + "
", "html"], + ['
' + '
' + 'Info. Here are details for your query.' + "
" + "
", '
' + "Info. Here are details for your query." + "
", "html"], + ['
' + '
' + 'Warning! Are you sure you want to proceed?' + "
" + "
", '
' + "Warning! Are you sure you want to proceed?" + "
", "html"], + ['
' + '
' + 'Danger! System state is critical, check the configuration!' + "
" + "
", '
' + "Danger! System state is critical, check the configuration!" + "
", "html"], + ['
' + '
' + 'Message. Lorem ipsum dolor sit amet, consectetur.' + "
" + "
", '
' + "Message. Lorem ipsum dolor sit amet, consectetur." + "
", "html"] + ]; + } else { + if (m == 11) { + t("use_dialog", false); + av = 400; + aw = 420; + ap = 300; + i = [ + ['
Success! Your request was finished successfully
', '', "html"], + ['
Info. Here are details for your query.
', '', "html"], + ['
Warning! Are you sure you want to proceed?
', '', "html"], + ['
Danger! System state is critical, check the configuration!
', '', "html"] + ]; + } else { + if (m == 12) { + av = 345; + aw = 370; + ap = 300; + i = [ + ['
Success! Your request was finished successfully
', '', "html"], + ['
Info. Here are details for your query.
', '', "html"], + ['
Warning! Are you sure you want to proceed?
', '', "html"], + ['
Danger! System state is critical, check the configuration!
', '', "html"], + ['
Message. Lorem ipsum dolor sit amet, consectetur.
', '', "html"] + ]; + } + } + } + } + } + } + } + } + + function d(aG) { + var aF = "-" + C(aG); + var aE = document.getElementById("jsplus_bootstrap_templates-dialog-root" + aF); + if (aE != null && aE.children.length == 0) { + aE.innerHTML = ""; + } + aE = j.getElementById("jsplus_bootstrap_templates-popup-root" + aF); + aE.innerHTML = y.replace(/%id%/g, C(aG)).replace(/\{\{([^}]*)\}\}/g, function(aI, aH) { + return u(aG, aH); + }); + e(aG, aE.ownerDocument); + } + + function z(aH) { + var aF = document.getElementsByClassName("jsplus_bootstrap_templates-selected"); + var aG = null; + for (var aE = 0; aE < aF.length && aG == null; aE++) { + if (aD(aF[aE], "jsplus_bootstrap_templates-template-" + C(aH))) { + aG = aF[aE]; + } + } + if (aG == null) { + alert(u(aH, "select_element_first")); + window["jsplus_bootstrap_templates_callback"] = null; + return false; + } else { + K(aH, aG.getAttribute("data-jsplus_bootstrap_templates_template_id")); + window["jsplus_bootstrap_templates_callback"] = null; + } + } + + function J(aF) { + var aE; + if (j != null) { + aE = j.getElementById("jsplus_bootstrap_templates-popup-root-" + C(aF)); + if (aE != null && aE.children.length == 0) { + aE.innerHTMLAddition = null; + } + } + aE = document.getElementById("jsplus_bootstrap_templates-dialog-root-" + C(aF)); + if (aE.children.length == 0) { + aE.innerHTML = aE.innerHTML = y.replace(/%id%/g, C(aF)).replace(/\{\{([^}]*)\}\}/g, function(aH, aG) { + return u(aF, aG); + }); + } + e(aF, aE.ownerDocument); + W(aF, -1); + } + + function az(aE) { + window["jsplus_bootstrap_templates_callback"] = null; + } + + function H(aE) { + return window["jsplus_bootstrap_templates_callback"] != null || V(aE, "use_dialog"); + } + + function e(aI, aK) { + if (m == 1) { + var aH = function() { + aj["col-type"] = this.getAttribute("data-col"); + }; + aK.getElementById("jsplus_bootstrap_templatescolTypeXS_label_" + C(aI)).getElementsByTagName("input")[0].onchange = aH; + aK.getElementById("jsplus_bootstrap_templatescolTypeSM_label_" + C(aI)).getElementsByTagName("input")[0].onchange = aH; + aK.getElementById("jsplus_bootstrap_templatescolTypeMD_label_" + C(aI)).getElementsByTagName("input")[0].onchange = aH; + aK.getElementById("jsplus_bootstrap_templatescolTypeLG_label_" + C(aI)).getElementsByTagName("input")[0].onchange = aH; + aK.getElementById("jsplus_bootstrap_templatescolTypeXL_label_" + C(aI)).getElementsByTagName("input")[0].onchange = aH; + if (window.jsplus_bootstrap_version && window.jsplus_bootstrap_version == 3) { + A(aK.getElementById("jsplus_bootstrap_templates_div_xl_" + C(aI), "display", "none")); + } + } else { + if (m == 2) { + var aH = function() { + aj["col-type"] = this.getAttribute("data-col"); + }; + aK.getElementById("jsplus_bootstrap_templatescolTypesmall_label_" + C(aI)).getElementsByTagName("input")[0].onchange = aH; + aK.getElementById("jsplus_bootstrap_templatescolTypemedium_label_" + C(aI)).getElementsByTagName("input")[0].onchange = aH; + aK.getElementById("jsplus_bootstrap_templatescolTypelarge_label_" + C(aI)).getElementsByTagName("input")[0].onchange = aH; + } else { + if (m == 20 || m == 21 || m == 22) { + aK.getElementById("jsplus_bootstrap_templates_add_header_" + C(aI)).checked = V(aI, "default_add_header"); + aK.getElementById("jsplus_bootstrap_templates_add_header_" + C(aI)).onchange = function() { + aj["add_header"] = this.checked; + }; + if (m == 20) { + aK.getElementById("jsplus_bootstrap_templates_width_100_" + C(aI)).checked = V(aI, "default_width_100"); + aK.getElementById("jsplus_bootstrap_templates_width_100_" + C(aI)).onchange = function() { + aj["width_100"] = this.checked; + }; + } + if (m == 21) { + aK.getElementById("jsplus_bootstrap_templates_striped_" + C(aI)).checked = V(aI, "default_striped"); + aK.getElementById("jsplus_bootstrap_templates_striped_" + C(aI)).onchange = function() { + aj["striped"] = this.checked; + }; + aK.getElementById("jsplus_bootstrap_templates_bordered_" + C(aI)).checked = V(aI, "default_bordered"); + aK.getElementById("jsplus_bootstrap_templates_bordered_" + C(aI)).onchange = function() { + aj["bordered"] = this.checked; + }; + aK.getElementById("jsplus_bootstrap_templates_condensed_" + C(aI)).checked = V(aI, "default_condensed"); + aK.getElementById("jsplus_bootstrap_templates_condensed_" + C(aI)).onchange = function() { + aj["condensed"] = this.checked; + }; + } + aK.getElementById("jsplus_bootstrap_templates_class_" + C(aI)).value = V(aI, "default_class"); + aK.getElementById("jsplus_bootstrap_templates_style_" + C(aI)).value = V(aI, "default_style"); + aK.getElementById("jsplus_bootstrap_templates_options_" + C(aI)).style.display = V(aI, "show_options") ? "block" : "none"; + aK.getElementById("jsplus_bootstrap_templates_advanced_options_" + C(aI)).style.display = V(aI, "show_advanced_options") ? "block" : "none"; + var aJ = aK.getElementById("jsplus_bootstrap_templates_class_" + C(aI)); + aJ.onchange = function() { + aj["class"] = this.value; + }; + aJ.oninput = aJ.onchange; + aJ.onpase = aJ.onchange; + aJ.onkeyup = aJ.onchange; + var aG = aK.getElementById("jsplus_bootstrap_templates_style_" + C(aI)); + aG.onchange = function() { + aj["style"] = this.value; + }; + aG.oninput = aG.onchange; + aG.onpase = aG.onchange; + aG.onkeyup = aG.onchange; + } + } + } + var aE = aK.getElementsByClassName("jsplus_bootstrap_templates-template-" + C(aI)); + var aL = function() { + var aM = this.getAttribute("data-jsplus_bootstrap_templates_template_id"); + H(aI) ? W(aI, aM) : s(aI, aM); + }; + for (var aF = 0; aF < aE.length; aF++) { + aE[aF].onclick = aL; + if (m == 20 || m == 21 || m == 22) { + aE[aF].onmouseover = (function() { + var aM = aK; + return function() { + var aQ = this.getAttribute("data-jsplus_bootstrap_templates_template_id"); + var aN = aQ % 6; + var aR = Math.floor(aQ / 6); + for (var aS = 0; aS < 6; aS++) { + for (var aO = 0; aO < 6; aO++) { + var aP = aM.getElementById("jsplus_bootstrap_templates_cell_" + aS + "_" + aO + "_" + C(aI)); + aP.style.opacity = (aS <= aN && aO <= aR) ? "1" : "0.45"; + } + } + }; + })(); + } + } + } + + function P(aF) { + if (m == 20 || m == 21 || m == 22) { + if (m == 20) { + aj["width_100"] = V(aF, "default_width_100"); + } + aj["add_header"] = V(aF, "default_add_header"); + if (m == 21) { + aj["striped"] = V(aF, "default_striped"); + aj["bordered"] = V(aF, "default_bordered"); + aj["condensed"] = V(aF, "default_condensed"); + } + tableWidth = 154; + optionsWidth = 0; + if (V(aF, "show_options") === true) { + optionsWidth += 100; + tableWidth += 15; + if (V(aF, "show_advanced_options") === true) { + optionsWidth += 100; + } + tableWidth += optionsWidth; + } + av = tableWidth + 20; + aw = tableWidth + 40; + ap = 250; + } + if (m == 3) { + i = S(aF, "jsplus_bootstrap_templates"); + av = V(aF, "popup_width"); + aw = V(aF, "dialog_width"); + ap = V(aF, "dialog_height"); + } else { + if (m == 0) {} else { + if (m == 1) { + if (["xs", "sm", "md", "lg", "xl"].indexOf(V(aF, "default_col_type").toLowerCase()) != -1) { + aj["col-type"] = V(aF, "default_col_type").toLowerCase(); + } + B = B.replace('jsplus_bootstrap_templates_radio_%id%"/> ' + aj["col-type"].toUpperCase(), 'jsplus_bootstrap_templates_radio_%id%" checked/> ' + aj["col-type"].toUpperCase()); + } else { + if (m == 2) { + if (["small", "medium", "large"].indexOf(V(aF, "default_col_type").toLowerCase()) != -1) { + aj["col-type"] = V(aF, "default_col_type").toLowerCase(); + } + } else { + if (m == 10) {} else { + if (m == 11) {} else { + if (m == 12) {} + } + } + } + } + } + } + y = ""; + for (var aE = 0; aE < i.length; aE++) { + y += '
' + i[aE][0].replace(/\{path\}/g, ax(aF)) + "
"; + } + if (m == 20 || m == 21 || m == 22) { + D = D.replace(/%table_width%/g, tableWidth); + B = B.replace(/%options_width%/g, optionsWidth); + } + y = '" + '
' + y + "
"; + } + + function s(aE, aF) { + K(aE, aF); + ag(aE); + } + + function W(aG, aH) { + var aF = document.getElementsByClassName("jsplus_bootstrap_templates-template-" + C(aG)); + for (var aE = 0; aE < aF.length; aE++) { + aF[aE].className = aF[aE].className.replace(/\s*jsplus_bootstrap_templates-selected/, ""); + if (parseInt(aF[aE].getAttribute("data-jsplus_bootstrap_templates_template_id")) == aH) { + aF[aE].className += " jsplus_bootstrap_templates-selected"; + } + } + } + + function K(aL, aG) { + var aO = null; + var aI = false; + if (typeof(window["jsplus_bootstrap_templates_callback"]) != "undefined" && window["jsplus_bootstrap_templates_callback"] != null) { + aO = window["jsplus_bootstrap_templates_callback"]["func"]; + aI = window["jsplus_bootstrap_templates_callback"]["reverseOrder"]; + window["jsplus_bootstrap_templates_callback"] = null; + } + var aN = "html"; + var aJ = i[aG][0].slice(0); + if (i[aG].length > 1) { + aJ = i[aG][1].slice(0); + if (i[aG].length > 2) { + aN = i[aG][2]; + } + } + if (Object.prototype.toString.call(aJ) === "[object Array]") { + for (var aH = 0; aH < aJ.length; aH++) { + aJ[aH] = aJ[aH].replace(/\{path\}/g, ax()); + } + } else { + aJ = aJ.replace(/\{path\}/g, ax()); + } + if (aN == "table" && (m == 20 || m == 21 || m == 22)) { + var aK = aJ.split(","); + var aF = aK[0]; + var aR = aK[1]; + var aQ = []; + if (m == 21) { + aQ.push("table"); + if (aj["striped"]) { + aQ.push("table-striped"); + } + if (aj["bordered"]) { + aQ.push("table-bordered"); + } + if (aj["condensed"]) { + aQ.push("table-condensed"); + } + } + if (aj["class"].trim().length > 0) { + aQ.push(aj["class"].trim()); + } + if (ak() == "ckeditor") { + aQ.push("cke_show_border"); + } + var aP = aj["style"].trim(); + if (m == 20 && aj["width_100"]) { + if (aP.length > 0 && aP.substr(aP.length - 1, 1) != ";") { + aP += "; "; + } + aP += "width: 100%"; + } + aJ = " 0 ? (" class='" + aQ.join(" ") + "'") : "") + (aP.length > 0 ? (" style='" + aP + "'") : "") + ">\n"; + if (aj["add_header"]) { + aJ += "\t\n\t\t\n"; + for (var aH = 0; aH <= aF; aH++) { + aJ += "\t\t\t \n"; + } + aJ += "\t\t\n\t\n"; + } + aJ += "\t\n"; + for (var aE = 0; aE <= aR; aE++) { + aJ += "\t\t\n"; + for (var aM = 0; aM <= aF; aM++) { + aJ += "\t\t\t \n"; + } + aJ += "\t\t\n"; + } + aJ += "\t\n"; + aJ += "\n"; + ar(aL, aJ); + } else { + if (aN == "text") { + ar(aL, "" + aJ + ""); + } else { + if (aN == "html") { + if (m == 1) { + if (aj["col-type"] == "sm") { + aJ = aJ.replace(/col-/g, "col-sm-"); + } + else + { + if (aj["col-type"] == "md") { + aJ = aJ.replace(/col-/g, "col-md-"); + } + else + { + if (aj["col-type"] == "lg") { + aJ = aJ.replace(/col-/g, "col-lg-"); + } + else + { + if (aj["col-type"] == "xl") { + aJ = aJ.replace(/col-/g, "col-xl-"); + } + } + } + } + } else { + if (m == 2) { + if (aj["col-type"] != "small") { + aJ = aJ.replace(/small/g, aj["col-type"]); + } + } + } + ao(aL, aJ, aO); + } + } + } + } + + function ao(aF, aE, aG) { + if (typeof(aG) == "undefined" || aG == null) { + ar(aF, aE); + } else { + o(aF, aG, aE); + } + } + + function I(aE, aI, aG) { + if (typeof aI == "undefined") { + aI = true; + } + if (typeof aG == "undefined") { + aG = " "; + } + if (typeof(aE) == "undefined") { + return ""; + } + var aJ = 1000; + if (aE < aJ) { + return aE + aG + (aI ? "b" : ""); + } + var aF = ["K", "M", "G", "T", "P", "E", "Z", "Y"]; + var aH = -1; + do { + aE /= aJ; + ++aH; + } while (aE >= aJ); + return aE.toFixed(1) + aG + aF[aH] + (aI ? "b" : ""); + } + + function ad(aE) { + return aE.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, "'"); + } + + function au(aE) { + return aE.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); + } + + function ai(aE) { + var aF = document.createElement("div"); + aF.innerHTML = aE; + return aF.childNodes; + } + + function aq(aE) { + return aE.getElementsByTagName("head")[0]; + } + + function an(aE) { + return aE.getElementsByTagName("body")[0]; + } + + function aA(aG, aI) { + var aE = aG.getElementsByTagName("link"); + var aH = false; + for (var aF = aE.length - 1; aF >= 0; aF--) { + if (aE[aF].href == aI) { + aE[aF].parentNode.removeChild(aE[aF]); + } + } + } + + function ab(aH, aJ) { + if (!aH) { + return; + } + var aE = aH.getElementsByTagName("link"); + var aI = false; + for (var aF = 0; aF < aE.length; aF++) { + if (aE[aF].href.indexOf(aJ) != -1) { + aI = true; + } + } + if (!aI) { + var aG = aH.createElement("link"); + aG.href = aJ; + aG.type = "text/css"; + aG.rel = "stylesheet"; + aq(aH).appendChild(aG); + } + } + + function l(aH, aJ) { + if (!aH) { + return; + } + var aE = aH.getElementsByTagName("script"); + var aI = false; + for (var aG = 0; aG < aE.length; aG++) { + if (aE[aG].src.indexOf(aJ) != -1) { + aI = true; + } + } + if (!aI) { + var aF = aH.createElement("script"); + aF.src = aJ; + aF.type = "text/javascript"; + aq(aH).appendChild(aF); + } + } + + function aB(aE, aG, aF) { + ab(b(aE), aG); + if (document != b(aE) && aF) { + ab(document, aG); + } + } + + function ae(aE, aG, aF) { + l(b(aE), aG); + if (document != b(aE) && aF) { + l(document, aG); + } + } + + function am(aF, aE) { + var aG = b(aF); + x(aG, aE); + } + + function x(aG, aE) { + var aF = aG.createElement("style"); + aq(aG).appendChild(aF); + aF.innerHTML = aE; + } + + function at(aF, aE) { + if (aD(aF, aE)) { + return; + } + aF.className = aF.className.length == 0 ? aE : aF.className + " " + aE; + } + + function ay(aG, aE) { + var aF = a(aG); + while (aF.indexOf(aE) > -1) { + aF.splice(aF.indexOf(aE), 1); + } + var aH = aF.join(" ").trim(); + if (aH.length > 0) { + aG.className = aH; + } else { + if (aG.hasAttribute("class")) { + aG.removeAttribute("class"); + } + } + } + + function a(aE) { + if (typeof(aE.className) === "undefined" || aE.className == null) { + return []; + } + return aE.className.split(/\s+/); + } + + function aD(aH, aE) { + var aG = a(aH); + for (var aF = 0; aF < aG.length; aF++) { + if (aG[aF].toLowerCase() == aE.toLowerCase()) { + return true; + } + } + return false; + } + + function aC(aG, aH) { + var aF = a(aG); + for (var aE = 0; aE < aF.length; aE++) { + if (aF[aE].indexOf(aH) === 0) { + return true; + } + } + return false; + } + + function Z(aG) { + if (typeof(aG.getAttribute("style")) === "undefined" || aG.getAttribute("style") == null || aG.getAttribute("style").trim().length == 0) { + return {}; + } + var aI = {}; + var aH = aG.getAttribute("style").split(/;/); + for (var aF = 0; aF < aH.length; aF++) { + var aJ = aH[aF].trim(); + var aE = aJ.indexOf(":"); + if (aE > -1) { + aI[aJ.substr(0, aE).trim()] = aJ.substr(aE + 1); + } else { + aI[aJ] = ""; + } + } + return aI; + } + + function ah(aG, aF) { + var aH = Z(aG); + for (var aE in aH) { + var aI = aH[aE]; + if (aE == aF) { + return aI; + } + } + return null; + } + + function ac(aH, aG, aE) { + var aI = Z(aH); + for (var aF in aI) { + var aJ = aI[aF]; + if (aF == aG && aJ == aE) { + return true; + } + } + return false; + } + + function A(aG, aF, aE) { + var aH = Z(aG); + aH[aF] = aE; + r(aG, aH); + } + + function aa(aF, aE) { + var aG = Z(aF); + delete aG[aE]; + r(aF, aG); + } + + function r(aF, aH) { + var aG = []; + for (var aE in aH) { + aG.push(aE + ":" + aH[aE]); + } + if (aG.length > 0) { + aF.setAttribute("style", aG.join(";")); + } else { + if (aF.hasAttribute("style")) { + aF.removeAttribute("style"); + } + } + } + + function w(aI, aF) { + var aG; + if (Object.prototype.toString.call(aF) === "[object Array]") { + aG = aF; + } else { + aG = [aF]; + } + for (var aH = 0; aH < aG.length; aH++) { + aG[aH] = aG[aH].toLowerCase(); + } + var aE = []; + for (var aH = 0; aH < aI.childNodes.length; aH++) { + if (aI.childNodes[aH].nodeType == 1 && aG.indexOf(aI.childNodes[aH].tagName.toLowerCase()) > -1) { + aE.push(aI.childNodes[aH]); + } + } + return aE; + } + + function ag() {} + + function o(aF, aG, aE) { + CKEDITOR.tools.callFunction(aG, aE); + } + CKEDITOR.plugins.add("jsplus_bootstrap_templates", { + requires: "panelbutton,floatpanel", + lang: "en", + afterInit: function(aF) { + P(aF); + y = (D + y + B); + CKEDITOR.dialog.add("jsplus_bootstrap_templates-" + C(aF), function(aG) { + return { + resizable: 0, + width: aw, + minWidth: aw, + height: ap, + maxHeight: ap, + title: u(aG, "jsplus_bootstrap_templates_title"), + onShow: function() { + J(aG); + }, + onOk: function() { + z(aG); + }, + onCancel: function() { + az(aG); + }, + contents: [{ + id: "jsplus_bootstrap_templates-tab-" + C(aG), + expand: true, + focus: true, + elements: [{ + type: "vbox", + padding: 10, + children: [{ + type: "html", + html: '
' + }] + }] + }] + }; + }); + if (H(aF)) { + var aE = aF.addCommand("jsplus_bootstrap_templates-" + C(aF), new CKEDITOR.dialogCommand("jsplus_bootstrap_templates-" + C(aF))); + aF.ui.addButton("jsplus_bootstrap_templates", { + label: u(aF, "jsplus_bootstrap_templates_title"), + title: u(aF, "jsplus_bootstrap_templates_title"), + icon: this.path + "/icons/jsplus_bootstrap_templates.png", + command: "jsplus_bootstrap_templates-" + C(aF) + }); + } else { + aF.ui.add("jsplus_bootstrap_templates", CKEDITOR.UI_PANELBUTTON, { + icon: this.path + "icons/jsplus_bootstrap_templates.png", + label: u(aF, "jsplus_bootstrap_templates_title"), + command: "jsplus_bootstrap_templates", + modes: { + wysiwyg: 1 + }, + editorFocus: 0, + caption: null, + table: null, + panel: { + css: CKEDITOR.skin.getPath("editor"), + attributes: { + role: "listbox", + "aria-label": "" + } + }, + onBlock: function(aG, aI) { + aI.autoSize = true; + aI.element.addClass("cke_colorblock"); + k = aG; + j = aI.element.getDocument().$; + var aH = new CKEDITOR.dom.element("div"); + aH.$.setAttribute("id", "jsplus_bootstrap_templates-popup-root-" + C(aF)); + aH.$.setAttribute("style", ((typeof(av) == "undefined" && av != null) ? "" : "width:" + av + "px;") + "padding:10px"); + aI.element.append(aH); + CKEDITOR.ui.fire("ready", this); + }, + onOpen: function() { + d(aF); + } + }); + } + } + }); +})(); \ No newline at end of file diff --git a/libraries/ckeditor/plugins/jsplus_uploader/config.php b/libraries/ckeditor/plugins/jsplus_uploader/config.php new file mode 100644 index 0000000..6df2ded --- /dev/null +++ b/libraries/ckeditor/plugins/jsplus_uploader/config.php @@ -0,0 +1,48 @@ + 0, // maxSize in bytes for uploaded files, 0 for any + 'allowedExtensions' => '*' // means any extensions are allowed +); + +$config['ResourceType']['Images'] = Array( + 'maxSize' => 16*1024*1024, // maxSize in bytes for uploaded images, 0 for any + 'allowedExtensions' => 'bmp,gif,jpeg,jpg,png', +); + +$config['JPEGQuality'] = 95; // Will be used for resizing JPEG images + +// Some restrictions to avoid server overload / DDoS +$config['MaxImgResizeWidth'] = 2000; +$config['MaxImgResizeHeight'] = 2000; +$config['MaxThumbResizeWidth'] = 500; +$config['MaxThumbResizeHeight'] = 500; + +$config['AllowExternalWebsites'] = ''; // Crossdomain upload is disabled by default +// If you want to enable it use this code: +// $config['AllowExternalSites'] = 'http://yoursite.com'; +// or to allow all websites (with caution!): +// $config['AllowExternalWebsites'] = '*'; + + + +if (substr($config['BaseUrl'], -1) !== '/') + $config['BaseUrl'] .= '/'; +if (substr($config['BaseDir'], -1) !== '/' && substr($config['BaseDir'], -1) !== '\\') + $config['BaseDir'] .= '/'; + +?> \ No newline at end of file diff --git a/libraries/ckeditor/plugins/jsplus_uploader/uploader.php b/libraries/ckeditor/plugins/jsplus_uploader/uploader.php new file mode 100644 index 0000000..57d750b --- /dev/null +++ b/libraries/ckeditor/plugins/jsplus_uploader/uploader.php @@ -0,0 +1,459 @@ + 0) + $result .= '|'; + $result .= $baseUrl.$f; + } + } else + $result = '!' . $uploadResult[1]; + + echo $result; + } else { + $CKEditorFuncNum = $_GET['CKEditorFuncNum']; + if ($uploadResult[0] === true) + echo ""; + else + echo ""; + + } +} + +function getThumbFileName($fileName) { + $a = explode('.', $fileName); + $a[count($a) - 2] .= '_small'; + $fileNameThumb = implode('.', $a); + return $fileNameThumb; +} + +function uploadFile( + $name, + $tmp_name, + $error, + $size, + $toDir, + $allowedExtensions, + $maxSize, + $imgEnlarge, + $imgWidth, + $imgHeight, + $doThumb, + $thumbEnlarge, + $thumbWidth, + $thumbHeight +) { + + if ($error != 0) { + $message = "There was an upload error for file `'.$name.'`, code #".$error.". Check your server's configuration"; + switch ($error) { + case UPLOAD_ERR_INI_SIZE: $message = "The uploaded file `'.$name.'` exceeds the upload_max_filesize directive in php.ini"; break; + case UPLOAD_ERR_FORM_SIZE: $message = "The uploaded file `'.$name.'` exceeds the MAX_FILE_SIZE directive that was specified in the HTML form"; break; + case UPLOAD_ERR_PARTIAL: $message = "The uploaded file `'.$name.'` was only partially uploaded"; break; + case UPLOAD_ERR_NO_FILE: $message = "No file was uploaded"; break; + case UPLOAD_ERR_NO_TMP_DIR: $message = "Missing a temporary folder on your server"; break; + case UPLOAD_ERR_CANT_WRITE: $message = "Failed to write file to disk on your server"; break; + case UPLOAD_ERR_EXTENSION: $message = "File upload stopped by extension"; break; + } + return array(false, $message); + } + + if ($size == 0) + return array(false, 'File `'.$name.'` size = 0'); + + if ($maxSize > 0 && $size > $maxSize) + return array(false, 'Size of file `'.$name.'` exceeds the limit of '.$maxSize.' bytes'); + + $a = explode('.', $name); + $type = $a[count($a)-1]; + error_log($type); + if ($allowedExtensions[0] != '*' && !in_array(strtolower($type), array_map('strtolower', $allowedExtensions))) + return array(false, 'Wrong extension for file `'.$name.'`. Allowed extensions are: ' . implode(', ', $allowedExtensions)); + + $fileName; + $fileNameThumb; + + // Search for file name + $ok = false; + $i = -1; + do { + $i ++; + if ($i == 0) + $fileName = $name; + else + $fileName = $i . '_' . $name; + $ok = !is_file($toDir . $fileName); + if ($doThumb) { + $fileNameThumb = getThumbFileName($fileName); + $ok = $ok && !file_exists($toDir . $fileNameThumb); + } + } while (!$ok); + + $filePath = $toDir . $fileName; + if (is_uploaded_file($tmp_name)) + $moveResult = move_uploaded_file($tmp_name, $filePath); + else + $moveResult = rename($tmp_name, $filePath); + if ($moveResult === false) + return array(false, 'Error while moving uploaded file to destination folder: check folder permissions on server side'); + + if ($imgWidth > 0 || $imgHeight > 0) { + $err = resizeImg( + $filePath, + $imgEnlarge, + $imgWidth, + $imgHeight, + true + ); + if ($err != null) + return array(false, 'Error while resizing image `'.$name.'`: '.$err); + } + + if ($doThumb) { + $err = resizeImg( + $filePath, + $thumbEnlarge, + $thumbWidth, + $thumbHeight, + false + ); + if ($err != null) + return array(false, 'Error while making thumbnail of image `'.$name.'`: '.$err); + } + + return array(true, $fileName); +} + + +// return array(ok?, tmp_file_name / error_text) +function rehost($url, $maxSize) { + if ($maxSize > 0) + $bytes = file_get_contents($url, false, null, -1, $maxSize); + else + $bytes = file_get_contents($url); + + if ($bytes == false) + return array(false, "Unable to locate file on external server".($maxSize > 0 ? " or file size limit exceeded" : "")); + + // $http_response_header filled by file_get_contents() + foreach($http_response_header as $header) + { + if (strpos(strtolower($header),'content-disposition') !== false) + { + $tmp_name = explode('=', $header); + if ($tmp_name[1]) + $file = trim($tmp_name[1],'";\''); + } + } + if (!isset($file)) { + $stripped_url = preg_replace('/\\?.*/', '', $url); + $file = basename($stripped_url); + } + + $tmpDir = sys_get_temp_dir(); + if (file_exists($tmpDir.'/'.$file)) { + $n = 1; + do { + $n ++; + } while (file_exists($tmpDir.'/'.$n.'_'.$file)); + $file = $n.'_'.$file; + } + $tmpFile = $tmpDir.'/'.$file; + + $bytesDownloaded = file_put_contents($tmpFile, $bytes); + if ($bytesDownloaded === false) + return array(false, "Unable to write downloaded data to: " . $tmpFile); + return array(true, $tmpFile); +} + +// If any error returns array(false, string) +// If all ok, returns array(true, array(file1, file2, ...)) +function upload($doThumb, $imgEnlarge, $imgWidth, $imgHeight, $thumbEnlarge, $thumbWidth, $thumbHeight) { + global $config; + if (!empty($_GET) && isset($_GET['type']) && array_key_exists($_GET['type'],$config['ResourceType'])) + $rType = $config['ResourceType'][$_GET['type']]; + else + return array(false, 'Resource type (type) is defined incorrectly ('.$_GET['type'].')'); + + if (!isset($_GET['rehost'])) { + + if (isset($_FILES['file'])) // for Plupload + $_FILES['upload'] = $_FILES['file']; + else if (isset($_FILES['files'])) // for JQuery File Upload + $_FILES['upload'] = $_FILES['files']; + + if (!isset($_FILES['upload'])) + return array(false, 'No files to process'); + + $data = $_FILES['upload']; + $files = array(); + if (is_array($data['name'])) { + for ($i = 0; $i < count($data['name']); $i++) + $files[] = array( + 'name' => $data['name'][$i], + 'tmp_name' => $data['tmp_name'][$i], + 'error' => $data['error'][$i], + 'size' => $data['size'][$i] + ); + } else { + $files[] = $data; + } + } else { + if (isset($_GET['url'])) { + $result = rehost($_GET['url'], $rType['maxSize']); + if ($result[0] === true) { + $name = basename($result[1]); + $file = array( + 'name' => $name, + 'tmp_name' => $result[1], + 'size' => filesize($result[1]), + 'error' => '' + ); + $files = array(); + $files[] = $file; + } else { + return $result; + } + } else + return array(false, 'No URL to process'); + } + + $resultFiles = array(); + foreach ($files as $file) { + $fileResult = uploadFile( + $file['name'], + $file['tmp_name'], + $file['error'], + $file['size'], + $config['BaseDir'], + explode(',',$rType['allowedExtensions']), + $rType['maxSize'], + $imgEnlarge, + $imgWidth, + $imgHeight, + $doThumb, + $thumbEnlarge, + $thumbWidth, + $thumbHeight + ); + if ($fileResult[0] !== true) + return $fileResult; // error + else + $resultFiles[] = $fileResult[1]; + } + + return array(true, $resultFiles); +} + + +function resizeImg($sourceFile, $resizeOnLess, $maxWidth, $maxHeight, $resizeself) { + global $config; + if ($maxWidth <= 0 && $maxHeight <= 0 && $resizeself) + return null; + + $sourceImageAttr = @getimagesize($sourceFile); + if ($sourceImageAttr === false) + return "unable to get image size"; + + switch ($sourceImageAttr['mime']) { + case 'image/gif': { + if (@imagetypes() & IMG_GIF) + $oImage = @imagecreatefromgif($sourceFile); + else + $ermsg = 'GIF images are not supported'; + } + break; + case 'image/jpeg': { + if (@imagetypes() & IMG_JPG) + $oImage = @imagecreatefromjpeg($sourceFile) ; + else + $ermsg = 'JPEG images are not supported'; + } + break; + case 'image/png': { + if (@imagetypes() & IMG_PNG) + $oImage = @imagecreatefrompng($sourceFile) ; + else + $ermsg = 'PNG images are not supported'; + } + break; + case 'image/wbmp': { + if (@imagetypes() & IMG_WBMP) + $oImage = @imagecreatefromwbmp($sourceFile); + else + $ermsg = 'WBMP images are not supported'; + } + break; + default: + $ermsg = $sourceImageAttr['mime'].' images are not supported'; + break; + } + + if (isset($ermsg) || false === $oImage) + return $ermsg; + + if ($maxWidth > 0 && $maxHeight > 0) { + $xscale = imagesx($oImage) / $maxWidth; + $yscale = imagesy($oImage) / $maxHeight; + } else if ($maxWidth > 0) { + $xscale = imagesx($oImage) / $maxWidth; + $yscale = $xscale; + } else if ($maxHeight > 0) { + $yscale = imagesy($oImage) / $maxHeight; + $xscale = $yscale; + } else { + $yscale = 1; + $xscale = 1; + } + + if ($yscale > $xscale) { + $newWidth = round(imagesx($oImage) * (1/$yscale)); + $newHeight = round(imagesy($oImage) * (1/$yscale)); + } else { + $newWidth = round(imagesx($oImage) * (1/$xscale)); + $newHeight = round(imagesy($oImage) * (1/$xscale)); + } + + $resizeRequired = + $newWidth > 0 + && + ($resizeOnLess || $newWidth < imagesx($oImage)) + && + $xscale != 1; + + if ($resizeRequired) { + // Resize is required + $newImage = imagecreatetruecolor($newWidth, $newHeight); + imagealphablending($newImage, false); + imagesavealpha($newImage, true); + imagecopyresampled($newImage, $oImage, 0, 0, 0, 0, $newWidth, $newHeight, imagesx($oImage), imagesy($oImage)); + $oImage = $newImage; + } + + if (!$resizeself) { + $sourceFileArr=explode('.',$sourceFile); + $sourceFileArr[count($sourceFileArr)-2].='_small'; + $destFile=implode('.',$sourceFileArr); + } else { + if ($resizeRequired) + unlink($sourceFile); + $destFile = $sourceFile; + } + + if ($resizeRequired) { + switch ($sourceImageAttr['mime']) { + case 'image/gif': + imagegif($oImage, $destFile); + break; + case 'image/jpeg': + imagejpeg($oImage, $destFile, $config['JPEGQuality']); + break; + case 'image/png': + imagepng($oImage, $destFile); + break; + case 'image/wbmp': + imagewbmp($oImage, $destFile); + break; + } + } else if ($destFile != $sourceFile) { + copy($sourceFile, $destFile); + } + + @imageDestroy($oImage); + @imageDestroy($newImage); + return null; +} + +function run() { + global $config; + if (!isset($config)) { + $result = array(false, 'Uploader\'s config not found. Check globals are on your server'); + } else { + + // Original image resize options + $imgEnlarge = false; + if (isset($_GET['ie'])) + if ($_GET['ie'] == '1') + $imgEnlarge = true; + else + fail("Image Resize (ie) value is incorrect (" . $_GET['ie'] . ")"); + $imgWidth = 0; + if (isset($_GET['iw'])) + $imgWidth = $_GET['iw']; + if (preg_match('/^\d{1, 5}$/', $imgWidth) != null) + fail("Image Width (iw) value is not positive integer number (" . $imgWidth . ")"); + if ($imgWidth > $config['MaxImgResizeWidth']) + fail("Image Width (iw) value is too big (" . $imgWidth . ")"); + $imgHeight = 0; + if (isset($_GET['ih'])) + $imgHeight = $_GET['ih']; + if (preg_match('/^\d{1, 5}$/', $imgHeight) != null) + fail("Image Height (ih) value is not positive integer number (" . $imgHeight . ")"); + if ($imgHeight > $config['MaxImgResizeHeight']) + fail("Image Height (ih) value is too big (" . $imgHeight . ")"); + + // Thumbnail resize options + $thumbEnlarge = false; + if (isset($_GET['te'])) + if ($_GET['te'] == '1') + $thumbEnlarge = true; + else + fail("Thumbnail Resize (te) value is incorrect (" . $_GET['te'] . ")"); + $thumbWidth = 0; + if (isset($_GET['tw'])) + $thumbWidth = $_GET['tw']; + if (preg_match('/^\d{1, 5}$/', $thumbWidth) != null) + fail("Thumbnail Width (tw) value is not positive integer number (" . $thumbWidth . ")"); + if ($thumbWidth > $config['MaxThumbResizeWidth']) + fail("Thumbnail Width (tw) value is too big (" . $thumbWidth . ")"); + $thumbHeight = 0; + if (isset($_GET['th'])) + $thumbHeight = $_GET['th']; + if (preg_match('/^\d{1, 5}$/', $thumbHeight) != null) + fail("Thumbnail Height (th) value is not positive integer number (" . $thumbHeight . ")"); + if ($thumbHeight > $config['MaxThumbResizeHeight']) + fail("Thumbnail Height (th) value is too big (" . $thumbHeight . ")"); + + $doThumb = $_GET['type']=='Images' && isset($_GET['makeThumb']); + + $result = upload( + $doThumb, + $imgEnlarge, + $imgWidth, + $imgHeight, + $thumbEnlarge, + $thumbWidth, + $thumbHeight + ); + } + + sendResponse( + $result, + $config['BaseUrl'] + ); +} + +run(); + +?> \ No newline at end of file diff --git a/libraries/ckeditor/plugins/jsplus_uploader/userfiles/.htaccess b/libraries/ckeditor/plugins/jsplus_uploader/userfiles/.htaccess new file mode 100644 index 0000000..615eed5 --- /dev/null +++ b/libraries/ckeditor/plugins/jsplus_uploader/userfiles/.htaccess @@ -0,0 +1,6 @@ + + php_value engine off + + + php_value engine off + diff --git a/libraries/ckeditor/plugins/leaflet/css/contents.css b/libraries/ckeditor/plugins/leaflet/css/contents.css new file mode 100644 index 0000000..dbdc915 --- /dev/null +++ b/libraries/ckeditor/plugins/leaflet/css/contents.css @@ -0,0 +1,43 @@ +.leaflet_div { + background: #eee; + border: 1px solid #ddd; + border-radius: 4px; + box-shadow: 0 1px 1px #fff inset, 0 -1px 0px #ccc inset; + line-height: 0; + margin-right: 1em; + margin-bottom: 1em; +} + +.leaflet_div.align-left { + float: left; +} + +.leaflet_div.align-right { + float: right; +} + +.leaflet_div.align-center { + display: table; + margin-left: auto; + margin-right: auto; +} + +.cke_widget_wrapper:hover>.cke_widget_element { + outline: 3px solid yellow !important; +} + +.responsive-map { + height: 0; + padding-bottom: 56.25%; + padding-top: 25px; + position: relative; + width:100%; +} + +.responsive-map-iframe { + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} diff --git a/libraries/ckeditor/plugins/leaflet/dialogs/leaflet.js b/libraries/ckeditor/plugins/leaflet/dialogs/leaflet.js new file mode 100644 index 0000000..7dc5d36 --- /dev/null +++ b/libraries/ckeditor/plugins/leaflet/dialogs/leaflet.js @@ -0,0 +1,518 @@ +CKEDITOR.dialog.add('leaflet', function(editor) { + var autocomplete; + var mapContainer = ''; + + // Access the current translation file. + var pluginTranslation = editor.lang.leaflet; + + // Use the core translation file. Used mainly for the `Alignment` values. + var commonTranslation = editor.lang.common; + + // Dialog's function callback for the Leaflet Map Widget. + return { + title: pluginTranslation.dialogTitle, + minWidth: 320, + minHeight: 125, + + contents: [{ + // Create a Location tab. + id: 'location_tab', + label: pluginTranslation.locationTabLabel, + elements: [ +// { +// id: 'map_geocode', +// className: 'geocode', +// type: 'text', +// label: pluginTranslation.googleSearchFieldLabel, +// style: 'margin-top: -7px;', +// +// setup: function(widget) { +// this.setValue(''); +// }, +// +// onLoad: function (widget) { +// // Get the DOM reference for the Search field. +// var input = this.getInputElement().$; +// +// // Set a diffused/default text for better user experience. +// // This will override the Google's default placeholder text: +// // 'Enter a location'. +// jQuery('.geocode input').attr('placeholder', pluginTranslation.googleSearchFieldHint); +// +// var config = editor.config; +// +// // Default value, but eventually will reach its quota if many users +// // will just utilize this key instead of creating their own. +// var googleApiKey = 'AIzaSyA9ySM6msnGm0qQB1L1cLTMBdKEUKPySmQ'; +// +// if (typeof config.leaflet_maps_google_api_key != 'undefined' && config.leaflet_maps_google_api_key != '') { +// googleApiKey = config.leaflet_maps_google_api_key; +// } +// +// // Execute only once, and not every dialog pop-up. +// if (typeof google == 'undefined') { +// // Load other needed external library. +// // Wait for the script to finish loading before binding +// // the autocomplete mechanism to prevent rendering issue. +// CKEDITOR.scriptLoader.load('//maps.googleapis.com/maps/api/js?libraries=places&callback=dummy&key=' + googleApiKey, function() { +// // Bind the Search field to the Autocomplete widget. +// autocomplete = new google.maps.places.Autocomplete(input); +// }); +// } else { +// autocomplete = new google.maps.places.Autocomplete(input); +// } +// +// // Fix for the Google's type-ahead search displaying behind +// // the widgets dialog window. +// // Basically, we want to override the z-index of the +// // Seach Autocomplete list, in which the styling is being set +// // in real-time by Google. +// // Make a new DOM element. +// var stylesheet = jQuery(' + + + + + + +
+ + + + + + diff --git a/libraries/ckeditor/plugins/leaflet/scripts/leaflet-providers/leaflet-providers.js b/libraries/ckeditor/plugins/leaflet/scripts/leaflet-providers/leaflet-providers.js new file mode 100644 index 0000000..b88cd61 --- /dev/null +++ b/libraries/ckeditor/plugins/leaflet/scripts/leaflet-providers/leaflet-providers.js @@ -0,0 +1,20 @@ +(function(){L.TileLayer.Provider=L.TileLayer.extend({initialize:function(a,b){var f=L.TileLayer.Provider.providers,e=a.split("."),g=e[0],h=e[1];if(!f[g])throw"No such provider ("+g+")";var d={url:f[g].url,options:f[g].options};if(h&&"variants"in f[g]){if(!(h in f[g].variants))throw"No such name in provider ("+h+")";e=f[g].variants[h];d={url:e.url||d.url,options:L.Util.extend({},d.options,e.options)}}else"function"===typeof d.url&&(d.url=d.url(e.splice(1,e.length-1).join(".")));var c=function(a){return-1=== +a.indexOf("{attribution.")?a:a.replace(/\{attribution.(\w*)\}/,function(a,b){return c(f[b].options.attribution)})};d.options.attribution=c(d.options.attribution);e=L.Util.extend({},d.options,b);L.TileLayer.prototype.initialize.call(this,d.url,e)}});L.TileLayer.Provider.providers={OpenStreetMap:{url:"http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",options:{attribution:'\x26copy; \x3ca href\x3d"http://openstreetmap.org"\x3eOpenStreetMap\x3c/a\x3e contributors, \x3ca href\x3d"http://creativecommons.org/licenses/by-sa/2.0/"\x3eCC-BY-SA\x3c/a\x3e'}, +variants:{Mapnik:{},BlackAndWhite:{url:"http://{s}.www.toolserver.org/tiles/bw-mapnik/{z}/{x}/{y}.png"},DE:{url:"http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png"},HOT:{url:"http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png",options:{attribution:'{attribution.OpenStreetMap}, Tiles courtesy of \x3ca href\x3d"http://hot.openstreetmap.org/" target\x3d"_blank"\x3eHumanitarian OpenStreetMap Team\x3c/a\x3e'}}}},OpenCycleMap:{url:"http://{s}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png",options:{attribution:'\x26copy; \x3ca href\x3d"http://www.opencyclemap.org"\x3eOpenCycleMap\x3c/a\x3e, {attribution.OpenStreetMap}'}}, +OpenSeaMap:{url:"http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png",options:{attribution:'Map data: \x26copy; \x3ca href\x3d"http://www.openseamap.org"\x3eOpenSeaMap\x3c/a\x3e contributors'}},Thunderforest:{url:"http://{s}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png",options:{attribution:"{attribution.OpenCycleMap}"},variants:{OpenCycleMap:{},Transport:{url:"http://{s}.tile2.opencyclemap.org/transport/{z}/{x}/{y}.png"},Landscape:{url:"http://{s}.tile3.opencyclemap.org/landscape/{z}/{x}/{y}.png"}, +Outdoors:{url:"http://{s}.tile.thunderforest.com/outdoors/{z}/{x}/{y}.png"}}},OpenMapSurfer:{url:"http://openmapsurfer.uni-hd.de/tiles/roads/x\x3d{x}\x26y\x3d{y}\x26z\x3d{z}",options:{attribution:'Imagery from \x3ca href\x3d"http://giscience.uni-hd.de/"\x3eGIScience Research Group @ University of Heidelberg\x3c/a\x3e \x26mdash; Map data {attribution.OpenStreetMap}'},variants:{Roads:{},AdminBounds:{url:"http://openmapsurfer.uni-hd.de/tiles/adminb/x\x3d{x}\x26y\x3d{y}\x26z\x3d{z}"},Grayscale:{url:"http://openmapsurfer.uni-hd.de/tiles/roadsg/x\x3d{x}\x26y\x3d{y}\x26z\x3d{z}"}}}, +MapQuestOpen:{url:"http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpeg",options:{attribution:'Tiles Courtesy of \x3ca href\x3d"http://www.mapquest.com/"\x3eMapQuest\x3c/a\x3e \x26mdash; Map data {attribution.OpenStreetMap}',subdomains:"1234"},variants:{OSM:{},Aerial:{url:"http://oatile{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg",options:{attribution:'Tiles Courtesy of \x3ca href\x3d"http://www.mapquest.com/"\x3eMapQuest\x3c/a\x3e \x26mdash; Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency'}}}}, +MapBox:{url:function(a){return"http://{s}.tiles.mapbox.com/v3/"+a+"/{z}/{x}/{y}.png"},options:{attribution:'Imagery from \x3ca href\x3d"http://mapbox.com/about/maps/"\x3eMapBox\x3c/a\x3e \x26mdash; Map data {attribution.OpenStreetMap}',subdomains:"abcd"}},Stamen:{url:"http://{s}.tile.stamen.com/toner/{z}/{x}/{y}.png",options:{attribution:'Map tiles by \x3ca href\x3d"http://stamen.com"\x3eStamen Design\x3c/a\x3e, \x3ca href\x3d"http://creativecommons.org/licenses/by/3.0"\x3eCC BY 3.0\x3c/a\x3e \x26mdash; Map data {attribution.OpenStreetMap}', +subdomains:"abcd",minZoom:0,maxZoom:20},variants:{Toner:{},TonerBackground:{url:"http://{s}.tile.stamen.com/toner-background/{z}/{x}/{y}.png"},TonerHybrid:{url:"http://{s}.tile.stamen.com/toner-hybrid/{z}/{x}/{y}.png"},TonerLines:{url:"http://{s}.tile.stamen.com/toner-lines/{z}/{x}/{y}.png"},TonerLabels:{url:"http://{s}.tile.stamen.com/toner-labels/{z}/{x}/{y}.png"},TonerLite:{url:"http://{s}.tile.stamen.com/toner-lite/{z}/{x}/{y}.png"},Terrain:{url:"http://{s}.tile.stamen.com/terrain/{z}/{x}/{y}.jpg", +options:{minZoom:4,maxZoom:18}},TerrainBackground:{url:"http://{s}.tile.stamen.com/terrain-background/{z}/{x}/{y}.jpg",options:{minZoom:4,maxZoom:18}},Watercolor:{url:"http://{s}.tile.stamen.com/watercolor/{z}/{x}/{y}.jpg",options:{minZoom:3,maxZoom:16}}}},Esri:{url:"http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}",options:{attribution:"Tiles \x26copy; Esri"},variants:{WorldStreetMap:{options:{attribution:"{attribution.Esri} \x26mdash; Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012"}}, +DeLorme:{url:"http://server.arcgisonline.com/ArcGIS/rest/services/Specialty/DeLorme_World_Base_Map/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:11,attribution:"{attribution.Esri} \x26mdash; Copyright: \x26copy;2012 DeLorme"}},WorldTopoMap:{url:"http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}",options:{attribution:"{attribution.Esri} \x26mdash; Esri, DeLorme, NAVTEQ, TomTom, Intermap, iPC, USGS, FAO, NPS, NRCAN, GeoBase, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), and the GIS User Community"}}, +WorldImagery:{url:"http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",options:{attribution:"{attribution.Esri} \x26mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community"}},WorldTerrain:{url:"http://server.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer/tile/{z}/{y}/{x}",options:{maxZoom:13,attribution:"{attribution.Esri} \x26mdash; Source: USGS, Esri, TANA, DeLorme, and NPS"}}, +WorldShadedRelief:{url:"http://server.arcgisonline.com/ArcGIS/rest/services/World_Shaded_Relief/MapServer/tile/{z}/{y}/{x}",options:{maxZoom:13,attribution:"{attribution.Esri} \x26mdash; Source: Esri"}},WorldPhysical:{url:"http://server.arcgisonline.com/ArcGIS/rest/services/World_Physical_Map/MapServer/tile/{z}/{y}/{x}",options:{maxZoom:8,attribution:"{attribution.Esri} \x26mdash; Source: US National Park Service"}},OceanBasemap:{url:"http://services.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer/tile/{z}/{y}/{x}", +options:{maxZoom:13,attribution:"{attribution.Esri} \x26mdash; Sources: GEBCO, NOAA, CHS, OSU, UNH, CSUMB, National Geographic, DeLorme, NAVTEQ, and Esri"}},NatGeoWorldMap:{url:"http://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{z}/{y}/{x}",options:{maxZoom:16,attribution:"{attribution.Esri} \x26mdash; National Geographic, Esri, DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC"}},WorldGrayCanvas:{url:"http://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}", +options:{maxZoom:16,attribution:"{attribution.Esri} \x26mdash; Esri, DeLorme, NAVTEQ"}}}},OpenWeatherMap:{options:{attribution:'Map data \x26copy; \x3ca href\x3d"http://openweathermap.org"\x3eOpenWeatherMap\x3c/a\x3e',opacity:.5},variants:{Clouds:{url:"http://{s}.tile.openweathermap.org/map/clouds/{z}/{x}/{y}.png"},CloudsClassic:{url:"http://{s}.tile.openweathermap.org/map/clouds_cls/{z}/{x}/{y}.png"},Precipitation:{url:"http://{s}.tile.openweathermap.org/map/precipitation/{z}/{x}/{y}.png"},PrecipitationClassic:{url:"http://{s}.tile.openweathermap.org/map/precipitation_cls/{z}/{x}/{y}.png"}, +Rain:{url:"http://{s}.tile.openweathermap.org/map/rain/{z}/{x}/{y}.png"},RainClassic:{url:"http://{s}.tile.openweathermap.org/map/rain_cls/{z}/{x}/{y}.png"},Pressure:{url:"http://{s}.tile.openweathermap.org/map/pressure/{z}/{x}/{y}.png"},PressureContour:{url:"http://{s}.tile.openweathermap.org/map/pressure_cntr/{z}/{x}/{y}.png"},Wind:{url:"http://{s}.tile.openweathermap.org/map/wind/{z}/{x}/{y}.png"},Temperature:{url:"http://{s}.tile.openweathermap.org/map/temp/{z}/{x}/{y}.png"},Snow:{url:"http://{s}.tile.openweathermap.org/map/snow/{z}/{x}/{y}.png"}}}, +Nokia:{options:{attribution:'Map \x26copy; \x3ca href\x3d"http://developer.here.com"\x3eNokia\x3c/a\x3e, Data \x26copy; NAVTEQ 2012',subdomains:"1234",devID:"xyz",appID:"abc"},variants:{normalDay:{url:"http://{s}.maptile.lbs.ovi.com/maptiler/v2/maptile/newest/normal.day/{z}/{x}/{y}/256/png8?token\x3d{devID}\x26app_id\x3d{appID}"},normalGreyDay:{url:"http://{s}.maptile.lbs.ovi.com/maptiler/v2/maptile/newest/normal.day.grey/{z}/{x}/{y}/256/png8?token\x3d{devID}\x26app_id\x3d{appID}"},satelliteNoLabelsDay:{url:"http://{s}.maptile.lbs.ovi.com/maptiler/v2/maptile/newest/satellite.day/{z}/{x}/{y}/256/png8?token\x3d{devID}\x26app_id\x3d{appID}"}, +satelliteYesLabelsDay:{url:"http://{s}.maptile.lbs.ovi.com/maptiler/v2/maptile/newest/hybrid.day/{z}/{x}/{y}/256/png8?token\x3d{devID}\x26app_id\x3d{appID}"},terrainDay:{url:"http://{s}.maptile.lbs.ovi.com/maptiler/v2/maptile/newest/terrain.day/{z}/{x}/{y}/256/png8?token\x3d{devID}\x26app_id\x3d{appID}"}}},Acetate:{url:"http://a{s}.acetate.geoiq.com/tiles/acetate-hillshading/{z}/{x}/{y}.png",options:{attribution:"\x26copy;2012 Esri \x26 Stamen, Data from OSM and Natural Earth",subdomains:"0123",minZoom:2, +maxZoom:18},variants:{all:{},basemap:{url:"http://a{s}.acetate.geoiq.com/tiles/acetate-base/{z}/{x}/{y}.png"},terrain:{url:"http://a{s}.acetate.geoiq.com/tiles/terrain/{z}/{x}/{y}.png"},foreground:{url:"http://a{s}.acetate.geoiq.com/tiles/acetate-fg/{z}/{x}/{y}.png"},roads:{url:"http://a{s}.acetate.geoiq.com/tiles/acetate-roads/{z}/{x}/{y}.png"},labels:{url:"http://a{s}.acetate.geoiq.com/tiles/acetate-labels/{z}/{x}/{y}.png"},hillshading:{url:"http://a{s}.acetate.geoiq.com/tiles/hillshading/{z}/{x}/{y}.png"}}}}; +L.tileLayer.provider=function(a,b){return new L.TileLayer.Provider(a,b)};L.Control.Layers.Provided=L.Control.Layers.extend({initialize:function(a,b,f){var e,g=function(a){return a.replace(/\./g,": ").replace(/([a-z])([A-Z])/g,"$1 $2")};a.length&&(function(){for(var b={},d=a.length,c=0;c + + + + + + + + + + + + + + +
+ + + diff --git a/libraries/ckeditor/plugins/lineutils/dev/dnd.html b/libraries/ckeditor/plugins/lineutils/dev/dnd.html new file mode 100644 index 0000000..865dc59 --- /dev/null +++ b/libraries/ckeditor/plugins/lineutils/dev/dnd.html @@ -0,0 +1,172 @@ + + + + + + Widget Drag & Drop with Lineutils — CKEditor Sample + + + + + + +

+ CKEditor Samples » Widget Drag & Drop with Lineutils +

+ +

Classic (iframe-based) Editor

+ + + +

Inline Editor

+ +
+ + + + + + + + + + + + + + + +
This tableis thevery firstelement of the document.
We are stillable to accesthe space before it. + + + + + + + + + +
This table is inside of a cell of another table.
We can type either before or after it though.
+
+ +
+
+
    +
  1. This numbered list...
  2. +
  3. ...is a neighbour of a horizontal line...
  4. +
  5. +
      +
    1. Nested list!
    2. +
    +
  6. +
+ +
Saturn V +
Roll out of Saturn V on launch pad
+
+ +
    +
  • We can type between the lists...
  • +
  • ...thanks to Magicline.
  • +
+ +

Lorem ipsum dolor sit amet dui. Morbi vel turpis. Nullam et leo. Etiam rutrum, urna tellus dui vel tincidunt mattis egestas, justo fringilla vel, massa. Phasellus.

+ +

Quisque iaculis, dui lectus varius vitae, tortor. Proin lacus. Pellentesque ac lacus. Aenean nonummy commodo nec, pede. Etiam blandit risus elit.

+ +

Ut pretium. Vestibulum rutrum in, adipiscing elit. Sed in quam in purus sem vitae pede. Pellentesque bibendum, urna sem vel risus. Vivamus posuere metus. Aliquam gravida iaculis nisl. Nam enim. Aliquam erat ac lacus tellus ac felis.

+ +
+

This text is wrapped in a DIV element. We can type after this element though.

+
+
+ + + + + + diff --git a/libraries/ckeditor/plugins/lineutils/dev/magicfinger.html b/libraries/ckeditor/plugins/lineutils/dev/magicfinger.html new file mode 100644 index 0000000..1953110 --- /dev/null +++ b/libraries/ckeditor/plugins/lineutils/dev/magicfinger.html @@ -0,0 +1,285 @@ + + + + + + Lineutils — CKEditor Sample + + + + +

+ CKEditor Samples » Lineutils +

+ +

Classic (iframe-based) Editor

+ + + +

Inline Editor

+ +
+ + + + + + + + + + + + + + + +
This tableis thevery firstelement of the document.
We are stillable to accesthe space before it. + + + + + + + + + +
This table is inside of a cell of another table.
We can type either before or after it though.
+
+ +

Two succesive horizontal lines (HR tags). We can access the space in between:

+ +
+
+
    +
  1. This numbered list...
  2. +
  3. ...is a neighbour of a horizontal line...
  4. +
  5. +
      +
    1. Nested list!
    2. +
    +
  6. +
+ +
    +
  • We can type between the lists...
  • +
  • ...thanks to Magicline.
  • +
+ +

Lorem ipsum dolor sit amet dui. Morbi vel turpis. Nullam et leo. Etiam rutrum, urna tellus dui vel tincidunt mattis egestas, justo fringilla vel, massa. Phasellus.

+ +

Quisque iaculis, dui lectus varius vitae, tortor. Proin lacus. Pellentesque ac lacus. Aenean nonummy commodo nec, pede. Etiam blandit risus elit.

+ +

Ut pretium. Vestibulum rutrum in, adipiscing elit. Sed in quam in purus sem vitae pede. Pellentesque bibendum, urna sem vel risus. Vivamus posuere metus. Aliquam gravida iaculis nisl. Nam enim. Aliquam erat ac lacus tellus ac felis.

+ +
+

This text is wrapped in a DIV element. We can type after this element though.

+
+
+ +

Extreme inline

+ +
+
Lorem ipsum dolor sit amet enim. Etiam ullamcorper. Suspendisse a pellentesque dui, non felis. Maecenas malesuada elit lectus felis, malesuada ultricies. Curabitur et ligula. Ut molestie a, ultricies porta urna. Vestibulum commodo volutpat a, convallis ac, laoreet enim.
+
+ Position static +
foo
+
+
+
Key
Value
+
+
Whatever
+
+

Lorem ipsum dolor sit amet enim. Etiam ullamcorper. Suspendisse a pellentesque dui, non felis. Maecenas malesuada elit lectus felis, malesuada ultricies

+
+
+

Lorem ipsum dolor sit amet enim. Etiam ullamcorper. Suspendisse a pellentesque dui, non felis. Maecenas malesuada elit lectus felis, malesuada ultricies

+
foo
+
+ +

Classic (iframe-based) Editor, H-scroll

+ + + + + + + + diff --git a/libraries/ckeditor/plugins/lineutils/plugin.js b/libraries/ckeditor/plugins/lineutils/plugin.js new file mode 100644 index 0000000..563c667 --- /dev/null +++ b/libraries/ckeditor/plugins/lineutils/plugin.js @@ -0,0 +1,1018 @@ +/** + * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ + + /** + * @fileOverview A set of utilities to find and create horizontal spaces in edited content. + */ + +'use strict'; + +( function() { + + CKEDITOR.plugins.add( 'lineutils' ); + + /** + * Determines a position relative to an element in DOM (before). + * + * @readonly + * @property {Number} [=0] + * @member CKEDITOR + */ + CKEDITOR.LINEUTILS_BEFORE = 1; + + /** + * Determines a position relative to an element in DOM (after). + * + * @readonly + * @property {Number} [=2] + * @member CKEDITOR + */ + CKEDITOR.LINEUTILS_AFTER = 2; + + /** + * Determines a position relative to an element in DOM (inside). + * + * @readonly + * @property {Number} [=4] + * @member CKEDITOR + */ + CKEDITOR.LINEUTILS_INSIDE = 4; + + /** + * A utility that traverses the DOM tree and discovers elements + * (relations) matching user-defined lookups. + * + * @private + * @class CKEDITOR.plugins.lineutils.finder + * @constructor Creates a Finder class instance. + * @param {CKEDITOR.editor} editor Editor instance that the Finder belongs to. + * @param {Object} def Finder's definition. + * @since 4.3 + */ + function Finder( editor, def ) { + CKEDITOR.tools.extend( this, { + editor: editor, + editable: editor.editable(), + doc: editor.document, + win: editor.window + }, def, true ); + + this.inline = this.editable.isInline(); + + if ( !this.inline ) { + this.frame = this.win.getFrame(); + } + + this.target = this[ this.inline ? 'editable' : 'doc' ]; + } + + Finder.prototype = { + /** + * Initializes searching for elements with every mousemove event fired. + * To stop searching use {@link #stop}. + * + * @param {Function} [callback] Function executed on every iteration. + */ + start: function( callback ) { + var that = this, + editor = this.editor, + doc = this.doc, + el, elfp, x, y; + + var moveBuffer = CKEDITOR.tools.eventsBuffer( 50, function() { + if ( editor.readOnly || editor.mode != 'wysiwyg' ) + return; + + that.relations = {}; + + // Sometimes it happens that elementFromPoint returns null (especially on IE). + // Any further traversal makes no sense if there's no start point. Abort. + // Note: In IE8 elementFromPoint may return zombie nodes of undefined nodeType, + // so rejecting those as well. + if ( !( elfp = doc.$.elementFromPoint( x, y ) ) || !elfp.nodeType ) { + return; + } + + el = new CKEDITOR.dom.element( elfp ); + + that.traverseSearch( el ); + + if ( !isNaN( x + y ) ) { + that.pixelSearch( el, x, y ); + } + + callback && callback( that.relations, x, y ); + } ); + + // Searching starting from element from point on mousemove. + this.listener = this.editable.attachListener( this.target, 'mousemove', function( evt ) { + x = evt.data.$.clientX; + y = evt.data.$.clientY; + + moveBuffer.input(); + } ); + + this.editable.attachListener( this.inline ? this.editable : this.frame, 'mouseout', function() { + moveBuffer.reset(); + } ); + }, + + /** + * Stops observing mouse events attached by {@link #start}. + */ + stop: function() { + if ( this.listener ) { + this.listener.removeListener(); + } + }, + + /** + * Returns a range representing the relation, according to its element + * and type. + * + * @param {Object} location Location containing a unique identifier and type. + * @returns {CKEDITOR.dom.range} Range representing the relation. + */ + getRange: ( function() { + var where = {}; + + where[ CKEDITOR.LINEUTILS_BEFORE ] = CKEDITOR.POSITION_BEFORE_START; + where[ CKEDITOR.LINEUTILS_AFTER ] = CKEDITOR.POSITION_AFTER_END; + where[ CKEDITOR.LINEUTILS_INSIDE ] = CKEDITOR.POSITION_AFTER_START; + + return function( location ) { + var range = this.editor.createRange(); + + range.moveToPosition( this.relations[ location.uid ].element, where[ location.type ] ); + + return range; + }; + } )(), + + /** + * Stores given relation in a {@link #relations} object. Processes the relation + * to normalize and avoid duplicates. + * + * @param {CKEDITOR.dom.element} el Element of the relation. + * @param {Number} type Relation, one of `CKEDITOR.LINEUTILS_AFTER`, `CKEDITOR.LINEUTILS_BEFORE`, `CKEDITOR.LINEUTILS_INSIDE`. + */ + store: ( function() { + function merge( el, type, relations ) { + var uid = el.getUniqueId(); + + if ( uid in relations ) { + relations[ uid ].type |= type; + } else { + relations[ uid ] = { element: el, type: type }; + } + } + + return function( el, type ) { + var alt; + + // Normalization to avoid duplicates: + // CKEDITOR.LINEUTILS_AFTER becomes CKEDITOR.LINEUTILS_BEFORE of el.getNext(). + if ( is( type, CKEDITOR.LINEUTILS_AFTER ) && isStatic( alt = el.getNext() ) && alt.isVisible() ) { + merge( alt, CKEDITOR.LINEUTILS_BEFORE, this.relations ); + type ^= CKEDITOR.LINEUTILS_AFTER; + } + + // Normalization to avoid duplicates: + // CKEDITOR.LINEUTILS_INSIDE becomes CKEDITOR.LINEUTILS_BEFORE of el.getFirst(). + if ( is( type, CKEDITOR.LINEUTILS_INSIDE ) && isStatic( alt = el.getFirst() ) && alt.isVisible() ) { + merge( alt, CKEDITOR.LINEUTILS_BEFORE, this.relations ); + type ^= CKEDITOR.LINEUTILS_INSIDE; + } + + merge( el, type, this.relations ); + }; + } )(), + + /** + * Traverses the DOM tree towards root, checking all ancestors + * with lookup rules, avoiding duplicates. Stores positive relations + * in the {@link #relations} object. + * + * @param {CKEDITOR.dom.element} el Element which is the starting point. + */ + traverseSearch: function( el ) { + var l, type, uid; + + // Go down DOM towards root (or limit). + do { + uid = el.$[ 'data-cke-expando' ]; + + // This element was already visited and checked. + if ( uid && uid in this.relations ) { + continue; + } + + if ( el.equals( this.editable ) ) { + return; + } + + if ( isStatic( el ) ) { + // Collect all addresses yielded by lookups for that element. + for ( l in this.lookups ) { + + if ( ( type = this.lookups[ l ]( el ) ) ) { + this.store( el, type ); + } + } + } + } while ( !isLimit( el ) && ( el = el.getParent() ) ); + }, + + /** + * Iterates vertically pixel-by-pixel within a given element starting + * from given coordinates, searching for elements in the neighborhood. + * Once an element is found it is processed by {@link #traverseSearch}. + * + * @param {CKEDITOR.dom.element} el Element which is the starting point. + * @param {Number} [x] Horizontal mouse coordinate relative to the viewport. + * @param {Number} [y] Vertical mouse coordinate relative to the viewport. + */ + pixelSearch: ( function() { + var contains = CKEDITOR.env.ie || CKEDITOR.env.webkit ? + function( el, found ) { + return el.contains( found ); + } : function( el, found ) { + return !!( el.compareDocumentPosition( found ) & 16 ); + }; + + // Iterates pixel-by-pixel from starting coordinates, moving by defined + // step and getting elementFromPoint in every iteration. Iteration stops when: + // * A valid element is found. + // * Condition function returns `false` (i.e. reached boundaries of viewport). + // * No element is found (i.e. coordinates out of viewport). + // * Element found is ascendant of starting element. + // + // @param {Object} doc Native DOM document. + // @param {Object} el Native DOM element. + // @param {Number} xStart Horizontal starting coordinate to use. + // @param {Number} yStart Vertical starting coordinate to use. + // @param {Number} step Step of the algorithm. + // @param {Function} condition A condition relative to current vertical coordinate. + function iterate( el, xStart, yStart, step, condition ) { + var y = yStart, + tryouts = 0, + found; + + while ( condition( y ) ) { + y += step; + + // If we try and we try, and still nothing's found, let's end + // that party. + if ( ++tryouts == 25 ) { + return; + } + + found = this.doc.$.elementFromPoint( xStart, y ); + + // Nothing found. This is crazy... but... + // It might be that a line, which is in different document, + // covers that pixel (elementFromPoint is doc-sensitive). + // Better let's have another try. + if ( !found ) { + continue; + } + + // Still in the same element. + else if ( found == el ) { + tryouts = 0; + continue; + } + + // Reached the edge of an element and found an ancestor or... + // A line, that covers that pixel. Better let's have another try. + else if ( !contains( el, found ) ) { + continue; + } + + tryouts = 0; + + // Found a valid element. Stop iterating. + if ( isStatic( ( found = new CKEDITOR.dom.element( found ) ) ) ) { + return found; + } + } + } + + return function( el, x, y ) { + var paneHeight = this.win.getViewPaneSize().height, + + // Try to find an element iterating *up* from the starting point. + neg = iterate.call( this, el.$, x, y, -1, function( y ) { + return y > 0; + } ), + + // Try to find an element iterating *down* from the starting point. + pos = iterate.call( this, el.$, x, y, 1, function( y ) { + return y < paneHeight; + } ); + + if ( neg ) { + this.traverseSearch( neg ); + + // Iterate towards DOM root until neg is a direct child of el. + while ( !neg.getParent().equals( el ) ) { + neg = neg.getParent(); + } + } + + if ( pos ) { + this.traverseSearch( pos ); + + // Iterate towards DOM root until pos is a direct child of el. + while ( !pos.getParent().equals( el ) ) { + pos = pos.getParent(); + } + } + + // Iterate forwards starting from neg and backwards from + // pos to harvest all children of el between those elements. + // Stop when neg and pos meet each other or there's none of them. + // TODO (?) reduce number of hops forwards/backwards. + while ( neg || pos ) { + if ( neg ) { + neg = neg.getNext( isStatic ); + } + + if ( !neg || neg.equals( pos ) ) { + break; + } + + this.traverseSearch( neg ); + + if ( pos ) { + pos = pos.getPrevious( isStatic ); + } + + if ( !pos || pos.equals( neg ) ) { + break; + } + + this.traverseSearch( pos ); + } + }; + } )(), + + /** + * Unlike {@link #traverseSearch}, it collects **all** elements from editable's DOM tree + * and runs lookups for every one of them, collecting relations. + * + * @returns {Object} {@link #relations}. + */ + greedySearch: function() { + this.relations = {}; + + var all = this.editable.getElementsByTag( '*' ), + i = 0, + el, type, l; + + while ( ( el = all.getItem( i++ ) ) ) { + // Don't consider editable, as it might be inline, + // and i.e. checking it's siblings is pointless. + if ( el.equals( this.editable ) ) { + continue; + } + + // On IE8 element.getElementsByTagName returns comments... sic! (#13176) + if ( el.type != CKEDITOR.NODE_ELEMENT ) { + continue; + } + + // Don't visit non-editable internals, for example widget's + // guts (above wrapper, below nested). Still check editable limits, + // as they are siblings with editable contents. + if ( !el.hasAttribute( 'contenteditable' ) && el.isReadOnly() ) { + continue; + } + + if ( isStatic( el ) && el.isVisible() ) { + // Collect all addresses yielded by lookups for that element. + for ( l in this.lookups ) { + if ( ( type = this.lookups[ l ]( el ) ) ) { + this.store( el, type ); + } + } + } + } + + return this.relations; + } + + /** + * Relations express elements in DOM that match user-defined {@link #lookups}. + * Every relation has its own `type` that determines whether + * it refers to the space before, after or inside the `element`. + * This object stores relations found by {@link #traverseSearch} or {@link #greedySearch}, structured + * in the following way: + * + * relations: { + * // Unique identifier of the element. + * Number: { + * // Element of this relation. + * element: {@link CKEDITOR.dom.element} + * // Conjunction of CKEDITOR.LINEUTILS_BEFORE, CKEDITOR.LINEUTILS_AFTER and CKEDITOR.LINEUTILS_INSIDE. + * type: Number + * }, + * ... + * } + * + * @property {Object} relations + * @readonly + */ + + /** + * A set of user-defined functions used by Finder to check if an element + * is a valid relation, belonging to {@link #relations}. + * When the criterion is met, lookup returns a logical conjunction of `CKEDITOR.LINEUTILS_BEFORE`, + * `CKEDITOR.LINEUTILS_AFTER` or `CKEDITOR.LINEUTILS_INSIDE`. + * + * Lookups are passed along with Finder's definition. + * + * lookups: { + * 'some lookup': function( el ) { + * if ( someCondition ) + * return CKEDITOR.LINEUTILS_BEFORE; + * }, + * ... + * } + * + * @property {Object} lookups + */ + }; + + + /** + * A utility that analyses relations found by + * CKEDITOR.plugins.lineutils.finder and locates them + * in the viewport as horizontal lines of specific coordinates. + * + * @private + * @class CKEDITOR.plugins.lineutils.locator + * @constructor Creates a Locator class instance. + * @param {CKEDITOR.editor} editor Editor instance that Locator belongs to. + * @since 4.3 + */ + function Locator( editor, def ) { + CKEDITOR.tools.extend( this, def, { + editor: editor + }, true ); + } + + Locator.prototype = { + /** + * Locates the Y coordinate for all types of every single relation and stores + * them in an object. + * + * @param {Object} relations {@link CKEDITOR.plugins.lineutils.finder#relations}. + * @returns {Object} {@link #locations}. + */ + locate: ( function() { + function locateSibling( rel, type ) { + var sib = rel.element[ type === CKEDITOR.LINEUTILS_BEFORE ? 'getPrevious' : 'getNext' ](); + + // Return the middle point between siblings. + if ( sib && isStatic( sib ) ) { + rel.siblingRect = sib.getClientRect(); + + if ( type == CKEDITOR.LINEUTILS_BEFORE ) { + return ( rel.siblingRect.bottom + rel.elementRect.top ) / 2; + } else { + return ( rel.elementRect.bottom + rel.siblingRect.top ) / 2; + } + } + + // If there's no sibling, use the edge of an element. + else { + if ( type == CKEDITOR.LINEUTILS_BEFORE ) { + return rel.elementRect.top; + } else { + return rel.elementRect.bottom; + } + } + } + + return function( relations ) { + var rel; + + this.locations = {}; + + for ( var uid in relations ) { + rel = relations[ uid ]; + rel.elementRect = rel.element.getClientRect(); + + if ( is( rel.type, CKEDITOR.LINEUTILS_BEFORE ) ) { + this.store( uid, CKEDITOR.LINEUTILS_BEFORE, locateSibling( rel, CKEDITOR.LINEUTILS_BEFORE ) ); + } + + if ( is( rel.type, CKEDITOR.LINEUTILS_AFTER ) ) { + this.store( uid, CKEDITOR.LINEUTILS_AFTER, locateSibling( rel, CKEDITOR.LINEUTILS_AFTER ) ); + } + + // The middle point of the element. + if ( is( rel.type, CKEDITOR.LINEUTILS_INSIDE ) ) { + this.store( uid, CKEDITOR.LINEUTILS_INSIDE, ( rel.elementRect.top + rel.elementRect.bottom ) / 2 ); + } + } + + return this.locations; + }; + } )(), + + /** + * Calculates distances from every location to given vertical coordinate + * and sorts locations according to that distance. + * + * @param {Number} y The vertical coordinate used for sorting, used as a reference. + * @param {Number} [howMany] Determines the number of "closest locations" to be returned. + * @returns {Array} Sorted, array representation of {@link #locations}. + */ + sort: ( function() { + var locations, sorted, + dist, i; + + function distance( y, uid, type ) { + return Math.abs( y - locations[ uid ][ type ] ); + } + + return function( y, howMany ) { + locations = this.locations; + sorted = []; + + for ( var uid in locations ) { + for ( var type in locations[ uid ] ) { + dist = distance( y, uid, type ); + + // An array is empty. + if ( !sorted.length ) { + sorted.push( { uid: +uid, type: type, dist: dist } ); + } else { + // Sort the array on fly when it's populated. + for ( i = 0; i < sorted.length; i++ ) { + if ( dist < sorted[ i ].dist ) { + sorted.splice( i, 0, { uid: +uid, type: type, dist: dist } ); + break; + } + } + + // Nothing was inserted, so the distance is bigger than + // any of already calculated: push to the end. + if ( i == sorted.length ) { + sorted.push( { uid: +uid, type: type, dist: dist } ); + } + } + } + } + + if ( typeof howMany != 'undefined' ) { + return sorted.slice( 0, howMany ); + } else { + return sorted; + } + }; + } )(), + + /** + * Stores the location in a collection. + * + * @param {Number} uid Unique identifier of the relation. + * @param {Number} type One of `CKEDITOR.LINEUTILS_BEFORE`, `CKEDITOR.LINEUTILS_AFTER` and `CKEDITOR.LINEUTILS_INSIDE`. + * @param {Number} y Vertical position of the relation. + */ + store: function( uid, type, y ) { + if ( !this.locations[ uid ] ) { + this.locations[ uid ] = {}; + } + + this.locations[ uid ][ type ] = y; + } + + /** + * @readonly + * @property {Object} locations + */ + }; + + var tipCss = { + display: 'block', + width: '0px', + height: '0px', + 'border-color': 'transparent', + 'border-style': 'solid', + position: 'absolute', + top: '-6px' + }, + + lineStyle = { + height: '0px', + 'border-top': '1px dashed red', + position: 'absolute', + 'z-index': 9999 + }, + + lineTpl = + '
' + + ' ' + + ' ' + + '
'; + + /** + * A utility that draws horizontal lines in DOM according to locations + * returned by CKEDITOR.plugins.lineutils.locator. + * + * @private + * @class CKEDITOR.plugins.lineutils.liner + * @constructor Creates a Liner class instance. + * @param {CKEDITOR.editor} editor Editor instance that Liner belongs to. + * @param {Object} def Liner's definition. + * @since 4.3 + */ + function Liner( editor, def ) { + var editable = editor.editable(); + + CKEDITOR.tools.extend( this, { + editor: editor, + editable: editable, + inline: editable.isInline(), + doc: editor.document, + win: editor.window, + container: CKEDITOR.document.getBody(), + winTop: CKEDITOR.document.getWindow() + }, def, true ); + + this.hidden = {}; + this.visible = {}; + + if ( !this.inline ) { + this.frame = this.win.getFrame(); + } + + this.queryViewport(); + + // Callbacks must be wrapped. Otherwise they're not attached + // to global DOM objects (i.e. topmost window) for every editor + // because they're treated as duplicates. They belong to the + // same prototype shared among Liner instances. + var queryViewport = CKEDITOR.tools.bind( this.queryViewport, this ), + hideVisible = CKEDITOR.tools.bind( this.hideVisible, this ), + removeAll = CKEDITOR.tools.bind( this.removeAll, this ); + + editable.attachListener( this.winTop, 'resize', queryViewport ); + editable.attachListener( this.winTop, 'scroll', queryViewport ); + + editable.attachListener( this.winTop, 'resize', hideVisible ); + editable.attachListener( this.win, 'scroll', hideVisible ); + + editable.attachListener( this.inline ? editable : this.frame, 'mouseout', function( evt ) { + var x = evt.data.$.clientX, + y = evt.data.$.clientY; + + this.queryViewport(); + + // Check if mouse is out of the element (iframe/editable). + if ( x <= this.rect.left || x >= this.rect.right || y <= this.rect.top || y >= this.rect.bottom ) { + this.hideVisible(); + } + + // Check if mouse is out of the top-window vieport. + if ( x <= 0 || x >= this.winTopPane.width || y <= 0 || y >= this.winTopPane.height ) { + this.hideVisible(); + } + }, this ); + + editable.attachListener( editor, 'resize', queryViewport ); + editable.attachListener( editor, 'mode', removeAll ); + editor.on( 'destroy', removeAll ); + + this.lineTpl = new CKEDITOR.template( lineTpl ).output( { + lineStyle: CKEDITOR.tools.writeCssText( + CKEDITOR.tools.extend( {}, lineStyle, this.lineStyle, true ) + ), + tipLeftStyle: CKEDITOR.tools.writeCssText( + CKEDITOR.tools.extend( {}, tipCss, { + left: '0px', + 'border-left-color': 'red', + 'border-width': '6px 0 6px 6px' + }, this.tipCss, this.tipLeftStyle, true ) + ), + tipRightStyle: CKEDITOR.tools.writeCssText( + CKEDITOR.tools.extend( {}, tipCss, { + right: '0px', + 'border-right-color': 'red', + 'border-width': '6px 6px 6px 0' + }, this.tipCss, this.tipRightStyle, true ) + ) + } ); + } + + Liner.prototype = { + /** + * Permanently removes all lines (both hidden and visible) from DOM. + */ + removeAll: function() { + var l; + + for ( l in this.hidden ) { + this.hidden[ l ].remove(); + delete this.hidden[ l ]; + } + + for ( l in this.visible ) { + this.visible[ l ].remove(); + delete this.visible[ l ]; + } + }, + + /** + * Hides a given line. + * + * @param {CKEDITOR.dom.element} line The line to be hidden. + */ + hideLine: function( line ) { + var uid = line.getUniqueId(); + + line.hide(); + + this.hidden[ uid ] = line; + delete this.visible[ uid ]; + }, + + /** + * Shows a given line. + * + * @param {CKEDITOR.dom.element} line The line to be shown. + */ + showLine: function( line ) { + var uid = line.getUniqueId(); + + line.show(); + + this.visible[ uid ] = line; + delete this.hidden[ uid ]; + }, + + /** + * Hides all visible lines. + */ + hideVisible: function() { + for ( var l in this.visible ) { + this.hideLine( this.visible[ l ] ); + } + }, + + /** + * Shows a line at given location. + * + * @param {Object} location Location object containing the unique identifier of the relation + * and its type. Usually returned by {@link CKEDITOR.plugins.lineutils.locator#sort}. + * @param {Function} [callback] A callback to be called once the line is shown. + */ + placeLine: function( location, callback ) { + var styles, line, l; + + // No style means that line would be out of viewport. + if ( !( styles = this.getStyle( location.uid, location.type ) ) ) { + return; + } + + // Search for any visible line of a different hash first. + // It's faster to re-position visible line than to show it. + for ( l in this.visible ) { + if ( this.visible[ l ].getCustomData( 'hash' ) !== this.hash ) { + line = this.visible[ l ]; + break; + } + } + + // Search for any hidden line of a different hash. + if ( !line ) { + for ( l in this.hidden ) { + if ( this.hidden[ l ].getCustomData( 'hash' ) !== this.hash ) { + this.showLine( ( line = this.hidden[ l ] ) ); + break; + } + } + } + + // If no line available, add the new one. + if ( !line ) { + this.showLine( ( line = this.addLine() ) ); + } + + // Mark the line with current hash. + line.setCustomData( 'hash', this.hash ); + + // Mark the line as visible. + this.visible[ line.getUniqueId() ] = line; + + line.setStyles( styles ); + + callback && callback( line ); + }, + + /** + * Creates a style set to be used by the line, representing a particular + * relation (location). + * + * @param {Number} uid Unique identifier of the relation. + * @param {Number} type Type of the relation. + * @returns {Object} An object containing styles. + */ + getStyle: function( uid, type ) { + var rel = this.relations[ uid ], + loc = this.locations[ uid ][ type ], + styles = {}, + hdiff; + + // Line should be between two elements. + if ( rel.siblingRect ) { + styles.width = Math.max( rel.siblingRect.width, rel.elementRect.width ); + } + // Line is relative to a single element. + else { + styles.width = rel.elementRect.width; + } + + // Let's calculate the vertical position of the line. + if ( this.inline ) { + // (#13155) + styles.top = loc + this.winTopScroll.y - this.rect.relativeY; + } else { + styles.top = this.rect.top + this.winTopScroll.y + loc; + } + + // Check if line would be vertically out of the viewport. + if ( styles.top - this.winTopScroll.y < this.rect.top || styles.top - this.winTopScroll.y > this.rect.bottom ) { + return false; + } + + // Now let's calculate the horizontal alignment (left and width). + if ( this.inline ) { + // (#13155) + styles.left = rel.elementRect.left - this.rect.relativeX; + } else { + if ( rel.elementRect.left > 0 ) + styles.left = this.rect.left + rel.elementRect.left; + + // H-scroll case. Left edge of element may be out of viewport. + else { + styles.width += rel.elementRect.left; + styles.left = this.rect.left; + } + + // H-scroll case. Right edge of element may be out of viewport. + if ( ( hdiff = styles.left + styles.width - ( this.rect.left + this.winPane.width ) ) > 0 ) { + styles.width -= hdiff; + } + } + + // Finally include horizontal scroll of the global window. + styles.left += this.winTopScroll.x; + + // Append 'px' to style values. + for ( var style in styles ) { + styles[ style ] = CKEDITOR.tools.cssLength( styles[ style ] ); + } + + return styles; + }, + + /** + * Adds a new line to DOM. + * + * @returns {CKEDITOR.dom.element} A brand-new line. + */ + addLine: function() { + var line = CKEDITOR.dom.element.createFromHtml( this.lineTpl ); + + line.appendTo( this.container ); + + return line; + }, + + /** + * Assigns a unique hash to the instance that is later used + * to tell unwanted lines from new ones. This method **must** be called + * before a new set of relations is to be visualized so {@link #cleanup} + * eventually hides obsolete lines. This is because lines + * are re-used between {@link #placeLine} calls and the number of + * necessary ones may vary depending on the number of relations. + * + * @param {Object} relations {@link CKEDITOR.plugins.lineutils.finder#relations}. + * @param {Object} locations {@link CKEDITOR.plugins.lineutils.locator#locations}. + */ + prepare: function( relations, locations ) { + this.relations = relations; + this.locations = locations; + this.hash = Math.random(); + }, + + /** + * Hides all visible lines that do not belong to current hash + * and no longer represent relations (locations). + * + * See also: {@link #prepare}. + */ + cleanup: function() { + var line; + + for ( var l in this.visible ) { + line = this.visible[ l ]; + + if ( line.getCustomData( 'hash' ) !== this.hash ) { + this.hideLine( line ); + } + } + }, + + /** + * Queries dimensions of the viewport, editable, frame etc. + * that are used for correct positioning of the line. + */ + queryViewport: function() { + this.winPane = this.win.getViewPaneSize(); + this.winTopScroll = this.winTop.getScrollPosition(); + this.winTopPane = this.winTop.getViewPaneSize(); + + // (#13155) + this.rect = this.getClientRect( this.inline ? this.editable : this.frame ); + }, + + /** + * Returns `boundingClientRect` of an element, shifted by the position + * of `container` when the container is not `static` (#13155). + * + * See also: {@link CKEDITOR.dom.element#getClientRect}. + * + * @param {CKEDITOR.dom.element} el A DOM element. + * @returns {Object} A shifted rect, extended by `relativeY` and `relativeX` properties. + */ + getClientRect: function( el ) { + var rect = el.getClientRect(), + relativeContainerDocPosition = this.container.getDocumentPosition(), + relativeContainerComputedPosition = this.container.getComputedStyle( 'position' ); + + // Static or not, those values are used to offset the position of the line so they cannot be undefined. + rect.relativeX = rect.relativeY = 0; + + if ( relativeContainerComputedPosition != 'static' ) { + // Remember the offset used to shift the clientRect. + rect.relativeY = relativeContainerDocPosition.y; + rect.relativeX = relativeContainerDocPosition.x; + + rect.top -= rect.relativeY; + rect.bottom -= rect.relativeY; + rect.left -= rect.relativeX; + rect.right -= rect.relativeX; + } + + return rect; + } + }; + + function is( type, flag ) { + return type & flag; + } + + var floats = { left: 1, right: 1, center: 1 }, + positions = { absolute: 1, fixed: 1 }; + + function isElement( node ) { + return node && node.type == CKEDITOR.NODE_ELEMENT; + } + + function isFloated( el ) { + return !!( floats[ el.getComputedStyle( 'float' ) ] || floats[ el.getAttribute( 'align' ) ] ); + } + + function isPositioned( el ) { + return !!positions[ el.getComputedStyle( 'position' ) ]; + } + + function isLimit( node ) { + return isElement( node ) && node.getAttribute( 'contenteditable' ) == 'true'; + } + + function isStatic( node ) { + return isElement( node ) && !isFloated( node ) && !isPositioned( node ); + } + + /** + * Global namespace storing definitions and global helpers for the Line Utilities plugin. + * + * @private + * @class + * @singleton + * @since 4.3 + */ + CKEDITOR.plugins.lineutils = { + finder: Finder, + locator: Locator, + liner: Liner + }; +} )(); diff --git a/libraries/ckeditor/plugins/link/dialogs/anchor.js b/libraries/ckeditor/plugins/link/dialogs/anchor.js new file mode 100644 index 0000000..50677e1 --- /dev/null +++ b/libraries/ckeditor/plugins/link/dialogs/anchor.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.dialog.add("anchor",function(c){function e(b,a){return b.createFakeElement(b.document.createElement("a",{attributes:a}),"cke_anchor","anchor")}return{title:c.lang.link.anchor.title,minWidth:300,minHeight:60,onOk:function(){var b=CKEDITOR.tools.trim(this.getValueOf("info","txtName")),a={id:b,name:b,"data-cke-saved-name":b};this._.selectedElement?this._.selectedElement.data("cke-realelement")?(b=e(c,a),b.replace(this._.selectedElement),CKEDITOR.env.ie&&c.getSelection().selectElement(b)):this._.selectedElement.setAttributes(a): +(b=(b=c.getSelection())&&b.getRanges()[0],b.collapsed?(a=e(c,a),b.insertNode(a)):(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(a["class"]="cke_anchor"),a=new CKEDITOR.style({element:"a",attributes:a}),a.type=CKEDITOR.STYLE_INLINE,a.applyToRange(b)))},onHide:function(){delete this._.selectedElement},onShow:function(){var b=c.getSelection(),a;a=b.getRanges()[0];var d=b.getSelectedElement();a.shrink(CKEDITOR.SHRINK_ELEMENT);a=(d=a.getEnclosedNode())&&d.type===CKEDITOR.NODE_ELEMENT&&("anchor"===d.data("cke-real-element-type")|| +d.is("a"))?d:void 0;var f=(d=a&&a.data("cke-realelement"))?CKEDITOR.plugins.link.tryRestoreFakeAnchor(c,a):CKEDITOR.plugins.link.getSelectedLink(c);if(f){this._.selectedElement=f;var e=f.data("cke-saved-name");this.setValueOf("info","txtName",e||"");!d&&b.selectElement(f);a&&(this._.selectedElement=a)}this.getContentElement("info","txtName").focus()},contents:[{id:"info",label:c.lang.link.anchor.title,accessKey:"I",elements:[{type:"text",id:"txtName",label:c.lang.link.anchor.name,required:!0,validate:function(){return this.getValue()? +!0:(alert(c.lang.link.anchor.errorName),!1)}}]}]}}); \ No newline at end of file diff --git a/libraries/ckeditor/plugins/link/dialogs/link.js b/libraries/ckeditor/plugins/link/dialogs/link.js new file mode 100644 index 0000000..e8581a7 --- /dev/null +++ b/libraries/ckeditor/plugins/link/dialogs/link.js @@ -0,0 +1,28 @@ +/* + Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +(function(){CKEDITOR.dialog.add("link",function(c){function t(a,b){var c=a.createRange();c.setStartBefore(b);c.setEndAfter(b);return c}var n=CKEDITOR.plugins.link,q,r=function(){var a=this.getDialog(),b=a.getContentElement("target","popupFeatures"),a=a.getContentElement("target","linkTargetName"),p=this.getValue();if(b&&a)switch(b=b.getElement(),b.hide(),a.setValue(""),p){case "frame":a.setLabel(c.lang.link.targetFrameName);a.getElement().show();break;case "popup":b.show();a.setLabel(c.lang.link.targetPopupName); +a.getElement().show();break;default:a.setValue(p),a.getElement().hide()}},l=function(a){a.target&&this.setValue(a.target[this.id]||"")},e=function(a){a.advanced&&this.setValue(a.advanced[this.id]||"")},k=function(a){a.target||(a.target={});a.target[this.id]=this.getValue()||""},m=function(a){a.advanced||(a.advanced={});a.advanced[this.id]=this.getValue()||""},g=c.lang.common,b=c.lang.link,d;return{title:b.title,minWidth:"moono-lisa"==(CKEDITOR.skinName||c.config.skin)?450:350,minHeight:240,contents:[{id:"info", +label:b.info,title:b.info,elements:[{type:"text",id:"linkDisplayText",label:b.displayText,setup:function(){this.enable();this.setValue(c.getSelection().getSelectedText());q=this.getValue()},commit:function(a){a.linkText=this.isEnabled()?this.getValue():""}},{id:"linkType",type:"select",label:b.type,"default":"url",items:[[b.toUrl,"url"],[b.toAnchor,"anchor"],[b.toEmail,"email"]],onChange:function(){var a=this.getDialog(),b=["urlOptions","anchorOptions","emailOptions"],p=this.getValue(),f=a.definition.getContents("upload"), +f=f&&f.hidden;"url"==p?(c.config.linkShowTargetTab&&a.showPage("target"),f||a.showPage("upload")):(a.hidePage("target"),f||a.hidePage("upload"));for(f=0;f=f.length&&n.showDisplayTextForElement(h,a)?c.show():c.hide();this._.selectedElements=f;this.setupContent(b)},onOk:function(){var a={};this.commitContent(a);if(this._.selectedElements.length){var b= +this._.selectedElements,g=n.getLinkAttributes(c,a),f=[],h,d,l,e,k;for(k=0;k/g,"]--\x3e");var d=CKEDITOR.htmlParser.fragment.fromHtml(a);q=new CKEDITOR.htmlParser.filter({root:function(e){e.filterChildren(q);CKEDITOR.plugins.pastefromword.lists.cleanup(g.createLists(e))},elementNames:[[/^\?xml:namespace$/,""],[/^v:shapetype/,""],[new RegExp(y.join("|")),""]],elements:{a:function(e){if(e.attributes.name){if("_GoBack"== +e.attributes.name){delete e.name;return}if(e.attributes.name.match(/^OLE_LINK\d+$/)){delete e.name;return}}if(e.attributes.href&&e.attributes.href.match(/#.+$/)){var a=e.attributes.href.match(/#(.+)$/)[1];w[a]=e}e.attributes.name&&w[e.attributes.name]&&(e=w[e.attributes.name],e.attributes.href=e.attributes.href.replace(/.*#(.*)$/,"#$1"))},div:function(e){k.createStyleStack(e,q,b)},img:function(e){if(e.parent&&e.parent.attributes){var a=e.parent.attributes;(a=a.style||a.STYLE)&&a.match(/mso\-list:\s?Ignore/)&& +(e.attributes["cke-ignored"]=!0)}k.mapStyles(e,{width:function(a){k.setStyle(e,"width",a+"px")},height:function(a){k.setStyle(e,"height",a+"px")}});e.attributes.src&&e.attributes.src.match(/^file:\/\//)&&e.attributes.alt&&e.attributes.alt.match(/^https?:\/\//)&&(e.attributes.src=e.attributes.alt)},p:function(a){a.filterChildren(q);if(a.attributes.style&&a.attributes.style.match(/display:\s*none/i))return!1;if(g.thisIsAListItem(b,a))t.isEdgeListItem(b,a)&&t.cleanupEdgeListItem(a),g.convertToFakeListItem(b, +a),n.array.reduce(a.children,function(a,b){"p"===b.name&&(0c&&(c=a._tdBorders[d],b=d);k.setStyle(a,"border",b);c=(b=a.parent)&& +b.parent;if(b.name&&"div"===b.name&&b.attributes.align&&1===n.objectKeys(b.attributes).length&&1===b.children.length){a.attributes.align=b.attributes.align;d=b.children.splice(0);a.remove();for(a=d.length-1;0<=a;a--)c.add(d[a],b.getIndex());b.remove()}},td:function(a){var c=a.getAscendant("table"),d=c._tdBorders,f=["border","border-top","border-right","border-bottom","border-left"],c=n.parseCssText(c.attributes.style),m=c.background||c.BACKGROUND;m&&k.setStyle(a,"background",m,!0);(c=c["background-color"]|| +c["BACKGROUND-COLOR"])&&k.setStyle(a,"background-color",c,!0);var c=n.parseCssText(a.attributes.style),p;for(p in c)m=c[p],delete c[p],c[p.toLowerCase()]=m;for(p=0;p/)?!0:!1},convertToFakeListItem:function(a,b){t.isDegenerateListItem(a,b)&&t.assignListLevels(a,b);this.getListItemInfo(b);if(!b.attributes["cke-dissolved"]){var c; +b.forEach(function(a){!c&&"img"==a.name&&a.attributes["cke-ignored"]&&"*"==a.attributes.alt&&(c="·",a.remove())},CKEDITOR.NODE_ELEMENT);b.forEach(function(a){c||a.value.match(/^ /)||(c=a.value)},CKEDITOR.NODE_TEXT);if("undefined"==typeof c)return;b.attributes["cke-symbol"]=c.replace(/(?: | ).*$/,"");g.removeSymbolText(b)}if(b.attributes.style){var d=n.parseCssText(b.attributes.style);d["margin-left"]&&(delete d["margin-left"],b.attributes.style=CKEDITOR.tools.writeCssText(d))}b.name="cke:li"}, +convertToRealListItems:function(a){var b=[];a.forEach(function(a){"cke:li"==a.name&&(a.name="li",b.push(a))},CKEDITOR.NODE_ELEMENT,!1);return b},removeSymbolText:function(a){var b,c=a.attributes["cke-symbol"];a.forEach(function(d){!b&&d.value.match(c.replace(")","\\)").replace("(",""))&&(d.value=d.value.replace(c,""),d.parent.getHtml().match(/^(\s| )*$/)&&(b=d.parent!==a?d.parent:null))},CKEDITOR.NODE_TEXT);b&&b.remove()},setListSymbol:function(a,b,c){c=c||1;var d=n.parseCssText(a.attributes.style); +if("ol"==a.name){if(a.attributes.type||d["list-style-type"])return;var f={"[ivx]":"lower-roman","[IVX]":"upper-roman","[a-z]":"lower-alpha","[A-Z]":"upper-alpha","\\d":"decimal"},e;for(e in f)if(g.getSubsectionSymbol(b).match(new RegExp(e))){d["list-style-type"]=f[e];break}a.attributes["cke-list-style-type"]=d["list-style-type"]}else f={"·":"disc",o:"circle","§":"square"},!d["list-style-type"]&&f[b]&&(d["list-style-type"]=f[b]);g.setListSymbol.removeRedundancies(d,c);(a.attributes.style=CKEDITOR.tools.writeCssText(d))|| +delete a.attributes.style},setListStart:function(a){for(var b=[],c=0,d=0;db&&(a.attributes.dir="rtl")},createList:function(a){return(a.attributes["cke-symbol"].match(/([\da-np-zA-NP-Z]).?/)||[])[1]?new CKEDITOR.htmlParser.element("ol"):new CKEDITOR.htmlParser.element("ul")},createLists:function(a){var b,c,d,f=g.convertToRealListItems(a); +if(0===f.length)return[];var e=g.groupLists(f);for(a=0;al.length;){var p=g.createList(b),n=k.children;0f;f++)c[f]&&delete c[f];c[a[e].attributes["cke-list-level"]]= +k;d[d.length-1].push(a[e]);f=l}[].splice.apply(b,[].concat([n.indexOf(b,a),1],d))},isAListContinuation:function(a){var b=a;do if((b=b.previous)&&b.type===CKEDITOR.NODE_ELEMENT){if(void 0===b.attributes["cke-list-level"])break;if(b.attributes["cke-list-level"]===a.attributes["cke-list-level"])return b.attributes["cke-list-id"]===a.attributes["cke-list-id"]}while(b);return!1},getElementIndentation:function(a){a=n.parseCssText(a.attributes.style);if(a.margin||a.MARGIN){a.margin=a.margin||a.MARGIN;var b= +{styles:{margin:a.margin}};CKEDITOR.filter.transformationsTools.splitMarginShorthand(b);a["margin-left"]=b.styles["margin-left"]}return parseInt(n.convertToPx(a["margin-left"]||"0px"),10)},toArabic:function(a){return a.match(/[ivxl]/i)?a.match(/^l/i)?50+g.toArabic(a.slice(1)):a.match(/^lx/i)?40+g.toArabic(a.slice(1)):a.match(/^x/i)?10+g.toArabic(a.slice(1)):a.match(/^ix/i)?9+g.toArabic(a.slice(2)):a.match(/^v/i)?5+g.toArabic(a.slice(1)):a.match(/^iv/i)?4+g.toArabic(a.slice(2)):a.match(/^i/i)?1+g.toArabic(a.slice(1)): +g.toArabic(a.slice(1)):0},getSymbolInfo:function(a,b){var c=a.toUpperCase()==a?"upper-":"lower-",d={"·":["disc",-1],o:["circle",-2],"§":["square",-3]};if(a in d||b&&b.match(/(disc|circle|square)/))return{index:d[a][1],type:d[a][0]};if(a.match(/\d/))return{index:a?parseInt(g.getSubsectionSymbol(a),10):0,type:"decimal"};a=a.replace(/\W/g,"").toLowerCase();return!b&&a.match(/[ivxl]+/i)||b&&"alpha"!=b||"roman"==b?{index:g.toArabic(a),type:c+"roman"}:a.match(/[a-z]/i)?{index:a.charCodeAt(0)-97,type:c+ +"alpha"}:{index:-1,type:"disc"}},getListItemInfo:function(a){if(void 0!==a.attributes["cke-list-id"])return{id:a.attributes["cke-list-id"],level:a.attributes["cke-list-level"]};var b=n.parseCssText(a.attributes.style)["mso-list"],c={id:"0",level:"1"};b&&(b+=" ",c.level=b.match(/level(.+?)\s+/)[1],c.id=b.match(/l(\d+?)\s+/)[1]);a.attributes["cke-list-level"]=void 0!==a.attributes["cke-list-level"]?a.attributes["cke-list-level"]:c.level;a.attributes["cke-list-id"]=c.id;return c}};g=CKEDITOR.plugins.pastefromword.lists; +CKEDITOR.plugins.pastefromword.heuristics={isEdgeListItem:function(a,b){if(!CKEDITOR.env.edge||!a.config.pasteFromWord_heuristicsEdgeList)return!1;var c="";b.forEach&&b.forEach(function(a){c+=a.value},CKEDITOR.NODE_TEXT);return c.match(/^(?: | )*\(?[a-zA-Z0-9]+?[\.\)](?: | ){2,}/)?!0:t.isDegenerateListItem(a,b)},cleanupEdgeListItem:function(a){var b=!1;a.forEach(function(a){b||(a.value=a.value.replace(/^(?: |[\s])+/,""),a.value.length&&(b=!0))},CKEDITOR.NODE_TEXT)},isDegenerateListItem:function(a, +b){return!!b.attributes["cke-list-level"]||b.attributes.style&&!b.attributes.style.match(/mso\-list/)&&!!b.find(function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&b.name.match(/h\d/i)&&a.getHtml().match(/^[a-zA-Z0-9]+?[\.\)]$/))return!0;var d=n.parseCssText(a.attributes&&a.attributes.style,!0);if(!d)return!1;var f=d["font-family"]||"";return(d.font||d["font-size"]||"").match(/7pt/i)&&!!a.previous||f.match(/symbol/i)},!0).length},assignListLevels:function(a,b){if(!b.attributes||void 0===b.attributes["cke-list-level"]){for(var c= +[g.getElementIndentation(b)],d=[b],f=[],e=CKEDITOR.tools.array,h=e.map;b.next&&b.next.attributes&&!b.next.attributes["cke-list-level"]&&t.isDegenerateListItem(a,b.next);)b=b.next,c.push(g.getElementIndentation(b)),d.push(b);var k=h(c,function(a,b){return 0===b?0:a-c[b-1]}),n=this.guessIndentationStep(e.filter(c,function(a){return 0!==a})),f=h(c,function(a){return Math.round(a/n)});-1!==e.indexOf(f,0)&&(f=h(f,function(a){return a+1}));e.forEach(d,function(a,b){a.attributes["cke-list-level"]=f[b]}); +return{indents:c,levels:f,diffs:k}}},guessIndentationStep:function(a){return a.length?Math.min.apply(null,a):null},correctLevelShift:function(a){if(this.isShifted(a)){var b=CKEDITOR.tools.array.filter(a.children,function(a){return"ul"==a.name||"ol"==a.name}),c=CKEDITOR.tools.array.reduce(b,function(a,b){return(b.children&&1==b.children.length&&t.isShifted(b.children[0])?[b]:b.children).concat(a)},[]);CKEDITOR.tools.array.forEach(b,function(a){a.remove()});CKEDITOR.tools.array.forEach(c,function(b){a.add(b, +0)});delete a.name}},isShifted:function(a){return"li"!==a.name?!1:0===CKEDITOR.tools.array.filter(a.children,function(a){return a.name&&("ul"==a.name||"ol"==a.name||"p"==a.name&&0===a.children.length)?!1:!0}).length}};t=CKEDITOR.plugins.pastefromword.heuristics;g.setListSymbol.removeRedundancies=function(a,b){(1===b&&"disc"===a["list-style-type"]||"decimal"===a["list-style-type"])&&delete a["list-style-type"]};CKEDITOR.plugins.pastefromword.createAttributeStack=x;CKEDITOR.config.pasteFromWord_heuristicsEdgeList= +!0})(); \ No newline at end of file diff --git a/libraries/ckeditor/plugins/preview/preview.html b/libraries/ckeditor/plugins/preview/preview.html new file mode 100644 index 0000000..7eb8082 --- /dev/null +++ b/libraries/ckeditor/plugins/preview/preview.html @@ -0,0 +1,13 @@ + diff --git a/libraries/ckeditor/plugins/scayt/CHANGELOG.md b/libraries/ckeditor/plugins/scayt/CHANGELOG.md new file mode 100644 index 0000000..05cf2dd --- /dev/null +++ b/libraries/ckeditor/plugins/scayt/CHANGELOG.md @@ -0,0 +1,20 @@ +SCAYT plugin for CKEditor 4 Changelog +==================== +### CKEditor 4.5.6 + +New Features: +* CKEditor [language addon](http://ckeditor.com/addon/language) support +* CKEditor [placeholder addon](http://ckeditor.com/addon/placeholder) support +* Drag and Drop support +* *Experimental* GRAYT functionality http://www.webspellchecker.net/samples/scayt-ckeditor-plugin.html#25 + +Fixed issues: +* [#98](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/98) SCAYT Affects Dialog Double Click. Fixed in SCAYT Core. +* [#102](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/102) SCAYT Core performance enhancements +* [#104](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/104) SCAYT's spans leak into the clipboard and after pasting +* [#105](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/105) Javascript error fired in case of multiple instances of CKEditor in one page +* [#107](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/107) SCAYT should not check non-editable parts of content +* [#108](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/108) Latest SCAYT copies id of editor element to the iframe +* SCAYT stops working when CKEditor Undo plug-in not enabled +* Issue with pasting SCAYT markup in CKEditor +* [#32](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/32) SCAYT stops working after pressing Cancel button in WSC dialog diff --git a/libraries/ckeditor/plugins/scayt/LICENSE.md b/libraries/ckeditor/plugins/scayt/LICENSE.md new file mode 100644 index 0000000..610c807 --- /dev/null +++ b/libraries/ckeditor/plugins/scayt/LICENSE.md @@ -0,0 +1,28 @@ +Software License Agreement +========================== + +**CKEditor SCAYT Plugin** +Copyright © 2012, [CKSource](http://cksource.com) - Frederico Knabben. All rights reserved. + +Licensed under the terms of any of the following licenses at your choice: + +* GNU General Public License Version 2 or later (the "GPL"): + http://www.gnu.org/licenses/gpl.html + +* GNU Lesser General Public License Version 2.1 or later (the "LGPL"): + http://www.gnu.org/licenses/lgpl.html + +* Mozilla Public License Version 1.1 or later (the "MPL"): + http://www.mozilla.org/MPL/MPL-1.1.html + +You are not required to, but if you want to explicitly declare the license you have chosen to be bound to when using, reproducing, modifying and distributing this software, just include a text file titled "legal.txt" in your version of this software, indicating your license choice. + +Sources of Intellectual Property Included in this plugin +-------------------------------------------------------- + +Where not otherwise indicated, all plugin content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, the plugin will incorporate work done by developers outside of CKSource with their express permission. + +Trademarks +---------- + +CKEditor is a trademark of CKSource - Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders. diff --git a/libraries/ckeditor/plugins/scayt/README.md b/libraries/ckeditor/plugins/scayt/README.md new file mode 100644 index 0000000..1b3de25 --- /dev/null +++ b/libraries/ckeditor/plugins/scayt/README.md @@ -0,0 +1,25 @@ +CKEditor SCAYT Plugin +===================== + +This plugin brings Spell Check As You Type (SCAYT) into up to CKEditor 4+. + +SCAYT is a "installation-less", using the web-services of [WebSpellChecker.net](http://www.webspellchecker.net/). It's an out of the box solution. + +Installation +------------ + +1. Clone/copy this repository contents in a new "plugins/scayt" folder in your CKEditor installation. +2. Enable the "scayt" plugin in the CKEditor configuration file (config.js): + + config.extraPlugins = 'scayt'; + +That's all. SCAYT will appear on the editor toolbar and will be ready to use. + +License +------- + +Licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html). + +See LICENSE.md for more information. + +Developed in cooperation with [WebSpellChecker.net](http://www.webspellchecker.net/). diff --git a/libraries/ckeditor/plugins/scayt/dialogs/dialog.css b/libraries/ckeditor/plugins/scayt/dialogs/dialog.css new file mode 100644 index 0000000..427c4b4 --- /dev/null +++ b/libraries/ckeditor/plugins/scayt/dialogs/dialog.css @@ -0,0 +1,23 @@ +div.cke_dialog_ui_scaytItemList { + border: 1px solid #c9cccf; +} + +.cke_scaytItemList-child { + position: relative; + padding: 6px 30px 6px 5px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.cke_scaytItemList-child:hover { + background: #ebebeb; +} + +.cke_scaytItemList-child .cke_scaytItemList_remove { + position: absolute; + top: 0; + right: 5px; + width: 26px; + height: 26px; +} diff --git a/libraries/ckeditor/plugins/scayt/dialogs/options.js b/libraries/ckeditor/plugins/scayt/dialogs/options.js new file mode 100644 index 0000000..22f3a58 --- /dev/null +++ b/libraries/ckeditor/plugins/scayt/dialogs/options.js @@ -0,0 +1,33 @@ +CKEDITOR.dialog.add("scaytDialog",function(c){var d=c.scayt,k='\x3cp\x3e\x3cimg src\x3d"'+d.getLogo()+'" /\x3e\x3c/p\x3e\x3cp\x3e'+d.getLocal("version")+d.getVersion()+"\x3c/p\x3e\x3cp\x3e"+d.getLocal("text_copyrights")+"\x3c/p\x3e",n=CKEDITOR.document,p={isChanged:function(){return null===this.newLang||this.currentLang===this.newLang?!1:!0},currentLang:d.getLang(),newLang:null,reset:function(){this.currentLang=d.getLang();this.newLang=null},id:"lang"},k=[{id:"options",label:d.getLocal("tab_options"), +onShow:function(){},elements:[{type:"vbox",id:"scaytOptions",children:function(){var b=d.getApplicationConfig(),a=[],c={"ignore-all-caps-words":"label_allCaps","ignore-domain-names":"label_ignoreDomainNames","ignore-words-with-mixed-cases":"label_mixedCase","ignore-words-with-numbers":"label_mixedWithDigits"},f;for(f in b)b={type:"checkbox"},b.id=f,b.label=d.getLocal(c[f]),a.push(b);return a}(),onShow:function(){this.getChild();for(var b=c.scayt,a=0;ab[1]?c=1:a[1] div +{ + padding-bottom: 6px !important; +} + +.scayt-lang-list > div input +{ + margin-right: 4px; +} + +#scayt_about_ +{ + margin: 30px auto 0 auto; +} + +#scayt_about_ p +{ + text-align: center; + margin-bottom: 10px; +} + +.cke_dialog_contents_body div[name=dictionaries] .cke_dialog_ui_hbox_last > a.cke_dialog_ui_button +{ + margin-top: 0; +} diff --git a/libraries/ckeditor/plugins/showblocks/icons/hidpi/showblocks-rtl.png b/libraries/ckeditor/plugins/showblocks/icons/hidpi/showblocks-rtl.png new file mode 100644 index 0000000..21fd33f Binary files /dev/null and b/libraries/ckeditor/plugins/showblocks/icons/hidpi/showblocks-rtl.png differ diff --git a/libraries/ckeditor/plugins/showblocks/icons/hidpi/showblocks.png b/libraries/ckeditor/plugins/showblocks/icons/hidpi/showblocks.png new file mode 100644 index 0000000..94a8a39 Binary files /dev/null and b/libraries/ckeditor/plugins/showblocks/icons/hidpi/showblocks.png differ diff --git a/libraries/ckeditor/plugins/showblocks/icons/showblocks-rtl.png b/libraries/ckeditor/plugins/showblocks/icons/showblocks-rtl.png new file mode 100644 index 0000000..75bfd37 Binary files /dev/null and b/libraries/ckeditor/plugins/showblocks/icons/showblocks-rtl.png differ diff --git a/libraries/ckeditor/plugins/showblocks/icons/showblocks.png b/libraries/ckeditor/plugins/showblocks/icons/showblocks.png new file mode 100644 index 0000000..09fe2c7 Binary files /dev/null and b/libraries/ckeditor/plugins/showblocks/icons/showblocks.png differ diff --git a/libraries/ckeditor/plugins/showblocks/images/block_address.png b/libraries/ckeditor/plugins/showblocks/images/block_address.png new file mode 100644 index 0000000..5abdae1 Binary files /dev/null and b/libraries/ckeditor/plugins/showblocks/images/block_address.png differ diff --git a/libraries/ckeditor/plugins/showblocks/images/block_blockquote.png b/libraries/ckeditor/plugins/showblocks/images/block_blockquote.png new file mode 100644 index 0000000..a8f4973 Binary files /dev/null and b/libraries/ckeditor/plugins/showblocks/images/block_blockquote.png differ diff --git a/libraries/ckeditor/plugins/showblocks/images/block_div.png b/libraries/ckeditor/plugins/showblocks/images/block_div.png new file mode 100644 index 0000000..87b3c17 Binary files /dev/null and b/libraries/ckeditor/plugins/showblocks/images/block_div.png differ diff --git a/libraries/ckeditor/plugins/showblocks/images/block_h1.png b/libraries/ckeditor/plugins/showblocks/images/block_h1.png new file mode 100644 index 0000000..3933325 Binary files /dev/null and b/libraries/ckeditor/plugins/showblocks/images/block_h1.png differ diff --git a/libraries/ckeditor/plugins/showblocks/images/block_h2.png b/libraries/ckeditor/plugins/showblocks/images/block_h2.png new file mode 100644 index 0000000..c99894c Binary files /dev/null and b/libraries/ckeditor/plugins/showblocks/images/block_h2.png differ diff --git a/libraries/ckeditor/plugins/showblocks/images/block_h3.png b/libraries/ckeditor/plugins/showblocks/images/block_h3.png new file mode 100644 index 0000000..cb73d67 Binary files /dev/null and b/libraries/ckeditor/plugins/showblocks/images/block_h3.png differ diff --git a/libraries/ckeditor/plugins/showblocks/images/block_h4.png b/libraries/ckeditor/plugins/showblocks/images/block_h4.png new file mode 100644 index 0000000..7af6bb4 Binary files /dev/null and b/libraries/ckeditor/plugins/showblocks/images/block_h4.png differ diff --git a/libraries/ckeditor/plugins/showblocks/images/block_h5.png b/libraries/ckeditor/plugins/showblocks/images/block_h5.png new file mode 100644 index 0000000..ce5bec1 Binary files /dev/null and b/libraries/ckeditor/plugins/showblocks/images/block_h5.png differ diff --git a/libraries/ckeditor/plugins/showblocks/images/block_h6.png b/libraries/ckeditor/plugins/showblocks/images/block_h6.png new file mode 100644 index 0000000..e67b982 Binary files /dev/null and b/libraries/ckeditor/plugins/showblocks/images/block_h6.png differ diff --git a/libraries/ckeditor/plugins/showblocks/images/block_p.png b/libraries/ckeditor/plugins/showblocks/images/block_p.png new file mode 100644 index 0000000..63a5820 Binary files /dev/null and b/libraries/ckeditor/plugins/showblocks/images/block_p.png differ diff --git a/libraries/ckeditor/plugins/showblocks/images/block_pre.png b/libraries/ckeditor/plugins/showblocks/images/block_pre.png new file mode 100644 index 0000000..955a868 Binary files /dev/null and b/libraries/ckeditor/plugins/showblocks/images/block_pre.png differ diff --git a/libraries/ckeditor/plugins/showblocks/lang/af.js b/libraries/ckeditor/plugins/showblocks/lang/af.js new file mode 100644 index 0000000..336090f --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/af.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'af', { + toolbar: 'Toon blokke' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/ar.js b/libraries/ckeditor/plugins/showblocks/lang/ar.js new file mode 100644 index 0000000..c1310d5 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/ar.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'ar', { + toolbar: 'مخطط تفصيلي' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/az.js b/libraries/ckeditor/plugins/showblocks/lang/az.js new file mode 100644 index 0000000..82f6815 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/az.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'az', { + toolbar: 'Blokları göstər' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/bg.js b/libraries/ckeditor/plugins/showblocks/lang/bg.js new file mode 100644 index 0000000..f298d4f --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/bg.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'bg', { + toolbar: 'Показва блокове' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/bn.js b/libraries/ckeditor/plugins/showblocks/lang/bn.js new file mode 100644 index 0000000..6999c63 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/bn.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'bn', { + toolbar: 'Show Blocks' // MISSING +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/bs.js b/libraries/ckeditor/plugins/showblocks/lang/bs.js new file mode 100644 index 0000000..806b517 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/bs.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'bs', { + toolbar: 'Show Blocks' // MISSING +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/ca.js b/libraries/ckeditor/plugins/showblocks/lang/ca.js new file mode 100644 index 0000000..58de163 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/ca.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'ca', { + toolbar: 'Mostra els blocs' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/cs.js b/libraries/ckeditor/plugins/showblocks/lang/cs.js new file mode 100644 index 0000000..d1f82f7 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/cs.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'cs', { + toolbar: 'Ukázat bloky' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/cy.js b/libraries/ckeditor/plugins/showblocks/lang/cy.js new file mode 100644 index 0000000..d5c9511 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/cy.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'cy', { + toolbar: 'Dangos Blociau' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/da.js b/libraries/ckeditor/plugins/showblocks/lang/da.js new file mode 100644 index 0000000..6788970 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/da.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'da', { + toolbar: 'Vis afsnitsmærker' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/de-ch.js b/libraries/ckeditor/plugins/showblocks/lang/de-ch.js new file mode 100644 index 0000000..af851c8 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/de-ch.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'de-ch', { + toolbar: 'Blöcke anzeigen' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/de.js b/libraries/ckeditor/plugins/showblocks/lang/de.js new file mode 100644 index 0000000..290bbcb --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/de.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'de', { + toolbar: 'Blöcke anzeigen' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/el.js b/libraries/ckeditor/plugins/showblocks/lang/el.js new file mode 100644 index 0000000..e87c517 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/el.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'el', { + toolbar: 'Προβολή Τμημάτων' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/en-au.js b/libraries/ckeditor/plugins/showblocks/lang/en-au.js new file mode 100644 index 0000000..9b87b17 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/en-au.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'en-au', { + toolbar: 'Show Blocks' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/en-ca.js b/libraries/ckeditor/plugins/showblocks/lang/en-ca.js new file mode 100644 index 0000000..8bd5a5a --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/en-ca.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'en-ca', { + toolbar: 'Show Blocks' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/en-gb.js b/libraries/ckeditor/plugins/showblocks/lang/en-gb.js new file mode 100644 index 0000000..46e927c --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/en-gb.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'en-gb', { + toolbar: 'Show Blocks' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/en.js b/libraries/ckeditor/plugins/showblocks/lang/en.js new file mode 100644 index 0000000..cd28d9c --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/en.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'en', { + toolbar: 'Show Blocks' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/eo.js b/libraries/ckeditor/plugins/showblocks/lang/eo.js new file mode 100644 index 0000000..7f116db --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/eo.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'eo', { + toolbar: 'Montri la blokojn' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/es-mx.js b/libraries/ckeditor/plugins/showblocks/lang/es-mx.js new file mode 100644 index 0000000..6b01d9a --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/es-mx.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'es-mx', { + toolbar: 'Mostrar bloques' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/es.js b/libraries/ckeditor/plugins/showblocks/lang/es.js new file mode 100644 index 0000000..b540ce7 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/es.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'es', { + toolbar: 'Mostrar bloques' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/et.js b/libraries/ckeditor/plugins/showblocks/lang/et.js new file mode 100644 index 0000000..b062893 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/et.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'et', { + toolbar: 'Blokkide näitamine' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/eu.js b/libraries/ckeditor/plugins/showblocks/lang/eu.js new file mode 100644 index 0000000..e20af55 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/eu.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'eu', { + toolbar: 'Erakutsi blokeak' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/fa.js b/libraries/ckeditor/plugins/showblocks/lang/fa.js new file mode 100644 index 0000000..00836ef --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/fa.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'fa', { + toolbar: 'نمایش بلوک‌ها' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/fi.js b/libraries/ckeditor/plugins/showblocks/lang/fi.js new file mode 100644 index 0000000..5a306bf --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/fi.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'fi', { + toolbar: 'Näytä elementit' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/fo.js b/libraries/ckeditor/plugins/showblocks/lang/fo.js new file mode 100644 index 0000000..37d491d --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/fo.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'fo', { + toolbar: 'Vís blokkar' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/fr-ca.js b/libraries/ckeditor/plugins/showblocks/lang/fr-ca.js new file mode 100644 index 0000000..210c8d2 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/fr-ca.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'fr-ca', { + toolbar: 'Afficher les blocs' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/fr.js b/libraries/ckeditor/plugins/showblocks/lang/fr.js new file mode 100644 index 0000000..44644a4 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/fr.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'fr', { + toolbar: 'Afficher les blocs' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/gl.js b/libraries/ckeditor/plugins/showblocks/lang/gl.js new file mode 100644 index 0000000..ef2c563 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/gl.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'gl', { + toolbar: 'Amosar os bloques' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/gu.js b/libraries/ckeditor/plugins/showblocks/lang/gu.js new file mode 100644 index 0000000..2f043b6 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/gu.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'gu', { + toolbar: 'બ્લૉક બતાવવું' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/he.js b/libraries/ckeditor/plugins/showblocks/lang/he.js new file mode 100644 index 0000000..c6bb3f6 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/he.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'he', { + toolbar: 'הצגת בלוקים' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/hi.js b/libraries/ckeditor/plugins/showblocks/lang/hi.js new file mode 100644 index 0000000..1804fd8 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/hi.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'hi', { + toolbar: 'ब्लॉक दिखायें' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/hr.js b/libraries/ckeditor/plugins/showblocks/lang/hr.js new file mode 100644 index 0000000..985342d --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/hr.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'hr', { + toolbar: 'Prikaži blokove' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/hu.js b/libraries/ckeditor/plugins/showblocks/lang/hu.js new file mode 100644 index 0000000..267b954 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/hu.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'hu', { + toolbar: 'Blokkok megjelenítése' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/id.js b/libraries/ckeditor/plugins/showblocks/lang/id.js new file mode 100644 index 0000000..37bbcf6 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/id.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'id', { + toolbar: 'Perlihatkan Blok' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/is.js b/libraries/ckeditor/plugins/showblocks/lang/is.js new file mode 100644 index 0000000..794e023 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/is.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'is', { + toolbar: 'Sýna blokkir' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/it.js b/libraries/ckeditor/plugins/showblocks/lang/it.js new file mode 100644 index 0000000..f5edd82 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/it.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'it', { + toolbar: 'Visualizza Blocchi' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/ja.js b/libraries/ckeditor/plugins/showblocks/lang/ja.js new file mode 100644 index 0000000..447b6a8 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/ja.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'ja', { + toolbar: 'ブロック表示' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/ka.js b/libraries/ckeditor/plugins/showblocks/lang/ka.js new file mode 100644 index 0000000..e8dfdaf --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/ka.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'ka', { + toolbar: 'არეების ჩვენება' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/km.js b/libraries/ckeditor/plugins/showblocks/lang/km.js new file mode 100644 index 0000000..1f0c12d --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/km.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'km', { + toolbar: 'បង្ហាញ​ប្លក់' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/ko.js b/libraries/ckeditor/plugins/showblocks/lang/ko.js new file mode 100644 index 0000000..f462946 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/ko.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'ko', { + toolbar: '블록 보기' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/ku.js b/libraries/ckeditor/plugins/showblocks/lang/ku.js new file mode 100644 index 0000000..6b61f87 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/ku.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'ku', { + toolbar: 'نیشاندانی بەربەستەکان' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/lt.js b/libraries/ckeditor/plugins/showblocks/lang/lt.js new file mode 100644 index 0000000..2370d83 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/lt.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'lt', { + toolbar: 'Rodyti blokus' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/lv.js b/libraries/ckeditor/plugins/showblocks/lang/lv.js new file mode 100644 index 0000000..44f2caa --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/lv.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'lv', { + toolbar: 'Parādīt blokus' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/mk.js b/libraries/ckeditor/plugins/showblocks/lang/mk.js new file mode 100644 index 0000000..b31ae15 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/mk.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'mk', { + toolbar: 'Show Blocks' // MISSING +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/mn.js b/libraries/ckeditor/plugins/showblocks/lang/mn.js new file mode 100644 index 0000000..5dc5c98 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/mn.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'mn', { + toolbar: 'Хавтангуудыг харуулах' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/ms.js b/libraries/ckeditor/plugins/showblocks/lang/ms.js new file mode 100644 index 0000000..dc01d5e --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/ms.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'ms', { + toolbar: 'Show Blocks' // MISSING +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/nb.js b/libraries/ckeditor/plugins/showblocks/lang/nb.js new file mode 100644 index 0000000..a4830b0 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/nb.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'nb', { + toolbar: 'Vis blokker' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/nl.js b/libraries/ckeditor/plugins/showblocks/lang/nl.js new file mode 100644 index 0000000..8190ca5 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/nl.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'nl', { + toolbar: 'Toon blokken' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/no.js b/libraries/ckeditor/plugins/showblocks/lang/no.js new file mode 100644 index 0000000..5d7cec5 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/no.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'no', { + toolbar: 'Vis blokker' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/oc.js b/libraries/ckeditor/plugins/showblocks/lang/oc.js new file mode 100644 index 0000000..a189036 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/oc.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'oc', { + toolbar: 'Afichar los blòts' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/pl.js b/libraries/ckeditor/plugins/showblocks/lang/pl.js new file mode 100644 index 0000000..4e99792 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/pl.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'pl', { + toolbar: 'Pokaż bloki' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/pt-br.js b/libraries/ckeditor/plugins/showblocks/lang/pt-br.js new file mode 100644 index 0000000..9d036df --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/pt-br.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'pt-br', { + toolbar: 'Mostrar blocos de código' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/pt.js b/libraries/ckeditor/plugins/showblocks/lang/pt.js new file mode 100644 index 0000000..990e0d8 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/pt.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'pt', { + toolbar: 'Exibir blocos' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/ro.js b/libraries/ckeditor/plugins/showblocks/lang/ro.js new file mode 100644 index 0000000..44f9f9b --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/ro.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'ro', { + toolbar: 'Arată blocurile' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/ru.js b/libraries/ckeditor/plugins/showblocks/lang/ru.js new file mode 100644 index 0000000..57b6c60 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/ru.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'ru', { + toolbar: 'Отображать блоки' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/si.js b/libraries/ckeditor/plugins/showblocks/lang/si.js new file mode 100644 index 0000000..23451a9 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/si.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'si', { + toolbar: 'කොටස පෙන්නන්න' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/sk.js b/libraries/ckeditor/plugins/showblocks/lang/sk.js new file mode 100644 index 0000000..76c57b4 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/sk.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'sk', { + toolbar: 'Ukázať bloky' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/sl.js b/libraries/ckeditor/plugins/showblocks/lang/sl.js new file mode 100644 index 0000000..dd849d1 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/sl.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'sl', { + toolbar: 'Prikaži ograde' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/sq.js b/libraries/ckeditor/plugins/showblocks/lang/sq.js new file mode 100644 index 0000000..329fbbd --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/sq.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'sq', { + toolbar: 'Shfaq Blloqet' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/sr-latn.js b/libraries/ckeditor/plugins/showblocks/lang/sr-latn.js new file mode 100644 index 0000000..74c735f --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/sr-latn.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'sr-latn', { + toolbar: 'Show Blocks' // MISSING +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/sr.js b/libraries/ckeditor/plugins/showblocks/lang/sr.js new file mode 100644 index 0000000..2ca432b --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/sr.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'sr', { + toolbar: 'Show Blocks' // MISSING +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/sv.js b/libraries/ckeditor/plugins/showblocks/lang/sv.js new file mode 100644 index 0000000..78bc7c1 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/sv.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'sv', { + toolbar: 'Visa block' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/th.js b/libraries/ckeditor/plugins/showblocks/lang/th.js new file mode 100644 index 0000000..66b908e --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/th.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'th', { + toolbar: 'แสดงบล็อคข้อมูล' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/tr.js b/libraries/ckeditor/plugins/showblocks/lang/tr.js new file mode 100644 index 0000000..830a46a --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/tr.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'tr', { + toolbar: 'Blokları Göster' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/tt.js b/libraries/ckeditor/plugins/showblocks/lang/tt.js new file mode 100644 index 0000000..3276346 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/tt.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'tt', { + toolbar: 'Блокларны күрсәтү' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/ug.js b/libraries/ckeditor/plugins/showblocks/lang/ug.js new file mode 100644 index 0000000..7c93330 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/ug.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'ug', { + toolbar: 'بۆلەكنى كۆرسەت' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/uk.js b/libraries/ckeditor/plugins/showblocks/lang/uk.js new file mode 100644 index 0000000..d02b0be --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/uk.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'uk', { + toolbar: 'Показувати блоки' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/vi.js b/libraries/ckeditor/plugins/showblocks/lang/vi.js new file mode 100644 index 0000000..1876b96 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/vi.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'vi', { + toolbar: 'Hiển thị các khối' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/zh-cn.js b/libraries/ckeditor/plugins/showblocks/lang/zh-cn.js new file mode 100644 index 0000000..a6d6fa7 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/zh-cn.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'zh-cn', { + toolbar: '显示区块' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/lang/zh.js b/libraries/ckeditor/plugins/showblocks/lang/zh.js new file mode 100644 index 0000000..1b39dcc --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/lang/zh.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang( 'showblocks', 'zh', { + toolbar: '顯示區塊' +} ); diff --git a/libraries/ckeditor/plugins/showblocks/plugin.js b/libraries/ckeditor/plugins/showblocks/plugin.js new file mode 100644 index 0000000..e4619f9 --- /dev/null +++ b/libraries/ckeditor/plugins/showblocks/plugin.js @@ -0,0 +1,153 @@ +/** + * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license + */ + +/** + * @fileOverview The "showblocks" plugin. Enable it will make all block level + * elements being decorated with a border and the element name + * displayed on the left-right corner. + */ + +( function() { + 'use strict'; + + var commandDefinition = { + readOnly: 1, + preserveState: true, + editorFocus: false, + + exec: function( editor ) { + this.toggleState(); + this.refresh( editor ); + }, + + refresh: function( editor ) { + if ( editor.document ) { + // Show blocks turns inactive after editor loses focus when in inline. + var showBlocks = ( this.state == CKEDITOR.TRISTATE_ON && ( editor.elementMode != CKEDITOR.ELEMENT_MODE_INLINE || editor.focusManager.hasFocus ) ); + + var funcName = showBlocks ? 'attachClass' : 'removeClass'; + editor.editable()[ funcName ]( 'cke_show_blocks' ); + } + } + }; + + CKEDITOR.plugins.add( 'showblocks', { + // jscs:disable maximumLineLength + lang: 'af,ar,az,bg,bn,bs,ca,cs,cy,da,de,de-ch,el,en,en-au,en-ca,en-gb,eo,es,es-mx,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,oc,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE% + // jscs:enable maximumLineLength + icons: 'showblocks,showblocks-rtl', // %REMOVE_LINE_CORE% + hidpi: true, // %REMOVE_LINE_CORE% + onLoad: function() { + var tags = [ 'p', 'div', 'pre', 'address', 'blockquote', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ], + cssStd, cssImg, cssLtr, cssRtl, + path = CKEDITOR.getUrl( this.path ), + // https://dev.ckeditor.com/ticket/10884 don't apply showblocks styles to non-editable elements and chosen ones. + // IE8 does not support :not() pseudoclass, so we need to reset showblocks rather + // than 'prevent' its application. We do that by additional rules. + supportsNotPseudoclass = !( CKEDITOR.env.ie && CKEDITOR.env.version < 9 ), + notDisabled = supportsNotPseudoclass ? ':not([contenteditable=false]):not(.cke_show_blocks_off)' : '', + tag, trailing; + + cssStd = cssImg = cssLtr = cssRtl = ''; + + while ( ( tag = tags.pop() ) ) { + trailing = tags.length ? ',' : ''; + + cssStd += '.cke_show_blocks ' + tag + notDisabled + trailing; + cssLtr += '.cke_show_blocks.cke_contents_ltr ' + tag + notDisabled + trailing; + cssRtl += '.cke_show_blocks.cke_contents_rtl ' + tag + notDisabled + trailing; + cssImg += '.cke_show_blocks ' + tag + notDisabled + '{' + + 'background-image:url(' + CKEDITOR.getUrl( path + 'images/block_' + tag + '.png' ) + ')' + + '}'; + } + + // .cke_show_blocks p { ... } + cssStd += '{' + + 'background-repeat:no-repeat;' + + 'border:1px dotted gray;' + + 'padding-top:8px' + + '}'; + + // .cke_show_blocks.cke_contents_ltr p { ... } + cssLtr += '{' + + 'background-position:top left;' + + 'padding-left:8px' + + '}'; + + // .cke_show_blocks.cke_contents_rtl p { ... } + cssRtl += '{' + + 'background-position:top right;' + + 'padding-right:8px' + + '}'; + + CKEDITOR.addCss( cssStd.concat( cssImg, cssLtr, cssRtl ) ); + + // [IE8] Reset showblocks styles for non-editables and chosen elements, because + // it could not be done using :not() pseudoclass (https://dev.ckeditor.com/ticket/10884). + if ( !supportsNotPseudoclass ) { + CKEDITOR.addCss( + '.cke_show_blocks [contenteditable=false],.cke_show_blocks .cke_show_blocks_off{' + + 'border:none;' + + 'padding-top:0;' + + 'background-image:none' + + '}' + + '.cke_show_blocks.cke_contents_rtl [contenteditable=false],.cke_show_blocks.cke_contents_rtl .cke_show_blocks_off{' + + 'padding-right:0' + + '}' + + '.cke_show_blocks.cke_contents_ltr [contenteditable=false],.cke_show_blocks.cke_contents_ltr .cke_show_blocks_off{' + + 'padding-left:0' + + '}' + ); + } + }, + init: function( editor ) { + if ( editor.blockless ) + return; + + var command = editor.addCommand( 'showblocks', commandDefinition ); + command.canUndo = false; + + if ( editor.config.startupOutlineBlocks ) + command.setState( CKEDITOR.TRISTATE_ON ); + + editor.ui.addButton && editor.ui.addButton( 'ShowBlocks', { + label: editor.lang.showblocks.toolbar, + command: 'showblocks', + toolbar: 'tools,20' + } ); + + // Refresh the command on setData. + editor.on( 'mode', function() { + if ( command.state != CKEDITOR.TRISTATE_DISABLED ) + command.refresh( editor ); + } ); + + // Refresh the command on focus/blur in inline. + if ( editor.elementMode == CKEDITOR.ELEMENT_MODE_INLINE ) { + editor.on( 'focus', onFocusBlur ); + editor.on( 'blur', onFocusBlur ); + } + + // Refresh the command on setData. + editor.on( 'contentDom', function() { + if ( command.state != CKEDITOR.TRISTATE_DISABLED ) + command.refresh( editor ); + } ); + + function onFocusBlur() { + command.refresh( editor ); + } + } + } ); +} )(); + +/** + * Whether to automaticaly enable the show block" command when the editor loads. + * + * config.startupOutlineBlocks = true; + * + * @cfg {Boolean} [startupOutlineBlocks=false] + * @member CKEDITOR.config + */ diff --git a/libraries/ckeditor/plugins/smiley/dialogs/smiley.js b/libraries/ckeditor/plugins/smiley/dialogs/smiley.js new file mode 100644 index 0000000..841d789 --- /dev/null +++ b/libraries/ckeditor/plugins/smiley/dialogs/smiley.js @@ -0,0 +1,11 @@ +/* + Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.dialog.add("smiley",function(f){for(var e=f.config,a=f.lang.smiley,h=e.smiley_images,g=e.smiley_columns||8,k,m=function(l){var c=l.data.getTarget(),b=c.getName();if("a"==b)c=c.getChild(0);else if("img"!=b)return;var b=c.getAttribute("cke_src"),a=c.getAttribute("title"),c=f.document.createElement("img",{attributes:{src:b,"data-cke-saved-src":b,title:a,alt:a,width:c.$.width,height:c.$.height}});f.insertElement(c);k.hide();l.data.preventDefault()},q=CKEDITOR.tools.addFunction(function(a,c){a= +new CKEDITOR.dom.event(a);c=new CKEDITOR.dom.element(c);var b;b=a.getKeystroke();var d="rtl"==f.lang.dir;switch(b){case 38:if(b=c.getParent().getParent().getPrevious())b=b.getChild([c.getParent().getIndex(),0]),b.focus();a.preventDefault();break;case 40:(b=c.getParent().getParent().getNext())&&(b=b.getChild([c.getParent().getIndex(),0]))&&b.focus();a.preventDefault();break;case 32:m({data:a});a.preventDefault();break;case d?37:39:if(b=c.getParent().getNext())b=b.getChild(0),b.focus(),a.preventDefault(!0); +else if(b=c.getParent().getParent().getNext())(b=b.getChild([0,0]))&&b.focus(),a.preventDefault(!0);break;case d?39:37:if(b=c.getParent().getPrevious())b=b.getChild(0),b.focus(),a.preventDefault(!0);else if(b=c.getParent().getParent().getPrevious())b=b.getLast().getChild(0),b.focus(),a.preventDefault(!0)}}),d=CKEDITOR.tools.getNextId()+"_smiley_emtions_label",d=['\x3cdiv\x3e\x3cspan id\x3d"'+d+'" class\x3d"cke_voice_label"\x3e'+a.options+"\x3c/span\x3e",'\x3ctable role\x3d"listbox" aria-labelledby\x3d"'+ +d+'" style\x3d"width:100%;height:100%;border-collapse:separate;" cellspacing\x3d"2" cellpadding\x3d"2"',CKEDITOR.env.ie&&CKEDITOR.env.quirks?' style\x3d"position:absolute;"':"","\x3e\x3ctbody\x3e"],n=h.length,a=0;an&&(n=f)}return n}function r(a){return function(){var f=this.getValue(),f=!!(CKEDITOR.dialog.validate.integer()(f)&&0q.getSize("width")?"100%":500:0,getValue:u,validate:CKEDITOR.dialog.validate.cssLength(a.lang.common.invalidCssLength.replace("%1", +a.lang.common.width)),onChange:function(){var a=this.getDialog().getContentElement("advanced","advStyles");a&&a.updateStyle("width",this.getValue())},setup:function(a){a=a.getStyle("width");this.setValue(a)},commit:l}]},{type:"hbox",widths:["5em"],children:[{type:"text",id:"txtHeight",requiredContent:"table{height}",controlStyle:"width:5em",label:a.lang.common.height,title:a.lang.common.cssLengthTooltip,"default":"",getValue:u,validate:CKEDITOR.dialog.validate.cssLength(a.lang.common.invalidCssLength.replace("%1", +a.lang.common.height)),onChange:function(){var a=this.getDialog().getContentElement("advanced","advStyles");a&&a.updateStyle("height",this.getValue())},setup:function(a){(a=a.getStyle("height"))&&this.setValue(a)},commit:l}]},{type:"html",html:"\x26nbsp;"},{type:"text",id:"txtCellSpace",requiredContent:"table[cellspacing]",controlStyle:"width:3em",label:a.lang.table.cellSpace,"default":a.filter.check("table[cellspacing]")?1:0,validate:CKEDITOR.dialog.validate.number(a.lang.table.invalidCellSpacing), +setup:function(a){this.setValue(a.getAttribute("cellSpacing")||"")},commit:function(a,d){this.getValue()?d.setAttribute("cellSpacing",this.getValue()):d.removeAttribute("cellSpacing")}},{type:"text",id:"txtCellPad",requiredContent:"table[cellpadding]",controlStyle:"width:3em",label:a.lang.table.cellPad,"default":a.filter.check("table[cellpadding]")?1:0,validate:CKEDITOR.dialog.validate.number(a.lang.table.invalidCellPadding),setup:function(a){this.setValue(a.getAttribute("cellPadding")||"")},commit:function(a, +d){this.getValue()?d.setAttribute("cellPadding",this.getValue()):d.removeAttribute("cellPadding")}}]}]},{type:"html",align:"right",html:""},{type:"vbox",padding:0,children:[{type:"text",id:"txtCaption",requiredContent:"caption",label:a.lang.table.caption,setup:function(a){this.enable();a=a.getElementsByTag("caption");if(0 + + + + + TableResize Plugin dev sample + + + + +

+ TableResize Plugin - dev sample +

+ + +
+ + + + + + + + + + + + + + + + +
+ A sample table
+ Column 1 + Column 2
+ You can resize a table column. + Hover your mouse over its border.
+ Watch the cursor change. + Now click and drag to resize.
+
+ + + + + + + + + + + + + + + + + +
+ A sample table
+ Column 1 + Column 2
+ You can resize a table column. + Hover your mouse over its border.
+ Watch the cursor change. + Now click and drag to resize.
+ + + diff --git a/libraries/ckeditor/plugins/tableresize/plugin.js b/libraries/ckeditor/plugins/tableresize/plugin.js new file mode 100644 index 0000000..5338608 --- /dev/null +++ b/libraries/ckeditor/plugins/tableresize/plugin.js @@ -0,0 +1,413 @@ +/** + * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ + +( function() { + var pxUnit = CKEDITOR.tools.cssLength, + needsIEHacks = CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks ); + + function getWidth( el ) { + return CKEDITOR.env.ie ? el.$.clientWidth : parseInt( el.getComputedStyle( 'width' ), 10 ); + } + + function getBorderWidth( element, side ) { + var computed = element.getComputedStyle( 'border-' + side + '-width' ), + borderMap = { + thin: '0px', + medium: '1px', + thick: '2px' + }; + + if ( computed.indexOf( 'px' ) < 0 ) { + // look up keywords + if ( computed in borderMap && element.getComputedStyle( 'border-style' ) != 'none' ) + computed = borderMap[ computed ]; + else + computed = 0; + } + + return parseInt( computed, 10 ); + } + + // Gets the table row that contains the most columns. + function getMasterPillarRow( table ) { + var $rows = table.$.rows, + maxCells = 0, + cellsCount, $elected, $tr; + + for ( var i = 0, len = $rows.length; i < len; i++ ) { + $tr = $rows[ i ]; + cellsCount = $tr.cells.length; + + if ( cellsCount > maxCells ) { + maxCells = cellsCount; + $elected = $tr; + } + } + + return $elected; + } + + function buildTableColumnPillars( table ) { + var pillars = [], + pillarIndex = -1, + rtl = ( table.getComputedStyle( 'direction' ) == 'rtl' ); + + // Get the raw row element that cointains the most columns. + var $tr = getMasterPillarRow( table ); + + // Get the tbody element and position, which will be used to set the + // top and bottom boundaries. + var tbody = new CKEDITOR.dom.element( table.$.tBodies[ 0 ] ), + tbodyPosition = tbody.getDocumentPosition(); + + // Loop thorugh all cells, building pillars after each one of them. + for ( var i = 0, len = $tr.cells.length; i < len; i++ ) { + // Both the current cell and the successive one will be used in the + // pillar size calculation. + var td = new CKEDITOR.dom.element( $tr.cells[ i ] ), + nextTd = $tr.cells[ i + 1 ] && new CKEDITOR.dom.element( $tr.cells[ i + 1 ] ); + + pillarIndex += td.$.colSpan || 1; + + // Calculate the pillar boundary positions. + var pillarLeft, pillarRight, pillarWidth; + + var x = td.getDocumentPosition().x; + + // Calculate positions based on the current cell. + rtl ? pillarRight = x + getBorderWidth( td, 'left' ) : pillarLeft = x + td.$.offsetWidth - getBorderWidth( td, 'right' ); + + // Calculate positions based on the next cell, if available. + if ( nextTd ) { + x = nextTd.getDocumentPosition().x; + + rtl ? pillarLeft = x + nextTd.$.offsetWidth - getBorderWidth( nextTd, 'right' ) : pillarRight = x + getBorderWidth( nextTd, 'left' ); + } + // Otherwise calculate positions based on the table (for last cell). + else { + x = table.getDocumentPosition().x; + + rtl ? pillarLeft = x : pillarRight = x + table.$.offsetWidth; + } + + pillarWidth = Math.max( pillarRight - pillarLeft, 3 ); + + // The pillar should reflects exactly the shape of the hovered + // column border line. + pillars.push( { + table: table, + index: pillarIndex, + x: pillarLeft, + y: tbodyPosition.y, + width: pillarWidth, + height: tbody.$.offsetHeight, + rtl: rtl + } ); + } + + return pillars; + } + + function getPillarAtPosition( pillars, positionX ) { + for ( var i = 0, len = pillars.length; i < len; i++ ) { + var pillar = pillars[ i ]; + + if ( positionX >= pillar.x && positionX <= ( pillar.x + pillar.width ) ) + return pillar; + } + + return null; + } + + function cancel( evt ) { + ( evt.data || evt ).preventDefault(); + } + + function columnResizer( editor ) { + var pillar, document, resizer, isResizing, startOffset, currentShift; + + var leftSideCells, rightSideCells, leftShiftBoundary, rightShiftBoundary; + + function detach() { + pillar = null; + currentShift = 0; + isResizing = 0; + + document.removeListener( 'mouseup', onMouseUp ); + resizer.removeListener( 'mousedown', onMouseDown ); + resizer.removeListener( 'mousemove', onMouseMove ); + + document.getBody().setStyle( 'cursor', 'auto' ); + + // Hide the resizer (remove it on IE7 - #5890). + needsIEHacks ? resizer.remove() : resizer.hide(); + } + + function resizeStart() { + // Before starting to resize, figure out which cells to change + // and the boundaries of this resizing shift. + + var columnIndex = pillar.index, + map = CKEDITOR.tools.buildTableMap( pillar.table ), + leftColumnCells = [], + rightColumnCells = [], + leftMinSize = Number.MAX_VALUE, + rightMinSize = leftMinSize, + rtl = pillar.rtl; + + for ( var i = 0, len = map.length; i < len; i++ ) { + var row = map[ i ], + leftCell = row[ columnIndex + ( rtl ? 1 : 0 ) ], + rightCell = row[ columnIndex + ( rtl ? 0 : 1 ) ]; + + leftCell = leftCell && new CKEDITOR.dom.element( leftCell ); + rightCell = rightCell && new CKEDITOR.dom.element( rightCell ); + + if ( !leftCell || !rightCell || !leftCell.equals( rightCell ) ) { + leftCell && ( leftMinSize = Math.min( leftMinSize, getWidth( leftCell ) ) ); + rightCell && ( rightMinSize = Math.min( rightMinSize, getWidth( rightCell ) ) ); + + leftColumnCells.push( leftCell ); + rightColumnCells.push( rightCell ); + } + } + + // Cache the list of cells to be resized. + leftSideCells = leftColumnCells; + rightSideCells = rightColumnCells; + + // Cache the resize limit boundaries. + leftShiftBoundary = pillar.x - leftMinSize; + rightShiftBoundary = pillar.x + rightMinSize; + + resizer.setOpacity( 0.5 ); + startOffset = parseInt( resizer.getStyle( 'left' ), 10 ); + currentShift = 0; + isResizing = 1; + + resizer.on( 'mousemove', onMouseMove ); + + // Prevent the native drag behavior otherwise 'mousemove' won't fire. + document.on( 'dragstart', cancel ); + } + + function resizeEnd() { + isResizing = 0; + + resizer.setOpacity( 0 ); + + currentShift && resizeColumn(); + + var table = pillar.table; + setTimeout( function() { + table.removeCustomData( '_cke_table_pillars' ); + }, 0 ); + + document.removeListener( 'dragstart', cancel ); + } + + function resizeColumn() { + var rtl = pillar.rtl, + cellsCount = rtl ? rightSideCells.length : leftSideCells.length; + + // Perform the actual resize to table cells, only for those by side of the pillar. + for ( var i = 0; i < cellsCount; i++ ) { + var leftCell = leftSideCells[ i ], + rightCell = rightSideCells[ i ], + table = pillar.table; + + // Defer the resizing to avoid any interference among cells. + CKEDITOR.tools.setTimeout( function( leftCell, leftOldWidth, rightCell, rightOldWidth, tableWidth, sizeShift ) { + // 1px is the minimum valid width (#11626). + leftCell && leftCell.setStyle( 'width', pxUnit( Math.max( leftOldWidth + sizeShift, 1 ) ) ); + rightCell && rightCell.setStyle( 'width', pxUnit( Math.max( rightOldWidth - sizeShift, 1 ) ) ); + + // If we're in the last cell, we need to resize the table as well + if ( tableWidth ) + table.setStyle( 'width', pxUnit( tableWidth + sizeShift * ( rtl ? -1 : 1 ) ) ); + }, 0, this, [ + leftCell, leftCell && getWidth( leftCell ), + rightCell, rightCell && getWidth( rightCell ), + ( !leftCell || !rightCell ) && ( getWidth( table ) + getBorderWidth( table, 'left' ) + getBorderWidth( table, 'right' ) ), + currentShift + ] ); + } + } + + function onMouseDown( evt ) { + cancel( evt ); + + resizeStart(); + + document.on( 'mouseup', onMouseUp, this ); + } + + function onMouseUp( evt ) { + evt.removeListener(); + + resizeEnd(); + } + + function onMouseMove( evt ) { + move( evt.data.getPageOffset().x ); + } + + document = editor.document; + + resizer = CKEDITOR.dom.element.createFromHtml( '
', document ); + + // Clean DOM when editor is destroyed. + editor.on( 'destroy', function() { + resizer.remove(); + } ); + + // Except on IE6/7 (#5890), place the resizer after body to prevent it + // from being editable. + if ( !needsIEHacks ) + document.getDocumentElement().append( resizer ); + + this.attachTo = function( targetPillar ) { + // Accept only one pillar at a time. + if ( isResizing ) + return; + + // On IE6/7, we append the resizer everytime we need it. (#5890) + if ( needsIEHacks ) { + document.getBody().append( resizer ); + currentShift = 0; + } + + pillar = targetPillar; + + resizer.setStyles( { + width: pxUnit( targetPillar.width ), + height: pxUnit( targetPillar.height ), + left: pxUnit( targetPillar.x ), + top: pxUnit( targetPillar.y ) + } ); + + // In IE6/7, it's not possible to have custom cursors for floating + // elements in an editable document. Show the resizer in that case, + // to give the user a visual clue. + needsIEHacks && resizer.setOpacity( 0.25 ); + + resizer.on( 'mousedown', onMouseDown, this ); + + document.getBody().setStyle( 'cursor', 'col-resize' ); + + // Display the resizer to receive events but don't show it, + // only change the cursor to resizable shape. + resizer.show(); + }; + + var move = this.move = function( posX ) { + if ( !pillar ) + return 0; + + if ( !isResizing && ( posX < pillar.x || posX > ( pillar.x + pillar.width ) ) ) { + detach(); + return 0; + } + + var resizerNewPosition = posX - Math.round( resizer.$.offsetWidth / 2 ); + + if ( isResizing ) { + if ( resizerNewPosition == leftShiftBoundary || resizerNewPosition == rightShiftBoundary ) + return 1; + + resizerNewPosition = Math.max( resizerNewPosition, leftShiftBoundary ); + resizerNewPosition = Math.min( resizerNewPosition, rightShiftBoundary ); + + currentShift = resizerNewPosition - startOffset; + } + + resizer.setStyle( 'left', pxUnit( resizerNewPosition ) ); + + return 1; + }; + } + + function clearPillarsCache( evt ) { + var target = evt.data.getTarget(); + + if ( evt.name == 'mouseout' ) { + // Bypass interal mouse move. + if ( !target.is( 'table' ) ) + return; + + var dest = new CKEDITOR.dom.element( evt.data.$.relatedTarget || evt.data.$.toElement ); + while ( dest && dest.$ && !dest.equals( target ) && !dest.is( 'body' ) ) + dest = dest.getParent(); + if ( !dest || dest.equals( target ) ) + return; + } + + target.getAscendant( 'table', 1 ).removeCustomData( '_cke_table_pillars' ); + evt.removeListener(); + } + + CKEDITOR.plugins.add( 'tableresize', { + requires: 'tabletools', + + init: function( editor ) { + editor.on( 'contentDom', function() { + var resizer, + editable = editor.editable(); + + // In Classic editor it is better to use document + // instead of editable so event will work below body. + editable.attachListener( editable.isInline() ? editable : editor.document, 'mousemove', function( evt ) { + evt = evt.data; + + var target = evt.getTarget(); + + // FF may return document and IE8 some UFO (object with no nodeType property...) + // instead of an element (#11823). + if ( target.type != CKEDITOR.NODE_ELEMENT ) + return; + + var pageX = evt.getPageOffset().x; + + // If we're already attached to a pillar, simply move the + // resizer. + if ( resizer && resizer.move( pageX ) ) { + cancel( evt ); + return; + } + + // Considering table, tr, td, tbody but nothing else. + var table, pillars; + + if ( !target.is( 'table' ) && !target.getAscendant( 'tbody', 1 ) ) + return; + + table = target.getAscendant( 'table', 1 ); + + // Make sure the table we found is inside the container + // (eg. we should not use tables the editor is embedded within) + if ( !editor.editable().contains( table ) ) { + return; + } + + if ( !( pillars = table.getCustomData( '_cke_table_pillars' ) ) ) { + // Cache table pillars calculation result. + table.setCustomData( '_cke_table_pillars', ( pillars = buildTableColumnPillars( table ) ) ); + table.on( 'mouseout', clearPillarsCache ); + table.on( 'mousedown', clearPillarsCache ); + } + + var pillar = getPillarAtPosition( pillars, pageX ); + if ( pillar ) { + !resizer && ( resizer = new columnResizer( editor ) ); + resizer.attachTo( pillar ); + } + } ); + } ); + } + } ); + +} )(); diff --git a/libraries/ckeditor/plugins/tableresize/samples/tableresize.html b/libraries/ckeditor/plugins/tableresize/samples/tableresize.html new file mode 100644 index 0000000..2d6f68b --- /dev/null +++ b/libraries/ckeditor/plugins/tableresize/samples/tableresize.html @@ -0,0 +1,107 @@ + + + + + + Using TableResize Plugin — CKEditor Sample + + + + + + + +

+ CKEditor Samples » Using the TableResize Plugin +

+
+ This sample is not maintained anymore. Check out its brand new version in CKEditor SDK. +
+
+

+ This sample shows how to configure CKEditor instances to use the + TableResize (tableresize) plugin that allows + the user to edit table columns by using the mouse. +

+

+ The TableResize plugin makes it possible to modify table column width. Hover + your mouse over the column border to see the cursor change to indicate that + the column can be resized. Click and drag your mouse to set the desired width. +

+

+ By default the plugin is turned off. To add a CKEditor instance using the + TableResize plugin, insert the following JavaScript call into your code: +

+
+CKEDITOR.replace( 'textarea_id', {
+	extraPlugins: 'tableresize'
+});
+

+ Note that textarea_id in the code above is the id attribute of + the <textarea> element to be replaced with CKEditor. +

+
+
+

+ + + +

+

+ +

+
+ + + diff --git a/libraries/ckeditor/plugins/tableselection/styles/tableselection.css b/libraries/ckeditor/plugins/tableselection/styles/tableselection.css new file mode 100644 index 0000000..3ad2ab1 --- /dev/null +++ b/libraries/ckeditor/plugins/tableselection/styles/tableselection.css @@ -0,0 +1,32 @@ +.cke_table-faked-selection-editor *::selection, table[data-cke-table-faked-selection-table] *::selection { + background: transparent; +} + +.cke_table-faked-selection-editor { + /* With love, dedicated for Chrome, until https://bugs.chromium.org/p/chromium/issues/detail?id=702610 is resolved. + It will force repaint (without reflow) so that selection is properly displayed. */ + transform: translateZ( 0 ); +} + +.cke_table-faked-selection { + background: darkgray !important; + color: black; +} +.cke_table-faked-selection a { + color: black; +} +.cke_editable:focus .cke_table-faked-selection { + /* We have to use !important here, as td might specify it's own background, thus table selection + would not be visible. */ + background: #0076cb !important; + color: white; +} +.cke_editable:focus .cke_table-faked-selection a { + color: white; +} +.cke_table-faked-selection::-moz-selection, .cke_table-faked-selection ::-moz-selection { + background: transparent; +} +.cke_table-faked-selection::selection, .cke_table-faked-selection ::selection { + background: transparent; +} diff --git a/libraries/ckeditor/plugins/tabletools/dialogs/tableCell.js b/libraries/ckeditor/plugins/tabletools/dialogs/tableCell.js new file mode 100644 index 0000000..101d6c0 --- /dev/null +++ b/libraries/ckeditor/plugins/tabletools/dialogs/tableCell.js @@ -0,0 +1,17 @@ +/* + Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.dialog.add("cellProperties",function(g){function d(a){return function(b){for(var c=a(b[0]),d=1;d + * @copyright Copyright (c) 2013 - Önder Ceylan. All rights reserved. + * @license Licensed under the terms of GPL, LGPL and MPL licenses. + * @version 1.0 + * + * Date: 5/10/13 + * Time: 9:45 AM + */ + +// set CKeditor lang +CKEDITOR.plugins.setLang( 'texttransform', 'en', { + transformTextSwitchLabel: 'Transform Text Switcher', + transformTextToLowercaseLabel: 'Transform Text to Lowercase', + transformTextToUppercaseLabel: 'Transform Text to Uppercase', + transformTextCapitalizeLabel: 'Capitalize Text' +}); diff --git a/libraries/ckeditor/plugins/texttransform/lang/tr.js b/libraries/ckeditor/plugins/texttransform/lang/tr.js new file mode 100644 index 0000000..9caedbc --- /dev/null +++ b/libraries/ckeditor/plugins/texttransform/lang/tr.js @@ -0,0 +1,41 @@ +/** + * @author: Önder Ceylan + * @copyright Copyright (c) 2013 - Önder Ceylan. All rights reserved. + * @license Licensed under the terms of GPL, LGPL and MPL licenses. + * @version 1.0 + * + * Date: 5/10/13 + * Time: 9:45 AM + */ + +// define a prototype toUpperCase fn for Turkish character recognization +String.prototype.trToUpperCase = function(){ + var string = this; + var letters = { "i": "İ", "ş": "Ş", "ğ": "Ğ", "ü": "Ü", "ö": "Ö", "ç": "Ç", "ı": "I" }; + string = string.replace(/(([iışğüçö]))/g, function(letter){ return letters[letter]; }); + if (typeof(String.prototype.toLocaleUpperCase()) != 'undefined') { + return string.toLocaleUpperCase(); + } else { + return string.toUpperCase(); + } +}; + +// define prototype toLowerCase fn for Turkish character recognization +String.prototype.trToLowerCase = function(){ + var string = this; + var letters = { "İ": "i", "I": "ı", "Ş": "ş", "Ğ": "ğ", "Ü": "ü", "Ö": "ö", "Ç": "ç" }; + string = string.replace(/(([İIŞĞÜÇÖ]))/g, function(letter){ return letters[letter]; }); + if (typeof(String.prototype.toLocaleLowerCase()) != 'undefined') { + return string.toLocaleLowerCase(); + } else { + return string.toLowerCase(); + } +}; + +// set CKeditor lang +CKEDITOR.plugins.setLang( 'texttransform', 'tr', { + transformTextSwitchLabel: 'Harf Düzenini Değiştir', + transformTextToLowercaseLabel: 'Küçük Harfe Dönüştür', + transformTextToUppercaseLabel: 'Büyük Harfe Dönüştür', + transformTextCapitalizeLabel: 'Baş Harfleri Büyüt' +}); diff --git a/libraries/ckeditor/plugins/texttransform/plugin.js b/libraries/ckeditor/plugins/texttransform/plugin.js new file mode 100644 index 0000000..7ccdcfe --- /dev/null +++ b/libraries/ckeditor/plugins/texttransform/plugin.js @@ -0,0 +1,151 @@ +/** + * @authors: Önder Ceylan , PPKRAUSS https://github.com/ppKrauss + * @license Licensed under the terms of GPL, LGPL and MPL licenses. + * @version 1.1 + * @history v1.0 at 2013-05-09 by onderceylan, v1.1 at 2013-08-27 by ppkrauss. + */ + +CKEDITOR.plugins.add('texttransform', + { + + // define lang codes for available lang files here + lang: 'en,tr', + + // plugin initialise + init: function(editor) + { + // set num for switcher loop + var num = 0; + + // add transformTextSwitch command to be used with button + editor.addCommand('transformTextSwitch', + { + exec : function() + { + var selection = editor.getSelection(); + var commandArray = ['transformTextToUppercase', 'transformTextToLowercase', 'transformTextCapitalize']; + + if (selection.getSelectedText().length > 0) { + + selection.lock(); + + editor.execCommand( commandArray[num] ); + + selection.unlock(true); + + if (num < commandArray.length - 1) { + num++; + } else { + num = 0; + } + + } + } + }); + + // add transformTextToUppercase command to be used with buttons and 'execCommand' method + editor.addCommand('transformTextToUppercase', + { + exec : function() + { + var selection = editor.getSelection(); + if (selection.getSelectedText().length > 0) { + var ranges = selection.getRanges(), + walker = new CKEDITOR.dom.walker( ranges[0] ), + node; + while ( ( node = walker.next() ) ) + if ( node.type == CKEDITOR.NODE_TEXT && node.getText() ) + if (editor.langCode == "tr") { + node.$.textContent = node.$.textContent.trToUpperCase(); + } else { + node.$.textContent = node.$.textContent.toLocaleUpperCase(); + } + }//if + } //func + }); + + // add transformTextToUppercase command to be used with buttons and 'execCommand' method + editor.addCommand('transformTextToLowercase', + { + exec : function() + { + var selection = editor.getSelection(); + if (selection.getSelectedText().length > 0) { + var ranges = selection.getRanges(), + walker = new CKEDITOR.dom.walker( ranges[0] ), + node; + while ( ( node = walker.next() ) ) + if ( node.type == CKEDITOR.NODE_TEXT && node.getText() ) + if (editor.langCode == "tr") { + node.$.textContent = node.$.textContent.trToLowerCase(); + } else { + node.$.textContent = node.$.textContent.toLocaleLowerCase(); + } + + }//if + + } + }); + + // add transformTextCapitalize command to be used with buttons and 'execCommand' method + editor.addCommand( 'transformTextCapitalize', + { + exec : function() + { + var selection = editor.getSelection(); + if (selection.getSelectedText().length > 0) { + var ranges = selection.getRanges(), + walker = new CKEDITOR.dom.walker( ranges[0] ), + node; + while ( ( node = walker.next() ) ) + if ( node.type == CKEDITOR.NODE_TEXT && node.getText() ) + node.$.textContent = node.$.textContent.replace( + /[^\s]\S*/g, + function(txt){ + if (editor.langCode == "tr") { + return txt.charAt(0).trToUpperCase() + + txt.substr(1).trToLowerCase(); + } else { + return txt.charAt(0).toLocaleUpperCase() + + txt.substr(1).toLocaleLowerCase(); + } + + } + ); + }//if + } + }); + + // add TransformTextSwitcher button to editor + editor.ui.addButton('TransformTextSwitcher', + { + label: editor.lang.texttransform.transformTextSwitchLabel, + command: 'transformTextSwitch', + icon: this.path + 'images/transformSwitcher.png' + } ); + + // add TransformTextToLowercase button to editor + editor.ui.addButton('TransformTextToLowercase', + { + label: editor.lang.texttransform.transformTextToLowercaseLabel, + command: 'transformTextToLowercase', + icon: this.path + 'images/transformToLower.png' + } ); + + // add TransformTextToUppercase button to editor + editor.ui.addButton('TransformTextToUppercase', + { + label: editor.lang.texttransform.transformTextToUppercaseLabel, + command: 'transformTextToUppercase', + icon: this.path + 'images/transformToUpper.png' + } ); + + // add TransformTextCapitalize button to editor + editor.ui.addButton('TransformTextCapitalize', + { + label: editor.lang.texttransform.transformTextCapitalizeLabel, + command: 'transformTextCapitalize', + icon: this.path + 'images/transformCapitalize.png' + } ); + } + } ); diff --git a/libraries/ckeditor/plugins/widget/dev/console.js b/libraries/ckeditor/plugins/widget/dev/console.js new file mode 100644 index 0000000..afc0122 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/dev/console.js @@ -0,0 +1,129 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ + +'use strict'; + +( function() { + + CKCONSOLE.add( 'widget', { + panels: [ + { + type: 'box', + content: '
    ', + + refresh: function( editor ) { + var instances = obj2Array( editor.widgets.instances ); + + return { + header: 'Instances (' + instances.length + ')', + instances: generateInstancesList( instances ) + }; + }, + + refreshOn: function( editor, refresh ) { + editor.widgets.on( 'instanceCreated', function( evt ) { + refresh(); + + evt.data.on( 'data', refresh ); + } ); + + editor.widgets.on( 'instanceDestroyed', refresh ); + } + }, + + { + type: 'box', + content: + '
      ' + + '
    • focused:
    • ' + + '
    • selected:
    • ' + + '
    ', + + refresh: function( editor ) { + var focused = editor.widgets.focused, + selected = editor.widgets.selected, + selectedIds = []; + + for ( var i = 0; i < selected.length; ++i ) + selectedIds.push( selected[ i ].id ); + + return { + header: 'Focus & selection', + focused: focused ? 'id: ' + focused.id : '-', + selected: selectedIds.length ? 'id: ' + selectedIds.join( ', id: ' ) : '-' + }; + }, + + refreshOn: function( editor, refresh ) { + editor.on( 'selectionCheck', refresh, null, null, 999 ); + } + }, + + { + type: 'log', + + on: function( editor, log, logFn ) { + // Add all listeners with high priorities to log + // messages in the correct order when one event depends on another. + // E.g. selectionChange triggers widget selection - if this listener + // for selectionChange will be executed later than that one, then order + // will be incorrect. + + editor.on( 'selectionChange', function( evt ) { + var msg = 'selection change', + sel = evt.data.selection, + el = sel.getSelectedElement(), + widget; + + if ( el && ( widget = editor.widgets.getByElement( el, true ) ) ) + msg += ' (id: ' + widget.id + ')'; + + log( msg ); + }, null, null, 1 ); + + editor.widgets.on( 'instanceDestroyed', function( evt ) { + log( 'instance destroyed (id: ' + evt.data.id + ')' ); + }, null, null, 1 ); + + editor.widgets.on( 'instanceCreated', function( evt ) { + log( 'instance created (id: ' + evt.data.id + ')' ); + }, null, null, 1 ); + + editor.widgets.on( 'widgetFocused', function( evt ) { + log( 'widget focused (id: ' + evt.data.widget.id + ')' ); + }, null, null, 1 ); + + editor.widgets.on( 'widgetBlurred', function( evt ) { + log( 'widget blurred (id: ' + evt.data.widget.id + ')' ); + }, null, null, 1 ); + + editor.widgets.on( 'checkWidgets', logFn( 'checking widgets' ), null, null, 1 ); + editor.widgets.on( 'checkSelection', logFn( 'checking selection' ), null, null, 1 ); + } + } + ] + } ); + + function generateInstancesList( instances ) { + var html = '', + instance; + + for ( var i = 0; i < instances.length; ++i ) { + instance = instances[ i ]; + html += itemTpl.output( { id: instance.id, name: instance.name, data: JSON.stringify( instance.data ) } ); + } + return html; + } + + function obj2Array( obj ) { + var arr = []; + for ( var id in obj ) + arr.push( obj[ id ] ); + + return arr; + } + + var itemTpl = new CKEDITOR.template( '
  • id: {id}, name: {name}, data: {data}
  • ' ); +} )(); \ No newline at end of file diff --git a/libraries/ckeditor/plugins/widget/images/handle.png b/libraries/ckeditor/plugins/widget/images/handle.png new file mode 100644 index 0000000..8d1c976 Binary files /dev/null and b/libraries/ckeditor/plugins/widget/images/handle.png differ diff --git a/libraries/ckeditor/plugins/widget/lang/ar.js b/libraries/ckeditor/plugins/widget/lang/ar.js new file mode 100644 index 0000000..7a95ab5 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/ar.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'ar', { + 'move': 'Click and drag to move' // MISSING +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/ca.js b/libraries/ckeditor/plugins/widget/lang/ca.js new file mode 100644 index 0000000..53b90c3 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/ca.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'ca', { + 'move': 'Clicar i arrossegar per moure' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/cs.js b/libraries/ckeditor/plugins/widget/lang/cs.js new file mode 100644 index 0000000..84af366 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/cs.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'cs', { + 'move': 'Klepněte a táhněte pro přesunutí' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/cy.js b/libraries/ckeditor/plugins/widget/lang/cy.js new file mode 100644 index 0000000..665594e --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/cy.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'cy', { + 'move': 'Clcio a llusgo i symud' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/de.js b/libraries/ckeditor/plugins/widget/lang/de.js new file mode 100644 index 0000000..6610c73 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/de.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'de', { + 'move': 'Zum verschieben anwählen und ziehen' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/el.js b/libraries/ckeditor/plugins/widget/lang/el.js new file mode 100644 index 0000000..99c07a6 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/el.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'el', { + 'move': 'Κάνετε κλικ και σύρετε το ποντίκι για να μετακινήστε' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/en-gb.js b/libraries/ckeditor/plugins/widget/lang/en-gb.js new file mode 100644 index 0000000..dae7f76 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/en-gb.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'en-gb', { + 'move': 'Click and drag to move' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/en.js b/libraries/ckeditor/plugins/widget/lang/en.js new file mode 100644 index 0000000..64b8d25 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/en.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'en', { + 'move': 'Click and drag to move' +} ); \ No newline at end of file diff --git a/libraries/ckeditor/plugins/widget/lang/es.js b/libraries/ckeditor/plugins/widget/lang/es.js new file mode 100644 index 0000000..6b34689 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/es.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'es', { + 'move': 'Dar clic y arrastrar para mover' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/fa.js b/libraries/ckeditor/plugins/widget/lang/fa.js new file mode 100644 index 0000000..ec06b66 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/fa.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'fa', { + 'move': 'کلیک و کشیدن برای جابجایی' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/fi.js b/libraries/ckeditor/plugins/widget/lang/fi.js new file mode 100644 index 0000000..1b76865 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/fi.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'fi', { + 'move': 'Siirrä klikkaamalla ja raahaamalla' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/fr.js b/libraries/ckeditor/plugins/widget/lang/fr.js new file mode 100644 index 0000000..8ad8d15 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/fr.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'fr', { + 'move': 'Cliquer et glisser pour déplacer' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/gl.js b/libraries/ckeditor/plugins/widget/lang/gl.js new file mode 100644 index 0000000..b2df383 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/gl.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'gl', { + 'move': 'Prema e arrastre para mover' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/he.js b/libraries/ckeditor/plugins/widget/lang/he.js new file mode 100644 index 0000000..cb30ff6 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/he.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'he', { + 'move': 'לחץ וגרור להזזה' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/hr.js b/libraries/ckeditor/plugins/widget/lang/hr.js new file mode 100644 index 0000000..d952e53 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/hr.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'hr', { + 'move': 'Klikni i povuci da pomakneš' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/hu.js b/libraries/ckeditor/plugins/widget/lang/hu.js new file mode 100644 index 0000000..87e0a44 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/hu.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'hu', { + 'move': 'Kattints és húzd a mozgatáshoz' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/it.js b/libraries/ckeditor/plugins/widget/lang/it.js new file mode 100644 index 0000000..845109e --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/it.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'it', { + 'move': 'Fare clic e trascinare per spostare' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/ja.js b/libraries/ckeditor/plugins/widget/lang/ja.js new file mode 100644 index 0000000..3feea79 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/ja.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'ja', { + 'move': 'ドラッグして移動' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/km.js b/libraries/ckeditor/plugins/widget/lang/km.js new file mode 100644 index 0000000..a9dcbc1 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/km.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'km', { + 'move': 'ចុច​ហើយ​ទាញ​ដើម្បី​ផ្លាស់​ទី' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/ko.js b/libraries/ckeditor/plugins/widget/lang/ko.js new file mode 100644 index 0000000..4657a92 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/ko.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'ko', { + 'move': '움직이려면 클릭 후 드래그 하세요' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/nb.js b/libraries/ckeditor/plugins/widget/lang/nb.js new file mode 100644 index 0000000..39c17ec --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/nb.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'nb', { + 'move': 'Klikk og dra for å flytte' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/nl.js b/libraries/ckeditor/plugins/widget/lang/nl.js new file mode 100644 index 0000000..aa91130 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/nl.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'nl', { + 'move': 'Klik en sleep om te verplaatsen' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/no.js b/libraries/ckeditor/plugins/widget/lang/no.js new file mode 100644 index 0000000..4f4c5dd --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/no.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'no', { + 'move': 'Klikk og dra for å flytte' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/pl.js b/libraries/ckeditor/plugins/widget/lang/pl.js new file mode 100644 index 0000000..8737707 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/pl.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'pl', { + 'move': 'Kliknij i przeciągnij, by przenieść.' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/pt-br.js b/libraries/ckeditor/plugins/widget/lang/pt-br.js new file mode 100644 index 0000000..0c4dd71 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/pt-br.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'pt-br', { + 'move': 'Click e arraste para mover' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/pt.js b/libraries/ckeditor/plugins/widget/lang/pt.js new file mode 100644 index 0000000..b6c1ab5 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/pt.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'pt', { + 'move': 'Clique e arraste para mover' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/ru.js b/libraries/ckeditor/plugins/widget/lang/ru.js new file mode 100644 index 0000000..1ce6183 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/ru.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'ru', { + 'move': 'Нажмите и перетащите' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/sl.js b/libraries/ckeditor/plugins/widget/lang/sl.js new file mode 100644 index 0000000..586f3ea --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/sl.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'sl', { + 'move': 'Kliknite in povlecite, da premaknete' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/sv.js b/libraries/ckeditor/plugins/widget/lang/sv.js new file mode 100644 index 0000000..9b98929 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/sv.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'sv', { + 'move': 'Klicka och drag för att flytta' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/tt.js b/libraries/ckeditor/plugins/widget/lang/tt.js new file mode 100644 index 0000000..0373d5e --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/tt.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'tt', { + 'move': 'Күчереп куер өчен басып шудырыгыз' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/uk.js b/libraries/ckeditor/plugins/widget/lang/uk.js new file mode 100644 index 0000000..c222ce1 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/uk.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'uk', { + 'move': 'Клікніть і потягніть для переміщення' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/zh-cn.js b/libraries/ckeditor/plugins/widget/lang/zh-cn.js new file mode 100644 index 0000000..a6bb608 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/zh-cn.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'zh-cn', { + 'move': '点击并拖拽以移动' +} ); diff --git a/libraries/ckeditor/plugins/widget/lang/zh.js b/libraries/ckeditor/plugins/widget/lang/zh.js new file mode 100644 index 0000000..d5cf9a4 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/lang/zh.js @@ -0,0 +1,7 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang( 'widget', 'zh', { + 'move': '拖曳以移動' +} ); diff --git a/libraries/ckeditor/plugins/widget/plugin.js b/libraries/ckeditor/plugins/widget/plugin.js new file mode 100644 index 0000000..35413d1 --- /dev/null +++ b/libraries/ckeditor/plugins/widget/plugin.js @@ -0,0 +1,3186 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ + +/** + * @fileOverview [Widget](http://ckeditor.com/addon/widget) plugin. + */ + +'use strict'; + +( function() { + + var DRAG_HANDLER_SIZE = 15; + + CKEDITOR.plugins.add( 'widget', { + lang: 'ar,ca,cs,cy,de,el,en,en-gb,es,fa,fi,fr,gl,hr,hu,ja,km,ko,nb,nl,no,pl,pt,pt-br,ru,sl,sv,uk,zh,zh-cn', // %REMOVE_LINE_CORE% + requires: 'lineutils,clipboard', + onLoad: function() { + CKEDITOR.addCss( + '.cke_widget_wrapper{' + + 'position:relative;' + + 'outline:none' + + '}' + + '.cke_widget_inline{' + + 'display:inline-block' + + '}' + + '.cke_widget_wrapper:hover>.cke_widget_element{' + + 'outline:2px solid yellow;' + + 'cursor:default' + + '}' + + '.cke_widget_wrapper:hover .cke_widget_editable{' + + 'outline:2px solid yellow' + + '}' + + '.cke_widget_wrapper.cke_widget_focused>.cke_widget_element,' + + // We need higher specificity than hover style. + '.cke_widget_wrapper .cke_widget_editable.cke_widget_editable_focused{' + + 'outline:2px solid #ace' + + '}' + + '.cke_widget_editable{' + + 'cursor:text' + + '}' + + '.cke_widget_drag_handler_container{' + + 'position:absolute;' + + 'width:' + DRAG_HANDLER_SIZE + 'px;' + + 'height:0;' + + // Initially drag handler should not be visible, until its position will be + // repositioned. #11177 + 'left:-9999px;' + + 'opacity:0.75;' + + 'transition:height 0s 0.2s;' + // Delay hiding drag handler. + // Prevent drag handler from being misplaced (#11198). + 'line-height:0' + + '}' + + '.cke_widget_wrapper:hover>.cke_widget_drag_handler_container{' + + 'height:' + DRAG_HANDLER_SIZE + 'px;' + + 'transition:none' + + '}' + + '.cke_widget_drag_handler_container:hover{' + + 'opacity:1' + + '}'+ + 'img.cke_widget_drag_handler{' + + 'cursor:move;' + + 'width:' + DRAG_HANDLER_SIZE + 'px;' + + 'height:' + DRAG_HANDLER_SIZE + 'px;' + + 'display:inline-block' + + '}' + + '.cke_widget_mask{' + + 'position:absolute;' + + 'top:0;' + + 'left:0;' + + 'width:100%;' + + 'height:100%;' + + 'display:block' + + '}' + + '.cke_editable.cke_widget_dragging, .cke_editable.cke_widget_dragging *{' + + 'cursor:move !important' + + '}' + ); + }, + + beforeInit: function( editor ) { + /** + * An instance of widget repository. It contains all + * {@link CKEDITOR.plugins.widget.repository#registered registered widget definitions} and + * {@link CKEDITOR.plugins.widget.repository#instances initialized instances}. + * + * editor.widgets.add( 'someName', { + * // Widget definition... + * } ); + * + * editor.widgets.registered.someName; // -> Widget definition + * + * @since 4.3 + * @readonly + * @property {CKEDITOR.plugins.widget.repository} widgets + * @member CKEDITOR.editor + */ + editor.widgets = new Repository( editor ); + }, + + afterInit: function( editor ) { + addWidgetButtons( editor ); + setupContextMenu( editor ); + } + } ); + + /** + * Widget repository. It keeps track of all {@link #registered registered widget definitions} and + * {@link #instances initialized instances}. An instance of the repository is available under + * the {@link CKEDITOR.editor#widgets} property. + * + * @class CKEDITOR.plugins.widget.repository + * @mixins CKEDITOR.event + * @constructor Creates a widget repository instance. Note that the widget plugin automatically + * creates a repository instance which is available under the {@link CKEDITOR.editor#widgets} property. + * @param {CKEDITOR.editor} editor The editor instance for which the repository will be created. + */ + function Repository( editor ) { + /** + * The editor instance for which this repository was created. + * + * @readonly + * @property {CKEDITOR.editor} editor + */ + this.editor = editor; + + /** + * A hash of registered widget definitions (definition name => {@link CKEDITOR.plugins.widget.definition}). + * + * To register a definition use the {@link #add} method. + * + * @readonly + */ + this.registered = {}; + + /** + * An object containing initialized widget instances (widget id => {@link CKEDITOR.plugins.widget}). + * + * @readonly + */ + this.instances = {}; + + /** + * An array of selected widget instances. + * + * @readonly + * @property {CKEDITOR.plugins.widget[]} selected + */ + this.selected = []; + + /** + * The focused widget instance. See also {@link CKEDITOR.plugins.widget#event-focus} + * and {@link CKEDITOR.plugins.widget#event-blur} events. + * + * editor.on( 'selectionChange', function() { + * if ( editor.widgets.focused ) { + * // Do something when a widget is focused... + * } + * } ); + * + * @readonly + * @property {CKEDITOR.plugins.widget} focused + */ + this.focused = null; + + /** + * The widget instance that contains the nested editable which is currently focused. + * + * @readonly + * @property {CKEDITOR.plugins.widget} widgetHoldingFocusedEditable + */ + this.widgetHoldingFocusedEditable = null; + + this._ = { + nextId: 0, + upcasts: [], + upcastCallbacks: [], + filters: {} + }; + + setupWidgetsLifecycle( this ); + setupSelectionObserver( this ); + setupMouseObserver( this ); + setupKeyboardObserver( this ); + setupDragAndDrop( this ); + setupNativeCutAndCopy( this ); + } + + Repository.prototype = { + /** + * Minimum interval between selection checks. + * + * @private + */ + MIN_SELECTION_CHECK_INTERVAL: 500, + + /** + * Adds a widget definition to the repository. Fires the {@link CKEDITOR.editor#widgetDefinition} event + * which allows to modify the widget definition which is going to be registered. + * + * @param {String} name The name of the widget definition. + * @param {CKEDITOR.plugins.widget.definition} widgetDef Widget definition. + * @returns {CKEDITOR.plugins.widget.definition} + */ + add: function( name, widgetDef ) { + // Create prototyped copy of original widget definition, so we won't modify it. + widgetDef = CKEDITOR.tools.prototypedCopy( widgetDef ); + widgetDef.name = name; + + widgetDef._ = widgetDef._ || {}; + + this.editor.fire( 'widgetDefinition', widgetDef ); + + if ( widgetDef.template ) + widgetDef.template = new CKEDITOR.template( widgetDef.template ); + + addWidgetCommand( this.editor, widgetDef ); + addWidgetProcessors( this, widgetDef ); + + // Register widget automatically if it does not have a button. + if ( !widgetDef.button ) + this.editor.addFeature( widgetDef ); + + this.registered[ name ] = widgetDef; + + return widgetDef; + }, + + /** + * Adds a callback for element upcasting. Each callback will be executed + * for every element which is later tested by upcast methods. If a callback + * returns `false`, the element will not be upcasted. + * + * // Images with the "banner" class will not be upcasted (e.g. to the image widget). + * editor.widgets.addUpcastCallback( function( element ) { + * if ( element.name == 'img' && element.hasClass( 'banner' ) ) + * return false; + * } ); + * + * @param {Function} callback + * @param {CKEDITOR.htmlParser.element} callback.element + */ + addUpcastCallback: function( callback ) { + this._.upcastCallbacks.push( callback ); + }, + + /** + * Checks the selection to update widget states (selection and focus). + * + * This method is triggered by the {@link #event-checkSelection} event. + */ + checkSelection: function() { + var sel = this.editor.getSelection(), + selectedElement = sel.getSelectedElement(), + updater = stateUpdater( this ), + widget; + + // Widget is focused so commit and finish checking. + if ( selectedElement && ( widget = this.getByElement( selectedElement, true ) ) ) + return updater.focus( widget ).select( widget ).commit(); + + var range = sel.getRanges()[ 0 ]; + + // No ranges or collapsed range mean that nothing is selected, so commit and finish checking. + if ( !range || range.collapsed ) + return updater.commit(); + + // Range is not empty, so create walker checking for wrappers. + var walker = new CKEDITOR.dom.walker( range ), + wrapper; + + walker.evaluator = isDomWidgetWrapper; + + while ( ( wrapper = walker.next() ) ) + updater.select( this.getByElement( wrapper ) ); + + updater.commit(); + }, + + /** + * Checks if all widget instances are still present in the DOM. + * Destroys those instances that are not present. + * Reinitializes widgets on widget wrappers for which widget instances + * cannot be found. + * + * This method triggers the {@link #event-checkWidgets} event whose listeners + * can cancel the method's execution or modify its options. + * + * @param [options] The options object. + * @param {Boolean} [options.initOnlyNew] Initializes widgets only on newly wrapped + * widget elements (those which still have the `cke_widget_new` class). When this option is + * set to `true`, widgets which were invalidated (e.g. by replacing with a cloned DOM structure) + * will not be reinitialized. This makes the check faster. + * @param {Boolean} [options.focusInited] If only one widget is initialized by + * the method, it will be focused. + */ + checkWidgets: function( options ) { + this.fire( 'checkWidgets', CKEDITOR.tools.copy( options || {} ) ); + }, + + /** + * Removes the widget from the editor and moves the selection to the closest + * editable position if the widget was focused before. + * + * @param {CKEDITOR.plugins.widget} widget The widget instance to be deleted. + */ + del: function( widget ) { + if ( this.focused === widget ) { + var editor = widget.editor, + range = editor.createRange(), + found; + + // If haven't found place for caret on the default side, + // try to find it on the other side. + if ( !( found = range.moveToClosestEditablePosition( widget.wrapper, true ) ) ) + found = range.moveToClosestEditablePosition( widget.wrapper, false ); + + if ( found ) + editor.getSelection().selectRanges( [ range ] ); + } + + widget.wrapper.remove(); + this.destroy( widget, true ); + }, + + /** + * Destroys the widget instance. + * + * @param {CKEDITOR.plugins.widget} widget The widget instance to be destroyed. + * @param {Boolean} [offline] Whether the widget is offline (detached from the DOM tree) — + * in this case the DOM (attributes, classes, etc.) will not be cleaned up. + */ + destroy: function( widget, offline ) { + if ( this.widgetHoldingFocusedEditable === widget ) + setFocusedEditable( this, widget, null, offline ); + + widget.destroy( offline ); + delete this.instances[ widget.id ]; + this.fire( 'instanceDestroyed', widget ); + }, + + /** + * Destroys all widget instances. + * + * @param {Boolean} [offline] Whether the widgets are offline (detached from the DOM tree) — + * in this case the DOM (attributes, classes, etc.) will not be cleaned up. + */ + destroyAll: function( offline ) { + var instances = this.instances, + widget; + + for ( var id in instances ) { + widget = instances[ id ]; + this.destroy( widget, offline ); + } + }, + + /** + * Finalizes a process of widget creation. This includes: + * + * * inserting widget element into editor, + * * marking widget instance as ready (see {@link CKEDITOR.plugins.widget#event-ready}), + * * focusing widget instance. + * + * This method is used by the default widget's command and is called + * after widget's dialog (if set) is closed. It may also be used in a + * customized process of widget creation and insertion. + * + * widget.once( 'edit', function() { + * // Finalize creation only of not ready widgets. + * if ( widget.isReady() ) + * return; + * + * // Cancel edit event to prevent automatic widget insertion. + * evt.cancel(); + * + * CustomDialog.open( widget.data, function saveCallback( savedData ) { + * // Cache the container, because widget may be destroyed while saving data, + * // if this process will require some deep transformations. + * var container = widget.wrapper.getParent(); + * + * widget.setData( savedData ); + * + * // Widget will be retrieved from container and inserted into editor. + * editor.widgets.finalizeCreation( container ); + * } ); + * } ); + * + * @param {CKEDITOR.dom.element/CKEDITOR.dom.documentFragment} container The element + * or document fragment which contains widget wrapper. The container is used, so before + * finalizing creation the widget can be freely transformed (even destroyed and reinitialized). + */ + finalizeCreation: function( container ) { + var wrapper = container.getFirst(); + if ( wrapper && isDomWidgetWrapper( wrapper ) ) { + this.editor.insertElement( wrapper ); + + var widget = this.getByElement( wrapper ); + // Fire postponed #ready event. + widget.ready = true; + widget.fire( 'ready' ); + widget.focus(); + } + }, + + /** + * Finds a widget instance which contains a given element. The element will be the {@link CKEDITOR.plugins.widget#wrapper wrapper} + * of the returned widget or a descendant of this {@link CKEDITOR.plugins.widget#wrapper wrapper}. + * + * editor.widgets.getByElement( someWidget.wrapper ); // -> someWidget + * editor.widgets.getByElement( someWidget.parts.caption ); // -> someWidget + * + * // Check wrapper only: + * editor.widgets.getByElement( someWidget.wrapper, true ); // -> someWidget + * editor.widgets.getByElement( someWidget.parts.caption, true ); // -> null + * + * @param {CKEDITOR.dom.element} element The element to be checked. + * @param {Boolean} [checkWrapperOnly] If set to `true`, the method will not check wrappers' descendants. + * @returns {CKEDITOR.plugins.widget} The widget instance or `null`. + */ + getByElement: function( element, checkWrapperOnly ) { + if ( !element ) + return null; + + var wrapper; + + for ( var id in this.instances ) { + wrapper = this.instances[ id ].wrapper; + if ( wrapper.equals( element ) || ( !checkWrapperOnly && wrapper.contains( element ) ) ) + return this.instances[ id ]; + } + + return null; + }, + + /** + * Initializes a widget on a given element if the widget has not been initialized on it yet. + * + * @param {CKEDITOR.dom.element} element The future widget element. + * @param {String/CKEDITOR.plugins.widget.definition} [widgetDef] Name of a widget or a widget definition. + * The widget definition should be previously registered by using the + * {@link CKEDITOR.plugins.widget.repository#add} method. + * @param [startupData] Widget startup data (has precedence over default one). + * @returns {CKEDITOR.plugins.widget} The widget instance or `null` if a widget could not be initialized on + * a given element. + */ + initOn: function( element, widgetDef, startupData ) { + if ( !widgetDef ) + widgetDef = this.registered[ element.data( 'widget' ) ]; + else if ( typeof widgetDef == 'string' ) + widgetDef = this.registered[ widgetDef ]; + + if ( !widgetDef ) + return null; + + // Wrap element if still wasn't wrapped (was added during runtime by method that skips dataProcessor). + var wrapper = this.wrapElement( element, widgetDef.name ); + + if ( wrapper ) { + // Check if widget wrapper is new (widget hasn't been initialized on it yet). + // This class will be removed by widget constructor to avoid locking snapshot twice. + if ( wrapper.hasClass( 'cke_widget_new' ) ) { + var widget = new Widget( this, this._.nextId++, element, widgetDef, startupData ); + + // Widget could be destroyed when initializing it. + if ( widget.isInited() ) { + this.instances[ widget.id ] = widget; + + return widget; + } else + return null; + } + + // Widget already has been initialized, so try to get widget by element. + // Note - it may happen that other instance will returned than the one created above, + // if for example widget was destroyed and reinitialized. + return this.getByElement( element ); + } + + // No wrapper means that there's no widget for this element. + return null; + }, + + /** + * Initializes widgets on all elements which were wrapped by {@link #wrapElement} and + * have not been initialized yet. + * + * @param {CKEDITOR.dom.element} [container=editor.editable()] The container which will be checked for not + * initialized widgets. Defaults to editor's {@link CKEDITOR.editor#editable editable} element. + * @returns {CKEDITOR.plugins.widget[]} Array of widget instances which have been initialized. + */ + initOnAll: function( container ) { + var newWidgets = ( container || this.editor.editable() ).find( '.cke_widget_new' ), + newInstances = [], + instance; + + for ( var i = newWidgets.count(); i--; ) { + instance = this.initOn( newWidgets.getItem( i ).getFirst( isDomWidgetElement ) ); + if ( instance ) + newInstances.push( instance ); + } + + return newInstances; + }, + + /** + * Wraps an element with a widget's non-editable container. + * + * If this method is called on an {@link CKEDITOR.htmlParser.element}, then it will + * also take care of fixing the DOM after wrapping (the wrapper may not be allowed in element's parent). + * + * @param {CKEDITOR.dom.element/CKEDITOR.htmlParser.element} element The widget element to be wrapped. + * @param {String} [widgetName] The name of the widget definition. Defaults to element's `data-widget` + * attribute value. + * @returns {CKEDITOR.dom.element/CKEDITOR.htmlParser.element} The wrapper element or `null` if + * the widget definition of this name is not registered. + */ + wrapElement: function( element, widgetName ) { + var wrapper = null, + widgetDef, + isInline; + + if ( element instanceof CKEDITOR.dom.element ) { + widgetDef = this.registered[ widgetName || element.data( 'widget' ) ]; + if ( !widgetDef ) + return null; + + // Do not wrap already wrapped element. + wrapper = element.getParent(); + if ( wrapper && wrapper.type == CKEDITOR.NODE_ELEMENT && wrapper.data( 'cke-widget-wrapper' ) ) + return wrapper; + + // If attribute isn't already set (e.g. for pasted widget), set it. + if ( !element.hasAttribute( 'data-cke-widget-keep-attr' ) ) + element.data( 'cke-widget-keep-attr', element.data( 'widget' ) ? 1 : 0 ); + if ( widgetName ) + element.data( 'widget', widgetName ); + + isInline = isWidgetInline( widgetDef, element.getName() ); + + wrapper = new CKEDITOR.dom.element( isInline ? 'span' : 'div' ); + wrapper.setAttributes( getWrapperAttributes( isInline ) ); + + wrapper.data( 'cke-display-name', widgetDef.pathName ? widgetDef.pathName : element.getName() ); + + // Replace element unless it is a detached one. + if ( element.getParent( true ) ) + wrapper.replace( element ); + element.appendTo( wrapper ); + } + else if ( element instanceof CKEDITOR.htmlParser.element ) { + widgetDef = this.registered[ widgetName || element.attributes[ 'data-widget' ] ]; + if ( !widgetDef ) + return null; + + wrapper = element.parent; + if ( wrapper && wrapper.type == CKEDITOR.NODE_ELEMENT && wrapper.attributes[ 'data-cke-widget-wrapper' ] ) + return wrapper; + + // If attribute isn't already set (e.g. for pasted widget), set it. + if ( !( 'data-cke-widget-keep-attr' in element.attributes ) ) + element.attributes[ 'data-cke-widget-keep-attr' ] = element.attributes[ 'data-widget' ] ? 1 : 0; + if ( widgetName ) + element.attributes[ 'data-widget' ] = widgetName; + + isInline = isWidgetInline( widgetDef, element.name ); + + wrapper = new CKEDITOR.htmlParser.element( isInline ? 'span' : 'div', getWrapperAttributes( isInline ) ); + + wrapper.attributes[ 'data-cke-display-name' ] = widgetDef.pathName ? widgetDef.pathName : element.name; + + var parent = element.parent, + index; + + // Don't detach already detached element. + if ( parent ) { + index = element.getIndex(); + element.remove(); + } + + wrapper.add( element ); + + // Insert wrapper fixing DOM (splitting parents if wrapper is not allowed inside them). + parent && insertElement( parent, index, wrapper ); + } + + return wrapper; + }, + + // Expose for tests. + _tests_getNestedEditable: getNestedEditable, + _tests_createEditableFilter: createEditableFilter + }; + + CKEDITOR.event.implementOn( Repository.prototype ); + + /** + * An event fired when a widget instance is created, but before it is fully initialized. + * + * @event instanceCreated + * @param {CKEDITOR.plugins.widget} data The widget instance. + */ + + /** + * An event fired when a widget instance was destroyed. + * + * See also {@link CKEDITOR.plugins.widget#event-destroy}. + * + * @event instanceDestroyed + * @param {CKEDITOR.plugins.widget} data The widget instance. + */ + + /** + * An event fired to trigger the selection check. + * + * See the {@link #method-checkSelection} method. + * + * @event checkSelection + */ + + /** + * An event fired by the the {@link #method-checkWidgets} method. + * + * It can be canceled in order to stop the {@link #method-checkWidgets} + * method execution or the event listener can modify the method's options. + * + * @event checkWidgets + * @param [data] + * @param {Boolean} [data.initOnlyNew] Initialize widgets only on newly wrapped + * widget elements (those which still have the `cke_widget_new` class). When this option is + * set to `true`, widgets which were invalidated (e.g. by replacing with a cloned DOM structure) + * will not be reinitialized. This makes the check faster. + * @param {Boolean} [data.focusInited] If only one widget is initialized by + * the method, it will be focused. + */ + + + /** + * An instance of a widget. Together with {@link CKEDITOR.plugins.widget.repository} these + * two classes constitute the core of the Widget System. + * + * Note that neither the repository nor the widget instances can be created by using their constructors. + * A repository instance is automatically set up by the Widget plugin and is accessible under + * {@link CKEDITOR.editor#widgets}, while widget instances are created and destroyed by the repository. + * + * To create a widget, first you need to {@link CKEDITOR.plugins.widget.repository#add register} its + * {@link CKEDITOR.plugins.widget.definition definition}: + * + * editor.widgets.add( 'simplebox', { + * upcast: function( element ) { + * // Defines which elements will become widgets. + * if ( element.hasClass( 'simplebox' ) ) + * return true; + * }, + * init: function() { + * // ... + * } + * } ); + * + * Once the widget definition is registered, widgets will be automatically + * created when loading data: + * + * editor.setData( '
    foo
    ', function() { + * console.log( editor.widgets.instances ); // -> An object containing one instance. + * } ); + * + * It is also possible to create instances during runtime by using a command + * (if a {@link CKEDITOR.plugins.widget.definition#template} property was defined): + * + * // You can execute an automatically defined command to + * // insert a new simplebox widget or edit the one currently focused. + * editor.execCommand( 'simplebox' ); + * + * Or in a completely custom way: + * + * var element = editor.createElement( 'div' ); + * editor.insertElement( element ); + * var widget = editor.widgets.initOn( element, 'simplebox' ); + * + * @since 4.3 + * @class CKEDITOR.plugins.widget + * @mixins CKEDITOR.event + * @extends CKEDITOR.plugins.widget.definition + * @constructor Creates an instance of the widget class. Do not use it directly, but instead initialize widgets + * by using the {@link CKEDITOR.plugins.widget.repository#initOn} method or by the upcasting system. + * @param {CKEDITOR.plugins.widget.repository} widgetsRepo + * @param {Number} id Unique ID of this widget instance. + * @param {CKEDITOR.dom.element} element The widget element. + * @param {CKEDITOR.plugins.widget.definition} widgetDef Widget's registered definition. + * @param [startupData] Initial widget data. This data object will overwrite the default data and + * the data loaded from the DOM. + */ + function Widget( widgetsRepo, id, element, widgetDef, startupData ) { + var editor = widgetsRepo.editor; + + // Extend this widget with widgetDef-specific methods and properties. + CKEDITOR.tools.extend( this, widgetDef, { + /** + * The editor instance. + * + * @readonly + * @property {CKEDITOR.editor} + */ + editor: editor, + + /** + * This widget's unique (per editor instance) ID. + * + * @readonly + * @property {Number} + */ + id: id, + + /** + * Whether this widget is an inline widget (based on an inline element unless + * forced otherwise by {@link CKEDITOR.plugins.widget.definition#inline}). + * + * **Note:** This option does not allow to turn a block element into an inline widget. + * However, it makes it possible to turn an inline element into a block widget or to + * force a correct type in case when automatic recognition fails. + * + * @readonly + * @property {Boolean} + */ + inline: element.getParent().getName() == 'span', + + /** + * The widget element — the element on which the widget was initialized. + * + * @readonly + * @property {CKEDITOR.dom.element} element + */ + element: element, + + /** + * Widget's data object. + * + * The data can only be set by using the {@link #setData} method. + * Changes made to the data fire the {@link #event-data} event. + * + * @readonly + */ + data: CKEDITOR.tools.extend( {}, typeof widgetDef.defaults == 'function' ? widgetDef.defaults() : widgetDef.defaults ), + + /** + * Indicates if a widget is data-ready. Set to `true` when data from all sources + * ({@link CKEDITOR.plugins.widget.definition#defaults}, set in the + * {@link #init} method, loaded from the widget's element and startup data coming from the constructor) + * are finally loaded. This is immediately followed by the first {@link #event-data}. + * + * @readonly + */ + dataReady: false, + + /** + * Whether a widget instance was initialized. This means that: + * + * * An instance was created, + * * Its properties were set, + * * The `init` method was executed. + * + * **Note**: The first {@link #event-data} event could not be fired yet which + * means that the widget's DOM has not been set up yet. Wait for the {@link #event-ready} + * event to be notified when a widget is fully initialized and ready. + * + * **Note**: Use the {@link #isInited} method to check whether a widget is initialized and + * has not been destroyed. + * + * @readonly + */ + inited: false, + + /** + * Whether a widget instance is ready. This means that the widget is {@link #inited} and + * that its DOM was finally set up. + * + * **Note:** Use the {@link #isReady} method to check whether a widget is ready and + * has not been destroyed. + * + * @readonly + */ + ready: false, + + // Revert what widgetDef could override (automatic #edit listener). + edit: Widget.prototype.edit, + + /** + * The nested editable element which is currently focused. + * + * @readonly + * @property {CKEDITOR.plugins.widget.nestedEditable} + */ + focusedEditable: null, + + /** + * The widget definition from which this instance was created. + * + * @readonly + * @property {CKEDITOR.plugins.widget.definition} definition + */ + definition: widgetDef, + + /** + * Link to the widget repository which created this instance. + * + * @readonly + * @property {CKEDITOR.plugins.widget.repository} repository + */ + repository: widgetsRepo, + + draggable: widgetDef.draggable !== false, + + // WAAARNING: Overwrite widgetDef's priv object, because otherwise violent unicorn's gonna visit you. + _: { + downcastFn: ( widgetDef.downcast && typeof widgetDef.downcast == 'string' ) ? + widgetDef.downcasts[ widgetDef.downcast ] : widgetDef.downcast + } + }, true ); + + /** + * An object of widget component elements. + * + * For every `partName => selector` pair in {@link CKEDITOR.plugins.widget.definition#parts}, + * one `partName => element` pair is added to this object during the widget initialization. + * + * @readonly + * @property {Object} parts + */ + + /** + * The template which will be used to create a new widget element (when the widget's command is executed). + * It will be populated with {@link #defaults default values}. + * + * @readonly + * @property {CKEDITOR.template} template + */ + + /** + * The widget wrapper — a non-editable `div` or `span` element (depending on {@link #inline}) + * which is a parent of the {@link #element} and widget compontents like the drag handler and the {@link #mask}. + * It is the outermost widget element. + * + * @readonly + * @property {CKEDITOR.dom.element} wrapper + */ + + widgetsRepo.fire( 'instanceCreated', this ); + + setupWidget( this, widgetDef ); + + this.init && this.init(); + + // Finally mark widget as inited. + this.inited = true; + + setupWidgetData( this, startupData ); + + // If at some point (e.g. in #data listener) widget hasn't been destroyed + // and widget is already attached to document then fire #ready. + if ( this.isInited() && editor.editable().contains( this.wrapper ) ) { + this.ready = true; + this.fire( 'ready' ); + } + } + + Widget.prototype = { + /** + * Destroys this widget instance. + * + * Use {@link CKEDITOR.plugins.widget.repository#destroy} when possible instead of this method. + * + * This method fires the {#event-destroy} event. + * + * @param {Boolean} [offline] Whether a widget is offline (detached from the DOM tree) — + * in this case the DOM (attributes, classes, etc.) will not be cleaned up. + */ + destroy: function( offline ) { + var editor = this.editor; + + this.fire( 'destroy' ); + + if ( this.editables ) { + for ( var name in this.editables ) + this.destroyEditable( name, offline ); + } + + if ( !offline ) { + if ( this.element.data( 'cke-widget-keep-attr' ) == '0' ) + this.element.removeAttribute( 'data-widget' ); + this.element.removeAttributes( [ 'data-cke-widget-data', 'data-cke-widget-keep-attr' ] ); + this.element.removeClass( 'cke_widget_element' ); + this.element.replace( this.wrapper ); + } + + this.wrapper = null; + }, + + /** + * Destroys a nested editable. + * + * @param {String} editableName Nested editable name. + * @param {Boolean} [offline] See {@link #method-destroy} method. + */ + destroyEditable: function( editableName, offline ) { + var editable = this.editables[ editableName ]; + + editable.removeListener( 'focus', onEditableFocus ); + editable.removeListener( 'blur', onEditableBlur ); + this.editor.focusManager.remove( editable ); + + if ( !offline ) { + editable.removeClass( 'cke_widget_editable' ); + editable.removeClass( 'cke_widget_editable_focused' ); + editable.removeAttributes( [ 'contenteditable', 'data-cke-widget-editable', 'data-cke-enter-mode' ] ); + } + + delete this.editables[ editableName ]; + }, + + /** + * Starts widget editing. + * + * This method fires the {@link CKEDITOR.plugins.widget#event-edit} event + * which may be cancelled in order to prevent it from opening a dialog window. + * + * The dialog window name is obtained from the event's data `dialog` property or + * from {@link CKEDITOR.plugins.widget.definition#dialog}. + */ + edit: function() { + var evtData = { dialog: this.dialog }, + that = this; + + // Edit event was blocked, but there's no dialog to be automatically opened. + if ( this.fire( 'edit', evtData ) === false || !evtData.dialog ) + return; + + this.editor.openDialog( evtData.dialog, function( dialog ) { + var showListener, + okListener; + + // Allow to add a custom dialog handler. + if ( that.fire( 'dialog', dialog ) === false ) + return; + + showListener = dialog.on( 'show', function() { + dialog.setupContent( that ); + } ); + + okListener = dialog.on( 'ok', function() { + // Commit dialog's fields, but prevent from + // firing data event for every field. Fire only one, + // bulk event at the end. + var dataChanged, + dataListener = that.on( 'data', function( evt ) { + dataChanged = 1; + evt.cancel(); + }, null, null, 0 ); + + // Create snapshot preceeding snapshot with changed widget... + // TODO it should not be required, but it is and I found similar + // code in dialog#ok listener in dialog/plugin.js. + that.editor.fire( 'saveSnapshot' ); + dialog.commitContent( that ); + + dataListener.removeListener(); + if ( dataChanged ) { + that.fire( 'data', that.data ); + that.editor.fire( 'saveSnapshot' ); + } + } ); + + dialog.once( 'hide', function() { + showListener.removeListener(); + okListener.removeListener(); + } ); + } ); + }, + + /** + * Initializes a nested editable. + * + * **Note**: Only elements from {@link CKEDITOR.dtd#$editable} may become editables. + * + * @param {String} editableName The nested editable name. + * @param {CKEDITOR.plugins.widget.nestedEditable.definition} definition The definition of the nested editable. + * @returns {Boolean} Whether an editable was successfully initialized. + */ + initEditable: function( editableName, definition ) { + var editable = this.wrapper.findOne( definition.selector ); + + if ( editable && editable.is( CKEDITOR.dtd.$editable ) ) { + editable = new NestedEditable( this.editor, editable, { + filter: createEditableFilter.call( this.repository, this.name, editableName, definition ) + } ); + this.editables[ editableName ] = editable; + + editable.setAttributes( { + contenteditable: 'true', + 'data-cke-widget-editable': editableName, + 'data-cke-enter-mode': editable.enterMode + } ); + + if ( editable.filter ) + editable.data( 'cke-filter', editable.filter.id ); + + editable.addClass( 'cke_widget_editable' ); + // This class may be left when d&ding widget which + // had focused editable. Clean this class here, not in + // cleanUpWidgetElement for performance and code size reasons. + editable.removeClass( 'cke_widget_editable_focused' ); + + if ( definition.pathName ) + editable.data( 'cke-display-name', definition.pathName ); + + this.editor.focusManager.add( editable ); + editable.on( 'focus', onEditableFocus, this ); + CKEDITOR.env.ie && editable.on( 'blur', onEditableBlur, this ); + + // Finally, process editable's data. This data wasn't processed when loading + // editor's data, becuase they need to be processed separately, with its own filters and settings. + editable.setData( editable.getHtml() ); + + return true; + } + + return false; + }, + + /** + * Checks if a widget has already been initialized and has not been destroyed yet. + * + * See {@link #inited} for more details. + * + * @returns {Boolean} + */ + isInited: function() { + return !!( this.wrapper && this.inited ); + }, + + /** + * Checks if a widget is ready and has not been destroyed yet. + * + * See {@link #property-ready} for more details. + * + * @returns {Boolean} + */ + isReady: function() { + return this.isInited() && this.ready; + }, + + /** + * Focuses a widget by selecting it. + */ + focus: function() { + var sel = this.editor.getSelection(); + + // Fake the selection before focusing editor, to avoid unpreventable viewports scrolling + // on Webkit/Blink/IE which is done because there's no selection or selection was somewhere else than widget. + if ( sel ) + sel.fake( this.wrapper ); + + // Always focus editor (not only when focusManger.hasFocus is false) (because of #10483). + this.editor.focus(); + }, + + /** + * Sets widget value(s) in the {@link #property-data} object. + * If the given value(s) modifies current ones, the {@link #event-data} event is fired. + * + * this.setData( 'align', 'left' ); + * this.data.align; // -> 'left' + * + * this.setData( { align: 'right', opened: false } ); + * this.data.align; // -> 'right' + * this.data.opened; // -> false + * + * Set values are stored in {@link #element}'s attribute (`data-cke-widget-data`), + * in a JSON string, therefore {@link #property-data} should contain + * only serializable data. + * + * @param {String/Object} keyOrData + * @param {Object} value + * @chainable + */ + setData: function( key, value ) { + var data = this.data, + modified = 0; + + if ( typeof key == 'string' ) { + if ( data[ key ] !== value ) { + data[ key ] = value; + modified = 1; + } + } + else { + var newData = key; + + for ( key in newData ) { + if ( data[ key ] !== newData[ key ] ) { + modified = 1; + data[ key ] = newData[ key ]; + } + } + } + + // Block firing data event and overwriting data element before setupWidgetData is executed. + if ( modified && this.dataReady ) { + writeDataToElement( this ); + this.fire( 'data', data ); + } + + return this; + }, + + /** + * Changes the widget's focus state. This method is executed automatically after + * a widget has been focused by the {@link #method-focus} method or a selection was moved + * out of the widget. + * + * @param {Boolean} selected Whether to select or deselect this widget. + * @chainable + */ + setFocused: function( focused ) { + this.wrapper[ focused ? 'addClass' : 'removeClass' ]( 'cke_widget_focused' ); + this.fire( focused ? 'focus' : 'blur' ); + return this; + }, + + /** + * Changes the widget's select state. This method is executed automatically after + * a widget has been selected by the {@link #method-focus} method or the selection + * was moved out of widget. + * + * @param {Boolean} selected Whether to select or deselect this widget. + * @chainable + */ + setSelected: function( selected ) { + this.wrapper[ selected ? 'addClass' : 'removeClass' ]( 'cke_widget_selected' ); + this.fire( selected ? 'select' : 'deselect' ); + return this; + }, + + /** + * Repositions drag handler according to the widget's element position. Should be called from events, like mouseover. + */ + updateDragHandlerPosition: function() { + var editor = this.editor, + domElement = this.element.$, + oldPos = this._.dragHandlerOffset, + newPos = { + x: domElement.offsetLeft, + y: domElement.offsetTop - DRAG_HANDLER_SIZE + }; + + if ( oldPos && newPos.x == oldPos.x && newPos.y == oldPos.y ) + return; + + // We need to make sure that dirty state is not changed (#11487). + var initialDirty = editor.checkDirty(); + + editor.fire( 'lockSnapshot' ); + this.dragHandlerContainer.setStyles( { + top: newPos.y + 'px', + left: newPos.x + 'px' + } ); + editor.fire( 'unlockSnapshot' ); + !initialDirty && editor.resetDirty(); + + this._.dragHandlerOffset = newPos; + } + }; + + CKEDITOR.event.implementOn( Widget.prototype ); + + /** + * An event fired when a widget is ready (fully initialized). This event is fired after: + * + * * {@link #init} is called, + * * The first {@link #event-data} event is fired, + * * A widget is attached to the document. + * + * Therefore, in case of widget creation with a command which opens a dialog window, this event + * will be delayed after the dialog window is closed and the widget is finally inserted into the document. + * + * **Note**: If your widget does not use automatic dialog window binding (i.e. you open the dialog window manually) + * or another situation in which the widget wrapper is not attached to document at the time when it is + * initialized occurs, you need to take care of firing {@link #event-ready} yourself. + * + * See also {@link #property-ready} and {@link #property-inited} properties, and + * {@link #isReady} and {@link #isInited} methods. + * + * @event ready + */ + + /** + * An event fired when a widget is about to be destroyed, but before it is + * fully torn down. + * + * @event destroy + */ + + /** + * An event fired when a widget is focused. + * + * Widget can be focused by executing {@link #method-focus}. + * + * @event focus + */ + + /** + * An event fired when a widget is blurred. + * + * @event blur + */ + + /** + * An event fired when a widget is selected. + * + * @event select + */ + + /** + * An event fired when a widget is deselected. + * + * @event deselect + */ + + /** + * An event fired by the {@link #method-edit} method. It can be canceled + * in order to stop the default action (opening a dialog window and/or + * {@link CKEDITOR.plugins.widget.repository#finalizeCreation finalizing widget creation}). + * + * @event edit + * @param data + * @param {String} data.dialog Defaults to {@link CKEDITOR.plugins.widget.definition#dialog} + * and can be changed or set by the listener. + */ + + /** + * An event fired when a dialog window for widget editing is opened. + * This event can be cancelled in order to handle the editing dialog in a custom manner. + * + * @event dialog + * @param {CKEDITOR.dialog} data The opened dialog window instance. + */ + + /** + * An event fired when a key is pressed on a focused widget. + * This event is forwarded from the {@link CKEDITOR.editor#key} event and + * has the ability to block editor keystrokes if it is cancelled. + * + * @event key + * @param data + * @param {Number} data.keyCode A number representing the key code (or combination). + */ + + /** + * An event fired when a widget is double clicked. + * + * @event doubleclick + * @param data + * @param {CKEDITOR.dom.element} data.element The double clicked element. + */ + + /** + * An event fired when the context menu is opened for a widget. + * + * @event contextMenu + * @param data The object contaning context menu options to be added + * for this widget. See {@link CKEDITOR.plugins.contextMenu#addListener}. + */ + + /** + * An event fired when the widget data changed. See the {@link #setData} method and the {@link #property-data} property. + * + * @event data + */ + + + + /** + * The wrapper class for editable elements inside widgets. + * + * Do not use directly. Use {@link CKEDITOR.plugins.widget.definition#editables} or + * {@link CKEDITOR.plugins.widget#initEditable}. + * + * @class CKEDITOR.plugins.widget.nestedEditable + * @extends CKEDITOR.dom.element + * @constructor + * @param {CKEDITOR.editor} editor + * @param {CKEDITOR.dom.element} element + * @param config + * @param {CKEDITOR.filter} [config.filter] + */ + function NestedEditable( editor, element, config ) { + // Call the base constructor. + CKEDITOR.dom.element.call( this, element.$ ); + this.editor = editor; + var filter = this.filter = config.filter; + + // If blockless editable - always use BR mode. + if ( !CKEDITOR.dtd[ this.getName() ].p ) + this.enterMode = this.shiftEnterMode = CKEDITOR.ENTER_BR; + else { + this.enterMode = filter ? filter.getAllowedEnterMode( editor.enterMode ) : editor.enterMode; + this.shiftEnterMode = filter ? filter.getAllowedEnterMode( editor.shiftEnterMode, true ) : editor.shiftEnterMode; + } + } + + NestedEditable.prototype = CKEDITOR.tools.extend( CKEDITOR.tools.prototypedCopy( CKEDITOR.dom.element.prototype ), { + /** + * Sets the editable data. The data will be passed through the {@link CKEDITOR.editor#dataProcessor} + * and the {@link CKEDITOR.editor#filter}. This ensures that the data was filtered and prepared to be + * edited like the {@link CKEDITOR.editor#method-setData editor data}. + * + * @param {String} data + */ + setData: function( data ) { + data = this.editor.dataProcessor.toHtml( data, { + context: this.getName(), + filter: this.filter, + enterMode: this.enterMode + } ); + this.setHtml( data ); + }, + + /** + * Gets the editable data. Like {@link #setData}, this method will process and filter the data. + * + * @returns {String} + */ + getData: function() { + return this.editor.dataProcessor.toDataFormat( this.getHtml(), { + context: this.getName(), + filter: this.filter, + enterMode: this.enterMode + } ); + } + } ); + + /** + * The editor instance. + * + * @readonly + * @property {CKEDITOR.editor} editor + */ + + /** + * The filter instance if allowed content rules were defined. + * + * @readonly + * @property {CKEDITOR.filter} filter + */ + + /** + * The enter mode active in this editable. + * It is determined from editable's name (whether it is a blockless editable), + * its allowed content rules (if defined) and the default editor's mode. + * + * @readonly + * @property {Number} enterMode + */ + + /** + * The shift enter move active in this editable. + * + * @readonly + * @property {Number} shiftEnterMode + */ + + + // + // REPOSITORY helpers ----------------------------------------------------- + // + + function addWidgetButtons( editor ) { + var widgets = editor.widgets.registered, + widget, + widgetName, + widgetButton; + + for ( widgetName in widgets ) { + widget = widgets[ widgetName ]; + + // Create button if defined. + widgetButton = widget.button; + if ( widgetButton && editor.ui.addButton ) { + editor.ui.addButton( CKEDITOR.tools.capitalize( widget.name, true ), { + label: widgetButton, + command: widget.name, + toolbar: 'insert,10' + } ); + } + } + } + + // Create a command creating and editing widget. + // + // @param editor + // @param {CKEDITOR.plugins.widget.definition} widgetDef + function addWidgetCommand( editor, widgetDef ) { + editor.addCommand( widgetDef.name, { + exec: function() { + var focused = editor.widgets.focused; + // If a widget of the same type is focused, start editing. + if ( focused && focused.name == widgetDef.name ) + focused.edit(); + // Otherwise... + // ... use insert method is was defined. + else if ( widgetDef.insert ) + widgetDef.insert(); + // ... or create a brand-new widget from template. + else if ( widgetDef.template ) { + var defaults = typeof widgetDef.defaults == 'function' ? widgetDef.defaults() : widgetDef.defaults, + element = CKEDITOR.dom.element.createFromHtml( widgetDef.template.output( defaults ) ), + instance, + wrapper = editor.widgets.wrapElement( element, widgetDef.name ), + temp = new CKEDITOR.dom.documentFragment( wrapper.getDocument() ); + + // Append wrapper to a temporary document. This will unify the environment + // in which #data listeners work when creating and editing widget. + temp.append( wrapper ); + instance = editor.widgets.initOn( element, widgetDef ); + + // Instance could be destroyed during initialization. + // In this case finalize creation if some new widget + // was left in temporary document fragment. + if ( !instance ) { + finalizeCreation(); + return; + } + + // Listen on edit to finalize widget insertion. + // + // * If dialog was set, then insert widget after dialog was successfully saved or destroy this + // temporary instance. + // * If dialog wasn't set and edit wasn't canceled, insert widget. + var editListener = instance.once( 'edit', function( evt ) { + if ( evt.data.dialog ) { + instance.once( 'dialog', function( evt ) { + var dialog = evt.data, + okListener, + cancelListener; + + // Finalize creation AFTER (20) new data was set. + okListener = dialog.once( 'ok', finalizeCreation, null, null, 20 ); + + cancelListener = dialog.once( 'cancel', function() { + editor.widgets.destroy( instance, true ); + } ); + + dialog.once( 'hide', function() { + okListener.removeListener(); + cancelListener.removeListener(); + } ); + } ); + } + // Dialog hasn't been set, so insert widget now. + else + finalizeCreation(); + }, null, null, 999 ); + + instance.edit(); + + // Remove listener in case someone canceled it before this + // listener was executed. + editListener.removeListener(); + } + + function finalizeCreation() { + editor.widgets.finalizeCreation( temp ); + } + }, + + refresh: function( editor, path ) { + // Disable widgets' commands inside nested editables - + // check if blockLimit is a nested editable or a descendant of any. + this.setState( getNestedEditable( editor.editable(), path.blockLimit ) ? CKEDITOR.TRISTATE_DISABLED : CKEDITOR.TRISTATE_OFF ); + }, + // A hack to force command refreshing on context change. + context: 'div', + + allowedContent: widgetDef.allowedContent, + requiredContent: widgetDef.requiredContent, + contentForms: widgetDef.contentForms, + contentTransformations: widgetDef.contentTransformations + } ); + } + + function addWidgetProcessors( widgetsRepo, widgetDef ) { + var upcast = widgetDef.upcast, + upcasts; + + if ( !upcast ) + return; + + // Multiple upcasts defined in string. + if ( typeof upcast == 'string' ) { + upcasts = upcast.split( ',' ); + while ( upcasts.length ) + widgetsRepo._.upcasts.push( [ widgetDef.upcasts[ upcasts.pop() ], widgetDef.name ] ); + } + // Single rule which is automatically activated. + else + widgetsRepo._.upcasts.push( [ upcast, widgetDef.name ] ); + } + + function blurWidget( widgetsRepo, widget ) { + widgetsRepo.focused = null; + + if ( widget.isInited() ) { + // Widget could be destroyed in the meantime - e.g. data could be set. + widgetsRepo.fire( 'widgetBlurred', { widget: widget } ); + widget.setFocused( false ); + } + } + + function checkWidgets( evt ) { + var options = evt.data; + + if ( this.editor.mode != 'wysiwyg' ) + return; + + var editable = this.editor.editable(), + instances = this.instances, + newInstances, i, count, wrapper; + + if ( !editable ) + return; + + // Remove widgets which have no corresponding elements in DOM. + for ( i in instances ) { + if ( !editable.contains( instances[ i ].wrapper ) ) + this.destroy( instances[ i ], true ); + } + + // Init on all (new) if initOnlyNew option was passed. + if ( options && options.initOnlyNew ) + newInstances = this.initOnAll(); + else { + var wrappers = editable.find( '.cke_widget_wrapper' ); + newInstances = []; + + // Create widgets on existing wrappers if they do not exists. + for ( i = 0, count = wrappers.count(); i < count; i++ ) { + wrapper = wrappers.getItem( i ); + + // Check if there's no instance for this widget and that + // wrapper is not inside some temporary element like copybin (#11088). + if ( !this.getByElement( wrapper, true ) && !findParent( wrapper, isDomTemp ) ) { + // Add cke_widget_new class because otherwise + // widget will not be created on such wrapper. + wrapper.addClass( 'cke_widget_new' ); + newInstances.push( this.initOn( wrapper.getFirst( isDomWidgetElement ) ) ); + } + } + } + + // If only single widget was initialized and focusInited was passed, focus it. + if ( options && options.focusInited && newInstances.length == 1 ) + newInstances[ 0 ].focus(); + } + + // Unwraps widget element and clean up element. + // + // This function is used to clean up pasted widgets. + // It should have similar result to widget#destroy plus + // some additional adjustments, specific for pasting. + // + // @param {CKEDITOR.htmlParser.element} el + function cleanUpWidgetElement( el ) { + var parent = el.parent; + if ( parent.type == CKEDITOR.NODE_ELEMENT && parent.attributes[ 'data-cke-widget-wrapper' ] ) + parent.replaceWith( el ); + } + + // Similar to cleanUpWidgetElement, but works on DOM and finds + // widget elements by its own. + // + // Unlike cleanUpWidgetElement it will wrap element back. + // + // @param {CKEDITOR.dom.element} container + function cleanUpAllWidgetElements( widgetsRepo, container ) { + var wrappers = container.find( '.cke_widget_wrapper' ), + wrapper, element, + i = 0, + l = wrappers.count(); + + for ( ; i < l; ++i ) { + wrapper = wrappers.getItem( i ); + element = wrapper.getFirst( isDomWidgetElement ); + // If wrapper contains widget element - unwrap it and wrap again. + if ( element.type == CKEDITOR.NODE_ELEMENT && element.data( 'widget' ) ) { + element.replace( wrapper ); + widgetsRepo.wrapElement( element ); + } + // Otherwise - something is wrong... clean this up. + else + wrapper.remove(); + } + } + + // Creates {@link CKEDITOR.filter} instance for given widget, editable and rules. + // + // Once filter for widget-editable pair is created it is cached, so the same instance + // will be returned when method is executed again. + // + // @param {String} widgetName + // @param {String} editableName + // @param {CKEDITOR.plugins.widget.nestedEditableDefinition} editableDefinition The nested editable definition. + // @returns {CKEDITOR.filter} Filter instance or `null` if rules are not defined. + // @context CKEDITOR.plugins.widget.repository + function createEditableFilter( widgetName, editableName, editableDefinition ) { + if ( !editableDefinition.allowedContent ) + return null; + + var editables = this._.filters[ widgetName ]; + + if ( !editables ) + this._.filters[ widgetName ] = editables = {}; + + var filter = editables[ editableName ]; + + if ( !filter ) + editables[ editableName ] = filter = new CKEDITOR.filter( editableDefinition.allowedContent ); + + return filter; + } + + // Creates an iterator function which when executed on all + // elements in DOM tree will gather elements that should be wrapped + // and initialized as widgets. + function createUpcastIterator( widgetsRepo ) { + var toBeWrapped = [], + upcasts = widgetsRepo._.upcasts, + upcastCallbacks = widgetsRepo._.upcastCallbacks; + + return { + toBeWrapped: toBeWrapped, + + iterator: function( element ) { + var upcast, upcasted, + data, + i, + upcastsLength, + upcastCallbacksLength; + + // Wrapper found - find widget element, add it to be + // cleaned up (unwrapped) and wrapped and stop iterating in this branch. + if ( 'data-cke-widget-wrapper' in element.attributes ) { + element = element.getFirst( isParserWidgetElement ); + + if ( element ) + toBeWrapped.push( [ element ] ); + + // Do not iterate over descendants. + return false; + } + // Widget element found - add it to be cleaned up (just in case) + // and wrapped and stop iterating in this branch. + else if ( 'data-widget' in element.attributes ) { + toBeWrapped.push( [ element ] ); + + // Do not iterate over descendants. + return false; + } + else if ( ( upcastsLength = upcasts.length ) ) { + // Ignore elements with data-cke-widget-upcasted to avoid multiple upcasts (#11533). + // Do not iterate over descendants. + if ( element.attributes[ 'data-cke-widget-upcasted' ] ) + return false; + + // Check element with upcast callbacks first. + // If any of them return false abort upcasting. + for ( i = 0, upcastCallbacksLength = upcastCallbacks.length; i < upcastCallbacksLength; ++i ) { + if ( upcastCallbacks[ i ]( element ) === false ) + return; + // Return nothing in order to continue iterating over ascendants. + // See http://dev.ckeditor.com/ticket/11186#comment:6 + } + + for ( i = 0; i < upcastsLength; ++i ) { + upcast = upcasts[ i ]; + data = {}; + + if ( ( upcasted = upcast[ 0 ]( element, data ) ) ) { + // If upcast function returned element, upcast this one. + // It can be e.g. a new element wrapping the original one. + if ( upcasted instanceof CKEDITOR.htmlParser.element ) + element = upcasted; + + // Set initial data attr with data from upcast method. + element.attributes[ 'data-cke-widget-data' ] = JSON.stringify( data ); + element.attributes[ 'data-cke-widget-upcasted' ] = 1; + + toBeWrapped.push( [ element, upcast[ 1 ] ] ); + + // Do not iterate over descendants. + return false; + } + } + } + } + }; + } + + // Finds a first parent that matches query. + // + // @param {CKEDITOR.dom.element} element + // @param {Function} query + function findParent( element, query ) { + var parent = element; + + while ( ( parent = parent.getParent() ) ) { + if ( query( parent ) ) + return true; + } + return false; + } + + // Gets nested editable if node is its descendant or the editable itself. + // + // @param {CKEDITOR.dom.element} guard Stop ancestor search on this node (usually editor's editable). + // @param {CKEDITOR.dom.node} node Start search from this node. + // @returns {CKEDITOR.dom.element} Element or null. + function getNestedEditable( guard, node ) { + if ( !node || node.equals( guard ) ) + return null; + + if ( isDomNestedEditable( node ) ) + return node; + + return getNestedEditable( guard, node.getParent() ); + } + + function getWrapperAttributes( inlineWidget ) { + return { + // tabindex="-1" means that it can receive focus by code. + tabindex: -1, + contenteditable: 'false', + 'data-cke-widget-wrapper': 1, + 'data-cke-filter': 'off', + // Class cke_widget_new marks widgets which haven't been initialized yet. + 'class': 'cke_widget_wrapper cke_widget_new cke_widget_' + + ( inlineWidget ? 'inline' : 'block' ) + }; + } + + // Inserts element at given index. + // It will check DTD and split ancestor elements up to the first + // that can contain this element. + // + // @param {CKEDITOR.htmlParser.element} parent + // @param {Number} index + // @param {CKEDITOR.htmlParser.element} element + function insertElement( parent, index, element ) { + // Do not split doc fragment... + if ( parent.type == CKEDITOR.NODE_ELEMENT ) { + var parentAllows = CKEDITOR.dtd[ parent.name ]; + // Parent element is known (included in DTD) and cannot contain + // this element. + if ( parentAllows && !parentAllows[ element.name ] ) { + var parent2 = parent.split( index ), + parentParent = parent.parent; + + // Element will now be inserted at right parent's index. + index = parent2.getIndex(); + + // If left part of split is empty - remove it. + if ( !parent.children.length ) { + index -= 1; + parent.remove(); + } + + // If right part of split is empty - remove it. + if ( !parent2.children.length ) + parent2.remove(); + + // Try inserting as grandpas' children. + return insertElement( parentParent, index, element ); + } + } + + // Finally we can add this element. + parent.add( element, index ); + } + + // @param {CKEDITOR.htmlParser.element} + function isParserWidgetElement( element ) { + return element.type == CKEDITOR.NODE_ELEMENT && !!element.attributes[ 'data-widget' ]; + } + + // @param {CKEDITOR.dom.element} + function isDomWidgetElement( element ) { + return element.type == CKEDITOR.NODE_ELEMENT && element.hasAttribute( 'data-widget' ); + } + + // Whether for this definition and element widget should be created in inline or block mode. + function isWidgetInline( widgetDef, elementName ) { + return typeof widgetDef.inline == 'boolean' ? widgetDef.inline : !!CKEDITOR.dtd.$inline[ elementName ]; + } + + // @param {CKEDITOR.htmlParser.element} + function isParserWidgetWrapper( element ) { + return element.type == CKEDITOR.NODE_ELEMENT && element.attributes[ 'data-cke-widget-wrapper' ]; + } + + // @param {CKEDITOR.dom.element} + function isDomWidgetWrapper( element ) { + return element.type == CKEDITOR.NODE_ELEMENT && element.hasAttribute( 'data-cke-widget-wrapper' ); + } + + // @param {CKEDITOR.dom.element} + function isDomNestedEditable( node ) { + return node.type == CKEDITOR.NODE_ELEMENT && node.hasAttribute( 'data-cke-widget-editable' ); + } + + // @param {CKEDITOR.dom.element} + function isDomTemp( element ) { + return element.hasAttribute( 'data-cke-temp' ); + } + + // @param {CKEDITOR.dom.element} + function isDomDragHandler( element ) { + return element.type == CKEDITOR.NODE_ELEMENT && element.hasAttribute( 'data-cke-widget-drag-handler' ); + } + + function finalizeNativeDrop( editor, sourceWidget, range ) { + // Save the snapshot with the state before moving widget. + // Focus widget, so when we'll undo the DnD, widget will be focused. + sourceWidget.focus(); + editor.fire( 'saveSnapshot' ); + + // Lock snapshot to group all steps of moving widget from the original place to the new one. + editor.fire( 'lockSnapshot', { dontUpdate: true } ); + + range.select(); + + var widgetHtml = sourceWidget.wrapper.getOuterHtml(); + sourceWidget.wrapper.remove(); + editor.widgets.destroy( sourceWidget, true ); + editor.execCommand( 'paste', widgetHtml ); + + editor.fire( 'unlockSnapshot' ); + } + + function getRangeAtDropPosition( editor, dropEvt ) { + var $evt = dropEvt.data.$, + $range, + range = editor.createRange(); + + // Make testing possible. + if ( dropEvt.data.testRange ) + return dropEvt.data.testRange; + + // Webkits. + if ( document.caretRangeFromPoint ) { + $range = editor.document.$.caretRangeFromPoint( $evt.clientX, $evt.clientY ); + range.setStart( CKEDITOR.dom.node( $range.startContainer ), $range.startOffset ); + range.collapse( true ); + } + // FF. + else if ( $evt.rangeParent ) { + range.setStart( CKEDITOR.dom.node( $evt.rangeParent ), $evt.rangeOffset ); + range.collapse( true ); + } + // IEs. + else if ( document.body.createTextRange ) { + $range = editor.document.getBody().$.createTextRange(); + $range.moveToPoint( $evt.clientX, $evt.clientY ); + var id = 'cke-temp-' + ( new Date() ).getTime(); + $range.pasteHTML( '\u200b' ); + + var span = editor.document.getById( id ); + range.moveToPosition( span, CKEDITOR.POSITION_BEFORE_START ); + span.remove(); + } + else + return null; + + return range; + } + + function onEditableKey( widget, keyCode ) { + var focusedEditable = widget.focusedEditable, + range; + + // CTRL+A. + if ( keyCode == CKEDITOR.CTRL + 65 ) { + var bogus = focusedEditable.getBogus(); + + range = widget.editor.createRange(); + range.selectNodeContents( focusedEditable ); + // Exclude bogus if exists. + if ( bogus ) + range.setEndAt( bogus, CKEDITOR.POSITION_BEFORE_START ); + + range.select(); + // Cancel event - block default. + return false; + } + // DEL or BACKSPACE. + else if ( keyCode == 8 || keyCode == 46 ) { + var ranges = widget.editor.getSelection().getRanges(); + + range = ranges[ 0 ]; + + // Block del or backspace if at editable's boundary. + return !( ranges.length == 1 && range.collapsed && + range.checkBoundaryOfElement( focusedEditable, CKEDITOR[ keyCode == 8 ? 'START' : 'END' ] ) ); + } + } + + function setFocusedEditable( widgetsRepo, widget, editableElement, offline ) { + var editor = widgetsRepo.editor; + + editor.fire( 'lockSnapshot' ); + + if ( editableElement ) { + var editableName = editableElement.data( 'cke-widget-editable' ), + editableInstance = widget.editables[ editableName ]; + + widgetsRepo.widgetHoldingFocusedEditable = widget; + widget.focusedEditable = editableInstance; + editableElement.addClass( 'cke_widget_editable_focused' ); + + if ( editableInstance.filter ) + editor.setActiveFilter( editableInstance.filter ); + editor.setActiveEnterMode( editableInstance.enterMode, editableInstance.shiftEnterMode ); + } else { + if ( !offline ) + widget.focusedEditable.removeClass( 'cke_widget_editable_focused' ); + + widget.focusedEditable = null; + widgetsRepo.widgetHoldingFocusedEditable = null; + editor.setActiveFilter( null ); + editor.setActiveEnterMode( null, null ); + } + + editor.fire( 'unlockSnapshot' ); + } + + function setupContextMenu( editor ) { + if ( !editor.contextMenu ) + return; + + editor.contextMenu.addListener( function( element ) { + var widget = editor.widgets.getByElement( element, true ); + + if ( widget ) + return widget.fire( 'contextMenu', {} ); + } ); + } + + // And now we've got two problems - original problem and RegExp. + // Some softeners: + // * FF tends to copy all blocks up to the copybin container. + // * IE tends to copy only the copybin, without its container. + // * We use spans on IE and blockless editors, but divs in other cases. + var pasteReplaceRegex = new RegExp( + '^' + + '(?:<(?:div|span)(?: data-cke-temp="1")?(?: id="cke_copybin")?(?: data-cke-temp="1")?>)?' + + '(?:<(?:div|span)(?: style="[^"]+")?>)?' + + ']*data-cke-copybin-start="1"[^>]*>.?([\\s\\S]+)]*data-cke-copybin-end="1"[^>]*>.?' + + '(?:)?' + + '(?:)?' + + '$' + ); + + function pasteReplaceFn( match, wrapperHtml ) { + // Avoid polluting pasted data with any whitspaces, + // what's going to break check whether only one widget was pasted. + return CKEDITOR.tools.trim( wrapperHtml ); + } + + function setupDragAndDrop( widgetsRepo ) { + var editor = widgetsRepo.editor, + lineutils = CKEDITOR.plugins.lineutils; + + editor.on( 'contentDom', function() { + var editable = editor.editable(), + // #11123 Firefox needs to listen on document, because otherwise event won't be fired. + // #11086 IE8 cannot listen on document. + dropTarget = ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 ) || editable.isInline() ? editable : editor.document; + + editable.attachListener( dropTarget, 'drop', function( evt ) { + var dataStr = evt.data.$.dataTransfer.getData( 'text' ), + dataObj, + sourceWidget, + range; + + if ( !dataStr ) + return; + + try { + dataObj = JSON.parse( dataStr ); + } catch ( e ) { + // Do nothing - data couldn't be parsed so it's not a CKEditor's data. + return; + } + + if ( dataObj.type != 'cke-widget' ) + return; + + evt.data.preventDefault(); + + // Something went wrong... maybe someone is dragging widgets between editors/windows/tabs/browsers/frames. + if ( dataObj.editor != editor.name || !( sourceWidget = widgetsRepo.instances[ dataObj.id ] ) ) + return; + + // Try to determine a DOM position at which drop happened. If none of methods + // which we support succeeded abort. + range = getRangeAtDropPosition( editor, evt ); + if ( !range ) + return; + + // #11132 Hack to prevent cursor loss on Firefox. Without timeout widget is + // correctly pasted but then cursor is invisible (although it works) and can be restored + // only by blurring editable. + if ( CKEDITOR.env.gecko ) + setTimeout( finalizeNativeDrop, 0, editor, sourceWidget, range ); + else + finalizeNativeDrop( editor, sourceWidget, range ); + } ); + + // Register Lineutils's utilities as properties of repo. + CKEDITOR.tools.extend( widgetsRepo, { + finder: new lineutils.finder( editor, { + lookups: { + // Element is block but not list item and not in nested editable. + 'default': function( el ) { + if ( el.is( CKEDITOR.dtd.$listItem ) ) + return; + + if ( !el.is( CKEDITOR.dtd.$block ) ) + return; + + while ( el ) { + if ( isDomNestedEditable( el ) ) + return; + + el = el.getParent(); + } + + return CKEDITOR.LINEUTILS_BEFORE | CKEDITOR.LINEUTILS_AFTER; + } + } + } ), + locator: new lineutils.locator( editor ), + liner: new lineutils.liner( editor, { + lineStyle: { + cursor: 'move !important', + 'border-top-color': '#666' + }, + tipLeftStyle: { + 'border-left-color': '#666' + }, + tipRightStyle: { + 'border-right-color': '#666' + } + } ) + }, true ); + } ); + } + + // Setup mouse observer which will trigger: + // * widget focus on widget click, + // * widget#doubleclick forwarded from editor#doubleclick. + function setupMouseObserver( widgetsRepo ) { + var editor = widgetsRepo.editor; + + editor.on( 'contentDom', function() { + var editable = editor.editable(), + evtRoot = editable.isInline() ? editable : editor.document, + widget, + mouseDownOnDragHandler; + + editable.attachListener( evtRoot, 'mousedown', function( evt ) { + var target = evt.data.getTarget(); + + // #10887 Clicking scrollbar in IE8 will invoke event with empty target object. + if ( !target.type ) + return false; + + widget = widgetsRepo.getByElement( target ); + mouseDownOnDragHandler = 0; // Reset. + + // Widget was clicked, but not editable nested in it. + if ( widget ) { + // Ignore mousedown on drag and drop handler if the widget is inline. + // Block widgets are handled by Lineutils. + if ( widget.inline && target.type == CKEDITOR.NODE_ELEMENT && target.hasAttribute( 'data-cke-widget-drag-handler' ) ) { + mouseDownOnDragHandler = 1; + return; + } + + if ( !getNestedEditable( widget.wrapper, target ) ) { + evt.data.preventDefault(); + if ( !CKEDITOR.env.ie ) + widget.focus(); + } + // Reset widget so mouseup listener is not confused. + else + widget = null; + } + } ); + + // Focus widget on mouseup if mousedown was fired on drag handler. + // Note: mouseup won't be fired at all if widget was dragged and dropped, so + // this code will be executed only when drag handler was clicked. + editable.attachListener( evtRoot, 'mouseup', function() { + if ( widget && mouseDownOnDragHandler ) { + mouseDownOnDragHandler = 0; + widget.focus(); + } + } ); + + // On IE it is not enough to block mousedown. If widget wrapper (element with + // contenteditable=false attribute) is clicked directly (it is a target), + // then after mouseup/click IE will select that element. + // It is not possible to prevent that default action, + // so we force fake selection after everything happened. + if ( CKEDITOR.env.ie ) { + editable.attachListener( evtRoot, 'mouseup', function( evt ) { + if ( widget ) { + setTimeout( function() { + widget.focus(); + widget = null; + } ); + } + } ); + } + } ); + + editor.on( 'doubleclick', function( evt ) { + var widget = widgetsRepo.getByElement( evt.data.element ); + + // Not in widget or in nested editable. + if ( !widget || getNestedEditable( widget.wrapper, evt.data.element ) ) + return; + + return widget.fire( 'doubleclick', { element: evt.data.element } ); + }, null, null, 1 ); + } + + // Setup editor#key observer which will forward it + // to focused widget. + function setupKeyboardObserver( widgetsRepo ) { + var editor = widgetsRepo.editor; + + editor.on( 'key', function( evt ) { + var focused = widgetsRepo.focused, + widgetHoldingFocusedEditable = widgetsRepo.widgetHoldingFocusedEditable, + ret; + + if ( focused ) + ret = focused.fire( 'key', { keyCode: evt.data.keyCode } ); + else if ( widgetHoldingFocusedEditable ) + ret = onEditableKey( widgetHoldingFocusedEditable, evt.data.keyCode ); + + return ret; + }, null, null, 1 ); + } + + // Setup copybin on native copy and cut events in order to handle copy and cut commands + // if user accepted security alert on IEs. + // Note: when copying or cutting using keystroke, copySingleWidget will be first executed + // by the keydown listener. Conflict between two calls will be resolved by copy_bin existence check. + function setupNativeCutAndCopy( widgetsRepo ) { + var editor = widgetsRepo.editor; + + editor.on( 'contentDom', function() { + var editable = editor.editable(); + + editable.attachListener( editable, 'copy', eventListener ); + editable.attachListener( editable, 'cut', eventListener ); + } ); + + function eventListener( evt ) { + if ( widgetsRepo.focused ) + copySingleWidget( widgetsRepo.focused, evt.name == 'cut' ); + } + } + + // Setup selection observer which will trigger: + // * widget select & focus on selection change, + // * nested editable focus (related properites and classes) on selection change, + // * deselecting and blurring all widgets on data, + // * blurring widget on editor blur. + function setupSelectionObserver( widgetsRepo ) { + var editor = widgetsRepo.editor; + + editor.on( 'selectionCheck', function() { + widgetsRepo.fire( 'checkSelection' ); + } ); + + widgetsRepo.on( 'checkSelection', widgetsRepo.checkSelection, widgetsRepo ); + + editor.on( 'selectionChange', function( evt ) { + var nestedEditable = getNestedEditable( editor.editable(), evt.data.selection.getStartElement() ), + newWidget = nestedEditable && widgetsRepo.getByElement( nestedEditable ), + oldWidget = widgetsRepo.widgetHoldingFocusedEditable; + + if ( oldWidget ) { + if ( oldWidget !== newWidget || !oldWidget.focusedEditable.equals( nestedEditable ) ) { + setFocusedEditable( widgetsRepo, oldWidget, null ); + + if ( newWidget && nestedEditable ) + setFocusedEditable( widgetsRepo, newWidget, nestedEditable ); + } + } + // It may happen that there's no widget even if editable was found - + // e.g. if selection was automatically set in editable although widget wasn't initialized yet. + else if ( newWidget && nestedEditable ) + setFocusedEditable( widgetsRepo, newWidget, nestedEditable ); + } ); + + // Invalidate old widgets early - immediately on dataReady. + editor.on( 'dataReady', function( evt ) { + // Deselect and blur all widgets. + stateUpdater( widgetsRepo ).commit(); + } ); + + editor.on( 'blur', function() { + var widget; + + if ( ( widget = widgetsRepo.focused ) ) + blurWidget( widgetsRepo, widget ); + + if ( ( widget = widgetsRepo.widgetHoldingFocusedEditable ) ) + setFocusedEditable( widgetsRepo, widget, null ); + } ); + } + + // Set up actions like: + // * processing in toHtml/toDataFormat, + // * pasting handling, + // * insertion handling, + // * editable reload handling (setData, mode switch, undo/redo), + // * DOM invalidation handling, + // * widgets checks. + function setupWidgetsLifecycle( widgetsRepo ) { + setupWidgetsLifecycleStart( widgetsRepo ); + setupWidgetsLifecycleEnd( widgetsRepo ); + + widgetsRepo.on( 'checkWidgets', checkWidgets ); + widgetsRepo.editor.on( 'contentDomInvalidated', widgetsRepo.checkWidgets, widgetsRepo ); + } + + function setupWidgetsLifecycleEnd( widgetsRepo ) { + var editor = widgetsRepo.editor, + downcastingSessions = {}, + nestedEditableScope = false; + + // Listen before htmlDP#htmlFilter is applied to cache all widgets, because we'll + // loose data-cke-* attributes. + editor.on( 'toDataFormat', function( evt ) { + // To avoid conflicts between htmlDP#toDF calls done at the same time + // (e.g. nestedEditable#getData called during downcasting some widget) + // mark every toDataFormat event chain with the downcasting session id. + var id = CKEDITOR.tools.getNextNumber(), + toBeDowncasted = []; + evt.data.downcastingSessionId = id; + downcastingSessions[ id ] = toBeDowncasted; + + evt.data.dataValue.forEach( function( element ) { + var attrs = element.attributes, + widget, widgetElement; + + // Wrapper. + // Perform first part of downcasting (cleanup) and cache widgets, + // because after applying DP's filter all data-cke-* attributes will be gone. + if ( 'data-cke-widget-id' in attrs ) { + widget = widgetsRepo.instances[ attrs[ 'data-cke-widget-id' ] ]; + if ( widget ) { + widgetElement = element.getFirst( isParserWidgetElement ); + toBeDowncasted.push( { + wrapper: element, + element: widgetElement, + widget: widget, + editables: {} + } ); + + // If widget did not have data-cke-widget attribute before upcasting remove it. + if ( widgetElement.attributes[ 'data-cke-widget-keep-attr' ] != '1' ) + delete widgetElement.attributes[ 'data-widget' ]; + } + } + // Nested editable. + else if ( 'data-cke-widget-editable' in attrs ) { + // Save the reference to this nested editable in the closest widget to be downcasted. + // Nested editables are downcasted in the successive toDataFormat to create an opportunity + // for dataFilter's "excludeNestedEditable" option to do its job (that option relies on + // contenteditable="true" attribute) (#11372). + toBeDowncasted[ toBeDowncasted.length - 1 ].editables[ attrs[ 'data-cke-widget-editable' ] ] = element; + + // Don't check children - there won't be next wrapper or nested editable which we + // should process in this session. + return false; + } + }, CKEDITOR.NODE_ELEMENT, true ); + }, null, null, 8 ); + + // Listen after dataProcessor.htmlFilter and ACF were applied + // so wrappers securing widgets' contents are removed after all filtering was done. + editor.on( 'toDataFormat', function( evt ) { + // Ignore some unmarked sessions. + if ( !evt.data.downcastingSessionId ) + return; + + var toBeDowncasted = downcastingSessions[ evt.data.downcastingSessionId ], + toBe, widget, widgetElement, retElement, editableElement, e; + + while ( ( toBe = toBeDowncasted.shift() ) ) { + widget = toBe.widget; + widgetElement = toBe.element; + retElement = widget._.downcastFn && widget._.downcastFn.call( widget, widgetElement ); + + // Replace nested editables' content with their output data. + for ( e in toBe.editables ) { + editableElement = toBe.editables[ e ]; + + delete editableElement.attributes[ 'contenteditable' ]; + editableElement.setHtml( widget.editables[ e ].getData() ); + } + + // Returned element always defaults to widgetElement. + if ( !retElement ) + retElement = widgetElement; + + toBe.wrapper.replaceWith( retElement ); + } + }, null, null, 13 ); + + + editor.on( 'contentDomUnload', function() { + widgetsRepo.destroyAll( true ); + } ); + } + + function setupWidgetsLifecycleStart( widgetsRepo ) { + var editor = widgetsRepo.editor, + processedWidgetOnly, + snapshotLoaded; + + // Listen after ACF (so data are filtered), + // but before dataProcessor.dataFilter was applied (so we can secure widgets' internals). + editor.on( 'toHtml', function( evt ) { + var upcastIterator = createUpcastIterator( widgetsRepo ), + toBeWrapped; + + evt.data.dataValue.forEach( upcastIterator.iterator, CKEDITOR.NODE_ELEMENT, true ); + + // Clean up and wrap all queued elements. + while ( ( toBeWrapped = upcastIterator.toBeWrapped.pop() ) ) { + cleanUpWidgetElement( toBeWrapped[ 0 ] ); + widgetsRepo.wrapElement( toBeWrapped[ 0 ], toBeWrapped[ 1 ] ); + } + + // Used to determine whether only widget was pasted. + processedWidgetOnly = evt.data.dataValue.children.length == 1 && + isParserWidgetWrapper( evt.data.dataValue.children[ 0 ] ); + }, null, null, 8 ); + + editor.on( 'dataReady', function() { + // Clean up all widgets loaded from snapshot. + if ( snapshotLoaded ) + cleanUpAllWidgetElements( widgetsRepo, editor.editable() ); + snapshotLoaded = 0; + + // Some widgets were destroyed on contentDomUnload, + // some on loadSnapshot, but that does not include + // e.g. setHtml on inline editor or widgets removed just + // before setting data. + widgetsRepo.destroyAll( true ); + widgetsRepo.initOnAll(); + } ); + + // Set flag so dataReady will know that additional + // cleanup is needed, because snapshot containing widgets was loaded. + editor.on( 'loadSnapshot', function( evt ) { + // Primitive but sufficient check which will prevent from executing + // heavier cleanUpAllWidgetElements if not needed. + if ( ( /data-cke-widget/ ).test( evt.data ) ) + snapshotLoaded = 1; + + widgetsRepo.destroyAll( true ); + }, null, null, 9 ); + + // Handle pasted single widget. + editor.on( 'paste', function( evt ) { + evt.data.dataValue = evt.data.dataValue.replace( pasteReplaceRegex, pasteReplaceFn ); + } ); + + // Listen with high priority to check widgets after data was inserted. + editor.on( 'insertText', checkNewWidgets, null, null, 999 ); + editor.on( 'insertHtml', checkNewWidgets, null, null, 999 ); + + function checkNewWidgets() { + editor.fire( 'lockSnapshot' ); + + // Init only new for performance reason. + // Focus inited if only widget was processed. + widgetsRepo.checkWidgets( { initOnlyNew: true, focusInited: processedWidgetOnly } ); + + editor.fire( 'unlockSnapshot' ); + } + } + + // Helper for coordinating which widgets should be + // selected/deselected and which one should be focused/blurred. + function stateUpdater( widgetsRepo ) { + var currentlySelected = widgetsRepo.selected, + toBeSelected = [], + toBeDeselected = currentlySelected.slice( 0 ), + focused = null; + + return { + select: function( widget ) { + if ( CKEDITOR.tools.indexOf( currentlySelected, widget ) < 0 ) + toBeSelected.push( widget ); + + var index = CKEDITOR.tools.indexOf( toBeDeselected, widget ); + if ( index >= 0 ) + toBeDeselected.splice( index, 1 ); + + return this; + }, + + focus: function( widget ) { + focused = widget; + return this; + }, + + commit: function() { + var focusedChanged = widgetsRepo.focused !== focused, + widget; + + widgetsRepo.editor.fire( 'lockSnapshot' ); + + if ( focusedChanged && ( widget = widgetsRepo.focused ) ) + blurWidget( widgetsRepo, widget ); + + while ( ( widget = toBeDeselected.pop() ) ) { + currentlySelected.splice( CKEDITOR.tools.indexOf( currentlySelected, widget ), 1 ); + // Widget could be destroyed in the meantime - e.g. data could be set. + if ( widget.isInited() ) + widget.setSelected( false ); + } + + if ( focusedChanged && focused ) { + widgetsRepo.focused = focused; + widgetsRepo.fire( 'widgetFocused', { widget: focused } ); + focused.setFocused( true ); + } + + while ( ( widget = toBeSelected.pop() ) ) { + currentlySelected.push( widget ); + widget.setSelected( true ); + } + + widgetsRepo.editor.fire( 'unlockSnapshot' ); + } + }; + } + + + // + // WIDGET helpers --------------------------------------------------------- + // + + var transparentImageData = 'data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw%3D%3D', + // LEFT, RIGHT, UP, DOWN, DEL, BACKSPACE - unblock default fake sel handlers. + keystrokesNotBlockedByWidget = { 37: 1, 38: 1, 39: 1, 40: 1, 8: 1, 46: 1 }; + + function cancel( evt ) { + evt.cancel(); + } + + function copySingleWidget( widget, isCut ) { + var editor = widget.editor, + doc = editor.document; + + // We're still handling previous copy/cut. + // When keystroke is used to copy/cut this will also prevent + // conflict with copySingleWidget called again for native copy/cut event. + if ( doc.getById( 'cke_copybin' ) ) + return; + + // [IE] Use span for copybin and its container to avoid bug with expanding editable height by + // absolutely positioned element. + var copybinName = ( editor.blockless || CKEDITOR.env.ie ) ? 'span' : 'div', + copybin = doc.createElement( copybinName ), + copybinContainer = doc.createElement( copybinName ), + // IE8 always jumps to the end of document. + needsScrollHack = CKEDITOR.env.ie && CKEDITOR.env.version < 9; + + copybinContainer.setAttributes( { + id: 'cke_copybin', + 'data-cke-temp': '1' + } ); + + // Position copybin element outside current viewport. + copybin.setStyles( { + position: 'absolute', + width: '1px', + height: '1px', + overflow: 'hidden' + } ); + + copybin.setStyle( editor.config.contentsLangDirection == 'ltr' ? 'left' : 'right', '-5000px' ); + + copybin.setHtml( '\u200b' + widget.wrapper.getOuterHtml() + '\u200b' ); + + // Save snapshot with the current state. + editor.fire( 'saveSnapshot' ); + + // Ignore copybin. + editor.fire( 'lockSnapshot' ); + + copybinContainer.append( copybin ); + editor.editable().append( copybinContainer ); + + var listener1 = editor.on( 'selectionChange', cancel, null, null, 0 ), + listener2 = widget.repository.on( 'checkSelection', cancel, null, null, 0 ); + + if ( needsScrollHack ) { + var docElement = doc.getDocumentElement().$, + scrollTop = docElement.scrollTop; + } + + // Once the clone of the widget is inside of copybin, select + // the entire contents. This selection will be copied by the + // native browser's clipboard system. + var range = editor.createRange(); + range.selectNodeContents( copybin ); + range.select(); + + if ( needsScrollHack ) + docElement.scrollTop = scrollTop; + + setTimeout( function() { + // [IE] Focus widget before removing copybin to avoid scroll jump. + if ( !isCut ) + widget.focus(); + + copybinContainer.remove(); + + listener1.removeListener(); + listener2.removeListener(); + + editor.fire( 'unlockSnapshot' ); + + if ( isCut ) { + widget.repository.del( widget ); + editor.fire( 'saveSnapshot' ); + } + }, 100 ); // Use 100ms, so Chrome (@Mac) will be able to grab the content. + } + + // [IE] Force keeping focus because IE sometimes forgets to fire focus on main editable + // when blurring nested editable. + // @context widget + function onEditableBlur() { + var active = CKEDITOR.document.getActive(), + editor = this.editor, + editable = editor.editable(); + + // If focus stays within editor override blur and set currentActive because it should be + // automatically changed to editable on editable#focus but it is not fired. + if ( ( editable.isInline() ? editable : editor.document.getWindow().getFrame() ).equals( active ) ) + editor.focusManager.focus( editable ); + } + + // Force selectionChange when editable was focused. + // Similar to hack in selection.js#~620. + // @context widget + function onEditableFocus() { + // Gecko does not support 'DOMFocusIn' event on which we unlock selection + // in selection.js to prevent selection locking when entering nested editables. + if ( CKEDITOR.env.gecko ) + this.editor.unlockSelection(); + + // We don't need to force selectionCheck on Webkit, because on Webkit + // we do that on DOMFocusIn in selection.js. + if ( !CKEDITOR.env.webkit ) { + this.editor.forceNextSelectionCheck(); + this.editor.selectionChange( 1 ); + } + } + + function setupDragHandler( widget ) { + if ( !widget.draggable ) + return; + + var editor = widget.editor, + container = widget.wrapper.findOne( '.cke_widget_drag_handler_container' ), + img; + + // Reuse drag handler if already exists (#11281). + if ( container ) + img = container.findOne( 'img' ); + else { + container = new CKEDITOR.dom.element( 'span', editor.document ); + container.setAttributes( { + 'class': 'cke_reset cke_widget_drag_handler_container', + // Split background and background-image for IE8 which will break on rgba(). + style: 'background:rgba(220,220,220,0.5);background-image:url(' + editor.plugins.widget.path + 'images/handle.png)' + } ); + + img = new CKEDITOR.dom.element( 'img', editor.document ); + img.setAttributes( { + 'class': 'cke_reset cke_widget_drag_handler', + 'data-cke-widget-drag-handler': '1', + src: transparentImageData, + width: DRAG_HANDLER_SIZE, + title: editor.lang.widget.move, + height: DRAG_HANDLER_SIZE + } ); + widget.inline && img.setAttribute( 'draggable', 'true' ); + + container.append( img ); + widget.wrapper.append( container ); + } + + widget.wrapper.on( 'mouseenter', widget.updateDragHandlerPosition, widget ); + setTimeout( function() { + widget.on( 'data', widget.updateDragHandlerPosition, widget ); + }, 50 ); + + if ( widget.inline ) { + img.on( 'dragstart', function( evt ) { + evt.data.$.dataTransfer.setData( 'text', JSON.stringify( { type: 'cke-widget', editor: editor.name, id: widget.id } ) ); + } ); + } else + img.on( 'mousedown', onBlockWidgetDrag, widget ); + + widget.dragHandlerContainer = container; + } + + function onBlockWidgetDrag() { + var finder = this.repository.finder, + locator = this.repository.locator, + liner = this.repository.liner, + editor = this.editor, + editable = editor.editable(), + listeners = [], + sorted = [], + + // Harvest all possible relations and display some closest. + relations = finder.greedySearch(), + + buffer = CKEDITOR.tools.eventsBuffer( 50, function() { + locations = locator.locate( relations ); + + // There's only a single line displayed for D&D. + sorted = locator.sort( y, 1 ); + + if ( sorted.length ) { + liner.prepare( relations, locations ); + liner.placeLine( sorted[ 0 ] ); + liner.cleanup(); + } + } ), + + locations, y; + + // Let's have the "dragging cursor" over entire editable. + editable.addClass( 'cke_widget_dragging' ); + + // Cache mouse position so it is re-used in events buffer. + listeners.push( editable.on( 'mousemove', function( evt ) { + y = evt.data.$.clientY; + buffer.input(); + } ) ); + + function onMouseUp() { + var l; + + buffer.reset(); + + // Stop observing events. + while ( ( l = listeners.pop() ) ) + l.removeListener(); + + onBlockWidgetDrop.call( this, sorted ); + } + + // Mouseup means "drop". This is when the widget is being detached + // from DOM and placed at range determined by the line (location). + listeners.push( editor.document.once( 'mouseup', onMouseUp, this ) ); + + // Mouseup may occur when user hovers the line, which belongs to + // the outer document. This is, of course, a valid listener too. + listeners.push( CKEDITOR.document.once( 'mouseup', onMouseUp, this ) ); + } + + function onBlockWidgetDrop( sorted ) { + var finder = this.repository.finder, + liner = this.repository.liner, + editor = this.editor, + editable = this.editor.editable(); + + if ( !CKEDITOR.tools.isEmpty( liner.visible ) ) { + // Retrieve range for the closest location. + var range = finder.getRange( sorted[ 0 ] ); + + // Focus widget (it could lost focus after mousedown+mouseup) + // and save this state as the one where we want to be taken back when undoing. + this.focus(); + editor.fire( 'saveSnapshot' ); + // Group all following operations in one snapshot. + editor.fire( 'lockSnapshot', { dontUpdate: 1 } ); + + // Reset the fake selection, which will be invalidated by insertElementIntoRange. + // This avoids a situation when getSelection() still returns a fake selection made + // on widget which in the meantime has been moved to other place. That could cause + // an error thrown e.g. by saveSnapshot or stateUpdater. + editor.getSelection().reset(); + + // Attach widget at the place determined by range. + editable.insertElementIntoRange( this.wrapper, range ); + + // Focus again the dropped widget. + this.focus(); + + // Unlock snapshot and save new one, which will contain all changes done + // in this method. + editor.fire( 'unlockSnapshot' ); + editor.fire( 'saveSnapshot' ); + } + + // Clean-up custom cursor for editable. + editable.removeClass( 'cke_widget_dragging' ); + + // Clean-up all remaining lines. + liner.hideVisible(); + } + + function setupEditables( widget ) { + var editableName, + editableDef, + definedEditables = widget.editables; + + widget.editables = {}; + + if ( !widget.editables ) + return; + + for ( editableName in definedEditables ) { + editableDef = definedEditables[ editableName ]; + widget.initEditable( editableName, typeof editableDef == 'string' ? { selector: editableDef } : editableDef ); + } + } + + function setupMask( widget ) { + if ( !widget.mask ) + return; + + // Reuse mask if already exists (#11281). + var img = widget.wrapper.findOne( '.cke_widget_mask' ); + + if ( !img ) { + img = new CKEDITOR.dom.element( 'img', widget.editor.document ); + img.setAttributes( { + src: transparentImageData, + 'class': 'cke_reset cke_widget_mask' + } ); + widget.wrapper.append( img ); + } + + widget.mask = img; + } + + // Replace parts object containing: + // partName => selector pairs + // with: + // partName => element pairs + function setupParts( widget ) { + if ( widget.parts ) { + var parts = {}, + el, partName; + + for ( partName in widget.parts ) { + el = widget.wrapper.findOne( widget.parts[ partName ] ); + parts[ partName ] = el; + } + widget.parts = parts; + } + } + + function setupWidget( widget, widgetDef ) { + setupWrapper( widget ); + setupParts( widget ); + setupEditables( widget ); + setupMask( widget ); + setupDragHandler( widget ); + + // #11145: [IE8] Non-editable content of widget is draggable. + if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 ) { + widget.wrapper.on( 'dragstart', function( evt ) { + var target = evt.data.getTarget(); + + // Allow text dragging inside nested editables or dragging inline widget's drag handler. + if ( !getNestedEditable( widget, target ) && !( widget.inline && isDomDragHandler( target ) ) ) + evt.data.preventDefault(); + } ); + } + + widget.wrapper.removeClass( 'cke_widget_new' ); + widget.element.addClass( 'cke_widget_element' ); + + widget.on( 'key', function( evt ) { + var keyCode = evt.data.keyCode; + + // ENTER. + if ( keyCode == 13 ) + widget.edit(); + // CTRL+C or CTRL+X. + else if ( keyCode == CKEDITOR.CTRL + 67 || keyCode == CKEDITOR.CTRL + 88 ) { + copySingleWidget( widget, keyCode == CKEDITOR.CTRL + 88 ); + return; // Do not preventDefault. + } + // Pass chosen keystrokes to other plugins or default fake sel handlers. + // Pass all CTRL/ALT keystrokes. + else if ( keyCode in keystrokesNotBlockedByWidget || ( CKEDITOR.CTRL & keyCode ) || ( CKEDITOR.ALT & keyCode ) ) + return; + + return false; + }, null, null, 999 ); + // Listen with high priority so it's possible + // to overwrite this callback. + + widget.on( 'doubleclick', function( evt ) { + widget.edit(); + } ); + + if ( widgetDef.data ) + widget.on( 'data', widgetDef.data ); + + if ( widgetDef.edit ) + widget.on( 'edit', widgetDef.edit ); + } + + function setupWidgetData( widget, startupData ) { + var widgetDataAttr = widget.element.data( 'cke-widget-data' ); + + if ( widgetDataAttr ) + widget.setData( JSON.parse( widgetDataAttr ) ); + if ( startupData ) + widget.setData( startupData ); + + // Unblock data and... + widget.dataReady = true; + + // Write data to element because this was blocked when data wasn't ready. + writeDataToElement( widget ); + + // Fire data event first time, because this was blocked when data wasn't ready. + widget.fire( 'data', widget.data ); + } + + function setupWrapper( widget ) { + // Retrieve widget wrapper. Assign an id to it. + var wrapper = widget.wrapper = widget.element.getParent(); + wrapper.setAttribute( 'data-cke-widget-id', widget.id ); + } + + function writeDataToElement( widget ) { + widget.element.data( 'cke-widget-data', JSON.stringify( widget.data ) ); + } + + // + // EXPOSE PUBLIC API ------------------------------------------------------ + // + + CKEDITOR.plugins.widget = Widget; + Widget.repository = Repository; + Widget.nestedEditable = NestedEditable; +} )(); + +/** + * An event fired when a widget definition is registered by the {@link CKEDITOR.plugins.widget.repository#add} method. + * It is possible to modify the definition being registered. + * + * @event widgetDefinition + * @member CKEDITOR.editor + * @param {CKEDITOR.plugins.widget.definition} data Widget definition. + */ + +/** + * This is an abstract class that describes the definition of a widget. + * It is a type of {@link CKEDITOR.plugins.widget.repository#add} method's second argument. + * + * Widget instances inherit from registered widget definitions, although not in a prototypal way. + * They are simply extended with corresponding widget definitions. Note that not all properties of + * the widget definition become properties of a widget. Some, like {@link #data} or {@link #edit}, become + * widget's events listeners. + * + * @class CKEDITOR.plugins.widget.definition + * @abstract + * @mixins CKEDITOR.feature + */ + +/** + * Widget definition name. It is automatically set when the definition is + * {@link CKEDITOR.plugins.widget.repository#add registered}. + * + * @property {String} name + */ + +/** + * The method executed while initializing a widget, after a widget instance + * is created, but before it is ready. It is executed before the first + * {@link CKEDITOR.plugins.widget#event-data} is fired so it is common to + * use the `init` method to populate widget data with information loaded from + * the DOM, like for exmaple: + * + * init: function() { + * this.setData( 'width', this.element.getStyle( 'width' ) ); + * + * if ( this.parts.caption.getStyle( 'display' ) != 'none' ) + * this.setData( 'showCaption', true ); + * } + * + * @property {Function} init + */ + +/** + * The function to be used to upcast an element to this widget or a + * comma-separated list of upcast methods from the {@link #upcasts} object. + * + * The upcast function **is not** executed in the widget context (because the widget + * does not exist yet) and two arguments are passed: + * + * * `element` ({@link CKEDITOR.htmlParser.element}) – The element to be checked. + * * `data` (`Object`) – The object which can be extended with data which will then be passed to the widget. + * + * An element will be upcasted if a function returned `true` or an instance of + * a {@link CKEDITOR.htmlParser.element} if upcasting meant DOM structure changes + * (in this case the widget will be initialized on the returned element). + * + * @property {String/Function} upcast + */ + +/** + * The object containing functions which can be used to upcast this widget. + * Only those pointed by the {@link #upcast} property will be used. + * + * In most cases it is appropriate to use {@link #upcast} directly, + * because majority of widgets need just one method. + * However, in some cases the widget author may want to expose more than one variant + * and then this property may be used. + * + * upcasts: { + * // This function may upcast only figure elements. + * figure: function() { + * // ... + * }, + * // This function may upcast only image elements. + * image: function() { + * // ... + * }, + * // More variants... + * } + * + * // Then, widget user may choose which upcast methods will be enabled. + * editor.on( 'widgetDefinition', function( evt ) { + * if ( evt.data.name == 'image' ) + * evt.data.upcast = 'figure,image'; // Use both methods. + * } ); + * + * @property {Object} upcasts + */ + +/** + * The function to be used to downcast this widget or + * a name of the downcast option from the {@link #downcasts} object. + * + * The downcast funciton will be executed in the {@link CKEDITOR.plugins.widget} context + * and with `widgetElement` ({@link CKEDITOR.htmlParser.element}) argument which is + * the widget's main element. + * + * The function may return an instance of the {@link CKEDITOR.htmlParser.node} class if the widget + * needs to be downcasted to a different node than the widget's main element. + * + * @property {String/Function} downcast + */ + +/** + * The object containing functions which can be used to downcast this widget. + * Only the one pointed by the {@link #downcast} property will be used. + * + * In most cases it is appropriate to use {@link #downcast} directly, + * because majority of widgets have just one variant of downcasting (or none at all). + * However, in some cases the widget author may want to expose more than one variant + * and then this property may be used. + * + * downcasts: { + * // This downcast may transform the widget into the figure element. + * figure: function() { + * // ... + * }, + * // This downcast may transform the widget into the image element with data-* attributes. + * image: function() { + * // ... + * } + * } + * + * // Then, the widget user may choose one of the downcast options when setting up his editor. + * editor.on( 'widgetDefinition', function( evt ) { + * if ( evt.data.name == 'image' ) + * evt.data.downcast = 'figure'; + * } ); + * + * @property downcasts + */ + +/** + * If set, it will be added as the {@link CKEDITOR.plugins.widget#event-edit} event listener. + * This means that it will be executed when a widget is being edited. + * See the {@link CKEDITOR.plugins.widget#method-edit} method. + * + * @property {Function} edit + */ + +/** + * If set, it will be added as the {@link CKEDITOR.plugins.widget#event-data} event listener. + * This means that it will be executed every time the {@link CKEDITOR.plugins.widget#property-data widget data} changes. + * + * @property {Function} data + */ + +/** + * The method to be executed when the widget's command is executed in order to insert a new widget + * (widget of this type is not focused). If not defined, then the default action will be + * performed which means that: + * + * * An instance of the widget will be created in a detached {@link CKEDITOR.dom.documentFragment document fragment}, + * * The {@link CKEDITOR.plugins.widget#method-edit} method will be called to trigger widget editing, + * * The widget element will be inserted into DOM. + * + * @property {Function} insert + */ + +/** + * The name of a dialog window which will be opened on {@link CKEDITOR.plugins.widget#method-edit}. + * If not defined, then the {@link CKEDITOR.plugins.widget#method-edit} method will not perform any action and + * widget's command will insert a new widget without opening a dialog window first. + * + * @property {String} dialog + */ + +/** + * The template which will be used to create a new widget element (when the widget's command is executed). + * This string is populated with {@link #defaults default values} by using the {@link CKEDITOR.template} format. + * Therefore it has to be a valid {@link CKEDITOR.template} argument. + * + * @property {String} template + */ + +/** + * The data object which will be used to populate the data of a newly created widget. + * See {@link CKEDITOR.plugins.widget#property-data}. + * + * defaults: { + * showCaption: true, + * align: 'none' + * } + * + * @property defaults + */ + +/** + * An object containing definitions of widget components (part name => CSS selector). + * + * parts: { + * image: 'img', + * caption: 'div.caption' + * } + * + * @property parts + */ + +/** + * An object containing definitions of nested editables (editable name => {@link CKEDITOR.plugins.widget.nestedEditable.definition}). + * + * editables: { + * header: 'h1', + * content: { + * selector: 'div.content', + * allowedContent: 'p strong em; a[!href]' + * } + * } + * + * @property editables + */ + +/** + * Widget name displayed in elements path. + * + * @property {String} pathName + */ + +/** + * If set to `true`, the widget's element will be covered with a transparent mask. + * This will prevent its content from being clickable, which matters in case + * of special elements like embedded Flash or iframes that generate a separate "context". + * + * @property {Boolean} mask + */ + +/** + * If set to `true/false`, it will force the widget to be either an inline or a block widget. + * If not set, the widget type will be determined from the widget element. + * + * Widget type influences whether a block (`div`) or an inline (`span`) element is used + * for the wrapper. + * + * @property {Boolean} inline + */ + +/** + * The label for the widget toolbar button. + * + * editor.widgets.add( 'simplebox', { + * button: 'Create a simple box' + * } ); + * + * editor.widgets.add( 'simplebox', { + * button: editor.lang.simplebox.title + * } ); + * + * @property {String} button + */ + +/** + * Whether widget should be draggable. Defaults to `true`. + * If set to `false` drag handler will not be displayed when hovering widget. + * + * @property {Boolean} draggable + */ + +/** + * This is an abstract class that describes the definition of a widget's nested editable. + * It is a type of values in the {@link CKEDITOR.plugins.widget.definition#editables} object. + * + * In the simplest case the definition is a string which is a CSS selector used to + * find an element that will become a nested editable inside the widget. Note that + * the widget element can be a nested editable, too. + * + * In the more advanced case a definition is an object with a required `selector` property. + * + * editables: { + * header: 'h1', + * content: { + * selector: 'div.content', + * allowedContent: 'p strong em; a[!href]' + * } + * } + * + * @class CKEDITOR.plugins.widget.nestedEditable.definition + * @abstract + */ + +/** + * The CSS selector used to find an element which will become a nested editable. + * + * @property {String} selector + */ + +/** + * The [Advanced Content Filter](#!/guide/dev_advanced_content_filter) rules + * which will be used to limit the content allowed in this nested editable. + * This option is similar to {@link CKEDITOR.config#allowedContent} and one can + * use it to limit the editor features available in the nested editable. + * + * @property {CKEDITOR.filter.allowedContentRules} allowedContent + */ + +/** + * Nested editable name displayed in elements path. + * + * @property {String} pathName + */ \ No newline at end of file diff --git a/libraries/ckeditor/plugins/wsc/LICENSE.md b/libraries/ckeditor/plugins/wsc/LICENSE.md new file mode 100644 index 0000000..c7d374a --- /dev/null +++ b/libraries/ckeditor/plugins/wsc/LICENSE.md @@ -0,0 +1,28 @@ +Software License Agreement +========================== + +**CKEditor WSC Plugin** +Copyright © 2012, [CKSource](http://cksource.com) - Frederico Knabben. All rights reserved. + +Licensed under the terms of any of the following licenses at your choice: + +* GNU General Public License Version 2 or later (the "GPL"): + http://www.gnu.org/licenses/gpl.html + +* GNU Lesser General Public License Version 2.1 or later (the "LGPL"): + http://www.gnu.org/licenses/lgpl.html + +* Mozilla Public License Version 1.1 or later (the "MPL"): + http://www.mozilla.org/MPL/MPL-1.1.html + +You are not required to, but if you want to explicitly declare the license you have chosen to be bound to when using, reproducing, modifying and distributing this software, just include a text file titled "legal.txt" in your version of this software, indicating your license choice. + +Sources of Intellectual Property Included in this plugin +-------------------------------------------------------- + +Where not otherwise indicated, all plugin content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, the plugin will incorporate work done by developers outside of CKSource with their express permission. + +Trademarks +---------- + +CKEditor is a trademark of CKSource - Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders. diff --git a/libraries/ckeditor/plugins/wsc/README.md b/libraries/ckeditor/plugins/wsc/README.md new file mode 100644 index 0000000..46eeafb --- /dev/null +++ b/libraries/ckeditor/plugins/wsc/README.md @@ -0,0 +1,25 @@ +CKEditor WebSpellChecker Plugin +=============================== + +This plugin brings Web Spell Checker (WSC) into CKEditor. + +WSC is "installation-less", using the web-services of [WebSpellChecker.net](http://www.webspellchecker.net/). It's an out of the box solution. + +Installation +------------ + +1. Clone/copy this repository contents in a new "plugins/wsc" folder in your CKEditor installation. +2. Enable the "wsc" plugin in the CKEditor configuration file (config.js): + + config.extraPlugins = 'wsc'; + +That's all. WSC will appear on the editor toolbar and will be ready to use. + +License +------- + +Licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html). + +See LICENSE.md for more information. + +Developed in cooperation with [WebSpellChecker.net](http://www.webspellchecker.net/). diff --git a/libraries/ckeditor/plugins/wsc/dialogs/ciframe.html b/libraries/ckeditor/plugins/wsc/dialogs/ciframe.html new file mode 100644 index 0000000..5809fbe --- /dev/null +++ b/libraries/ckeditor/plugins/wsc/dialogs/ciframe.html @@ -0,0 +1,66 @@ + + + + + + + + +

    + diff --git a/libraries/ckeditor/plugins/wsc/dialogs/tmpFrameset.html b/libraries/ckeditor/plugins/wsc/dialogs/tmpFrameset.html new file mode 100644 index 0000000..d5fc6bb --- /dev/null +++ b/libraries/ckeditor/plugins/wsc/dialogs/tmpFrameset.html @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + diff --git a/libraries/ckeditor/plugins/wsc/dialogs/wsc.css b/libraries/ckeditor/plugins/wsc/dialogs/wsc.css new file mode 100644 index 0000000..1056b45 --- /dev/null +++ b/libraries/ckeditor/plugins/wsc/dialogs/wsc.css @@ -0,0 +1,82 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +html, body +{ + background-color: transparent; + margin: 0px; + padding: 0px; +} + +body +{ + padding: 10px; +} + +body, td, input, select, textarea +{ + font-size: 11px; + font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana; +} + +.midtext +{ + padding:0px; + margin:10px; +} + +.midtext p +{ + padding:0px; + margin:10px; +} + +.Button +{ + border: #737357 1px solid; + color: #3b3b1f; + background-color: #c7c78f; +} + +.PopupTabArea +{ + color: #737357; + background-color: #e3e3c7; +} + +.PopupTitleBorder +{ + border-bottom: #d5d59d 1px solid; +} +.PopupTabEmptyArea +{ + padding-left: 10px; + border-bottom: #d5d59d 1px solid; +} + +.PopupTab, .PopupTabSelected +{ + border-right: #d5d59d 1px solid; + border-top: #d5d59d 1px solid; + border-left: #d5d59d 1px solid; + padding: 3px 5px 3px 5px; + color: #737357; +} + +.PopupTab +{ + margin-top: 1px; + border-bottom: #d5d59d 1px solid; + cursor: pointer; +} + +.PopupTabSelected +{ + font-weight: bold; + cursor: default; + padding-top: 4px; + border-bottom: #f1f1e3 1px solid; + background-color: #f1f1e3; +} diff --git a/libraries/ckeditor/plugins/wsc/dialogs/wsc.js b/libraries/ckeditor/plugins/wsc/dialogs/wsc.js new file mode 100644 index 0000000..fe584f6 --- /dev/null +++ b/libraries/ckeditor/plugins/wsc/dialogs/wsc.js @@ -0,0 +1,91 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +(function(){function z(a){return a&&a.domId&&a.getInputElement().$?a.getInputElement():a&&a.$?a:!1}function I(a){if(!a)throw"Languages-by-groups list are required for construct selectbox";var c=[],d="",e;for(e in a)for(var f in a[e]){var h=a[e][f];"en_US"==h?d=h:c.push(h)}c.sort();d&&c.unshift(d);return{getCurrentLangGroup:function(c){a:{for(var e in a)for(var d in a[e])if(d.toUpperCase()===c.toUpperCase()){c=e;break a}c=""}return c},setLangList:function(){var c={},e;for(e in a)for(var d in a[e])c[a[e][d]]= +d;return c}()}}var g=function(){var a=function(a,b,e){e=e||{};var f=e.expires;if("number"==typeof f&&f){var h=new Date;h.setTime(h.getTime()+1E3*f);f=e.expires=h}f&&f.toUTCString&&(e.expires=f.toUTCString());b=encodeURIComponent(b);a=a+"\x3d"+b;for(var k in e)b=e[k],a+="; "+k,!0!==b&&(a+="\x3d"+b);document.cookie=a};return{postMessage:{init:function(a){window.addEventListener?window.addEventListener("message",a,!1):window.attachEvent("onmessage",a)},send:function(a){var b=Object.prototype.toString, +e=a.fn||null,f=a.id||"",h=a.target||window,k=a.message||{id:f};a.message&&"[object Object]"==b.call(a.message)&&(a.message.id?a.message.id:a.message.id=f,k=a.message);a=window.JSON.stringify(k,e);h.postMessage(a,"*")},unbindHandler:function(a){window.removeEventListener?window.removeEventListener("message",a,!1):window.detachEvent("onmessage",a)}},hash:{create:function(){},parse:function(){}},cookie:{set:a,get:function(a){return(a=document.cookie.match(new RegExp("(?:^|; )"+a.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, +"\\$1")+"\x3d([^;]*)")))?decodeURIComponent(a[1]):void 0},remove:function(c){a(c,"",{expires:-1})}},misc:{findFocusable:function(a){var b=null;a&&(b=a.find("a[href], area[href], input, select, textarea, button, *[tabindex], *[contenteditable]"));return b},isVisible:function(a){var b;(b=0===a.offsetWidth||0==a.offsetHeight)||(b="none"===(document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null).display:a.currentStyle?a.currentStyle.display:a.style.display)); +return!b},hasClass:function(a,b){return!(!a.className||!a.className.match(new RegExp("(\\s|^)"+b+"(\\s|$)")))}}}}(),a=a||{};a.TextAreaNumber=null;a.load=!0;a.cmd={SpellTab:"spell",Thesaurus:"thes",GrammTab:"grammar"};a.dialog=null;a.optionNode=null;a.selectNode=null;a.grammerSuggest=null;a.textNode={};a.iframeMain=null;a.dataTemp="";a.div_overlay=null;a.textNodeInfo={};a.selectNode={};a.selectNodeResponce={};a.langList=null;a.langSelectbox=null;a.banner="";a.show_grammar=null;a.div_overlay_no_check= +null;a.targetFromFrame={};a.onLoadOverlay=null;a.LocalizationComing={};a.OverlayPlace=null;a.sessionid="";a.LocalizationButton={ChangeTo_button:{instance:null,text:"Change to",localizationID:"ChangeTo"},ChangeAll:{instance:null,text:"Change All"},IgnoreWord:{instance:null,text:"Ignore word"},IgnoreAllWords:{instance:null,text:"Ignore all words"},Options:{instance:null,text:"Options",optionsDialog:{instance:null}},AddWord:{instance:null,text:"Add word"},FinishChecking_button:{instance:null,text:"Finish Checking", +localizationID:"FinishChecking"},Option_button:{instance:null,text:"Options",localizationID:"Options"},FinishChecking_button_block:{instance:null,text:"Finish Checking",localizationID:"FinishChecking"}};a.LocalizationLabel={ChangeTo_label:{instance:null,text:"Change to",localizationID:"ChangeTo"},Suggestions:{instance:null,text:"Suggestions"},Categories:{instance:null,text:"Categories"},Synonyms:{instance:null,text:"Synonyms"}};var J=function(b){var c,d,e;for(e in b){if(c=a.dialog.getContentElement(a.dialog._.currentTabId, +e))c=c.getElement();else if(b[e].instance)c=b[e].instance.getElement().getFirst()||b[e].instance.getElement();else continue;d=b[e].localizationID||e;c.setText(a.LocalizationComing[d])}},K=function(b){var c,d,e;for(e in b)c=a.dialog.getContentElement(a.dialog._.currentTabId,e),c||(c=b[e].instance),c.setLabel&&(d=b[e].localizationID||e,c.setLabel(a.LocalizationComing[d]+":"))},t,A;a.framesetHtml=function(b){return"\x3ciframe id\x3d"+a.iframeNumber+"_"+b+' frameborder\x3d"0" allowtransparency\x3d"1" style\x3d"width:100%;border: 1px solid #AEB3B9;overflow: auto;background:#fff; border-radius: 3px;"\x3e\x3c/iframe\x3e'}; +a.setIframe=function(b,c){var d;d=a.framesetHtml(c);var e=a.iframeNumber+"_"+c;b.getElement().setHtml(d);d=document.getElementById(e);d=d.contentWindow?d.contentWindow:d.contentDocument.document?d.contentDocument.document:d.contentDocument;d.document.open();d.document.write('\x3c!DOCTYPE html\x3e\x3chtml\x3e\x3chead\x3e\x3cmeta charset\x3d"UTF-8"\x3e\x3ctitle\x3eiframe\x3c/title\x3e\x3cstyle\x3ehtml,body{margin: 0;height: 100%;font: 13px/1.555 "Trebuchet MS", sans-serif;}a{color: #888;font-weight: bold;text-decoration: none;border-bottom: 1px solid #888;}.main-box {color:#252525;padding: 3px 5px;text-align: justify;}.main-box p{margin: 0 0 14px;}.main-box .cerr{color: #f00000;border-bottom-color: #f00000;}\x3c/style\x3e\x3c/head\x3e\x3cbody\x3e\x3cdiv id\x3d"content" class\x3d"main-box"\x3e\x3c/div\x3e\x3ciframe src\x3d"" frameborder\x3d"0" id\x3d"spelltext" name\x3d"spelltext" style\x3d"display:none; width: 100%" \x3e\x3c/iframe\x3e\x3ciframe src\x3d"" frameborder\x3d"0" id\x3d"loadsuggestfirst" name\x3d"loadsuggestfirst" style\x3d"display:none; width: 100%" \x3e\x3c/iframe\x3e\x3ciframe src\x3d"" frameborder\x3d"0" id\x3d"loadspellsuggestall" name\x3d"loadspellsuggestall" style\x3d"display:none; width: 100%" \x3e\x3c/iframe\x3e\x3ciframe src\x3d"" frameborder\x3d"0" id\x3d"loadOptionsForm" name\x3d"loadOptionsForm" style\x3d"display:none; width: 100%" \x3e\x3c/iframe\x3e\x3cscript\x3e(function(window) {var ManagerPostMessage \x3d function() {var _init \x3d function(handler) {if (document.addEventListener) {window.addEventListener("message", handler, false);} else {window.attachEvent("onmessage", handler);};};var _sendCmd \x3d function(o) {var str,type \x3d Object.prototype.toString,fn \x3d o.fn || null,id \x3d o.id || "",target \x3d o.target || window,message \x3d o.message || { "id": id };if (o.message \x26\x26 type.call(o.message) \x3d\x3d "[object Object]") {(o.message["id"]) ? o.message["id"] : o.message["id"] \x3d id;message \x3d o.message;};str \x3d JSON.stringify(message, fn);target.postMessage(str, "*");};return {init: _init,send: _sendCmd};};var manageMessageTmp \x3d new ManagerPostMessage;var appString \x3d (function(){var spell \x3d parent.CKEDITOR.config.wsc.DefaultParams.scriptPath;var serverUrl \x3d parent.CKEDITOR.config.wsc.DefaultParams.serviceHost;return serverUrl + spell;})();function loadScript(src, callback) {var scriptTag \x3d document.createElement("script");scriptTag.type \x3d "text/javascript";callback ? callback : callback \x3d function() {};if(scriptTag.readyState) {scriptTag.onreadystatechange \x3d function() {if (scriptTag.readyState \x3d\x3d "loaded" ||scriptTag.readyState \x3d\x3d "complete") {scriptTag.onreadystatechange \x3d null;setTimeout(function(){scriptTag.parentNode.removeChild(scriptTag)},1);callback();}};}else{scriptTag.onload \x3d function() {setTimeout(function(){scriptTag.parentNode.removeChild(scriptTag)},1);callback();};};scriptTag.src \x3d src;document.getElementsByTagName("head")[0].appendChild(scriptTag);};window.onload \x3d function(){loadScript(appString, function(){manageMessageTmp.send({"id": "iframeOnload","target": window.parent});});}})(this);\x3c/script\x3e\x3c/body\x3e\x3c/html\x3e'); +d.document.close();a.div_overlay.setEnable()};a.setCurrentIframe=function(b){a.setIframe(a.dialog._.contents[b].Content,b)};a.setHeightBannerFrame=function(){var b=a.dialog.getContentElement("SpellTab","banner").getElement(),c=a.dialog.getContentElement("GrammTab","banner").getElement(),d=a.dialog.getContentElement("Thesaurus","banner").getElement();b.setStyle("height","90px");c.setStyle("height","90px");d.setStyle("height","90px")};a.setHeightFrame=function(){document.getElementById(a.iframeNumber+ +"_"+a.dialog._.currentTabId).style.height="240px"};a.sendData=function(b){var c=b._.currentTabId,d=b._.contents[c].Content,e,f;a.previousTab=c;a.setIframe(d,c);var h=function(h){c=b._.currentTabId;h=h||window.event;h.data.getTarget().is("a")&&c!==a.previousTab&&(a.previousTab=c,d=b._.contents[c].Content,e=a.iframeNumber+"_"+c,a.div_overlay.setEnable(),d.getElement().getChildCount()?E(a.targetFromFrame[e],a.cmd[c]):(a.setIframe(d,c),f=document.getElementById(e),a.targetFromFrame[e]=f.contentWindow))}; +b.parts.tabs.removeListener("click",h);b.parts.tabs.on("click",h)};a.buildSelectLang=function(a){var c=new CKEDITOR.dom.element("div"),d=new CKEDITOR.dom.element("select");a="wscLang"+a;c.addClass("cke_dialog_ui_input_select");c.setAttribute("role","presentation");c.setStyles({height:"auto",position:"absolute",right:"0",top:"-1px",width:"160px","white-space":"normal"});d.setAttribute("id",a);d.addClass("cke_dialog_ui_input_select");d.setStyles({width:"160px"});c.append(d);return c};a.buildOptionLang= +function(b,c){var d=document.getElementById("wscLang"+c),e=document.createDocumentFragment(),f,h,k=[];if(0===d.options.length){for(f in b)k.push([f,b[f]]);k.sort();for(var p=0;pm.width-D&&(d=m.width-D);if(gm.height-r&&(g=m.height-r);n.width=d+D;n.height=g+r;a._.fromResizeEvent=!1;a.resize(d,g);setTimeout(function(){a._.fromResizeEvent=!1;CKEDITOR.dialog.fire("resize",{dialog:a,width:d,height:g},b)},300)}a._.moved||(r=isNaN(c)&&isNaN(e)?0:1,isNaN(c)&&(c=(m.width-n.width)/2),0>c&&(c=0),c>m.width- +n.width&&(c=m.width-n.width),isNaN(e)&&(e=(m.height-n.height)/2),0>e&&(e=0),e>m.height-n.height&&(e=m.height-n.height),a.move(c,e,r))}function d(){b.wsc={};(function(a){var b={separator:"\x3c$\x3e",getDataType:function(a){return"undefined"===typeof a?"undefined":null===a?"null":Object.prototype.toString.call(a).slice(8,-1)},convertDataToString:function(a){return this.getDataType(a).toLowerCase()+this.separator+a},restoreDataFromString:function(a){var b=a,c;a=this.backCompatibility(a);if("string"=== +typeof a)switch(b=a.indexOf(this.separator),c=a.substring(0,b),b=a.substring(b+this.separator.length),c){case "boolean":b="true"===b;break;case "number":b=parseFloat(b);break;case "array":b=""===b?[]:b.split(",");break;case "null":b=null;break;case "undefined":b=void 0}return b},backCompatibility:function(a){var b=a,c;"string"===typeof a&&(c=a.indexOf(this.separator),0>c&&(b=parseFloat(a),isNaN(b)&&("["===a[0]&&"]"===a[a.length-1]?(a=a.replace("[",""),a=a.replace("]",""),b=""===a?[]:a.split(",")): +b="true"===a||"false"===a?"true"===a:a),b=this.convertDataToString(b)));return b}},c={get:function(a){return b.restoreDataFromString(window.localStorage.getItem(a))},set:function(a,c){var d=b.convertDataToString(c);window.localStorage.setItem(a,d)},del:function(a){window.localStorage.removeItem(a)},clear:function(){window.localStorage.clear()}},e={expiration:31622400,get:function(a){return b.restoreDataFromString(this.getCookie(a))},set:function(a,c){var d=b.convertDataToString(c);this.setCookie(a, +d,{expires:this.expiration})},del:function(a){this.deleteCookie(a)},getCookie:function(a){return(a=document.cookie.match(new RegExp("(?:^|; )"+a.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"\x3d([^;]*)")))?decodeURIComponent(a[1]):void 0},setCookie:function(a,b,c){c=c||{};var d=c.expires;if("number"===typeof d&&d){var e=new Date;e.setTime(e.getTime()+1E3*d);d=c.expires=e}d&&d.toUTCString&&(c.expires=d.toUTCString());b=encodeURIComponent(b);a=a+"\x3d"+b;for(var h in c)b=c[h],a+="; "+h,!0!==b&&(a+= +"\x3d"+b);document.cookie=a},deleteCookie:function(a){this.setCookie(a,null,{expires:-1})},clear:function(){for(var a=document.cookie.split(";"),b=0;b .cke_dialog_ui_button:first-child +{ + margin-top: 4px; +} + +div[name=SpellTab] .wsc-spelltab-bottom .cke_dialog_ui_hbox_first .cke_dialog_ui_select > label +{ + margin-left: 0; +} + +div[name=SpellTab] .wsc-spelltab-bottom .cke_dialog_ui_hbox_first .cke_dialog_ui_select div.cke_dialog_ui_input_select +{ + width: 140px !important; +} + +div[name=SpellTab] .wsc-spelltab-bottom .cke_dialog_ui_hbox_first .cke_dialog_ui_select select.cke_dialog_ui_input_select, +div[name=Thesaurus] div.cke_dialog_ui_input_select select.cke_dialog_ui_input_select +{ + margin-top: 1px; +} + +div[name=SpellTab] .wsc-spelltab-bottom .cke_dialog_ui_hbox_first .cke_dialog_ui_select select.cke_dialog_ui_input_select:focus, +div[name=Thesaurus] div.cke_dialog_ui_input_select select.cke_dialog_ui_input_select:focus +{ + margin-top: 0; +} + +div[name=GrammTab] .cke_dialog_ui_vbox tbody > tr:first-child .cke_dialog_ui_button, +div[name=Thesaurus] .cke_dialog_ui_vbox tbody > tr:first-child .cke_dialog_ui_button +{ + margin-top: 4px !important; +} + +div[name=Thesaurus] div.cke_dialog_ui_input_select +{ + width: 180px !important; +} diff --git a/libraries/ckeditor/plugins/youtube/images/icon.png b/libraries/ckeditor/plugins/youtube/images/icon.png new file mode 100644 index 0000000..b1cf6de Binary files /dev/null and b/libraries/ckeditor/plugins/youtube/images/icon.png differ diff --git a/libraries/ckeditor/plugins/youtube/images/icon_1.png b/libraries/ckeditor/plugins/youtube/images/icon_1.png new file mode 100644 index 0000000..b1cf6de Binary files /dev/null and b/libraries/ckeditor/plugins/youtube/images/icon_1.png differ diff --git a/libraries/ckeditor/plugins/youtube/lang/ar.js b/libraries/ckeditor/plugins/youtube/lang/ar.js new file mode 100644 index 0000000..337dc34 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/ar.js @@ -0,0 +1,22 @@ +CKEDITOR.plugins.setLang('youtube', 'ar', { + button : 'شيفرة تضمين اليوتيوب', + title : 'شيفرة تضمين اليوتيوب', + txtEmbed : 'الصق شيفرة التضمين هنا', + txtUrl : 'الصق رابط فيديو اليوتيوب', + txtWidth : 'العرض', + txtHeight : 'الطول', + chkRelated : 'اظهر الفيديوهات المقترحة في نهاية الفيديو', + txtStartAt : 'ابدأ عند (ss او mm:ss او hh:mm:ss)', + chkPrivacy : 'تفعيل وضع تحسين الخصوصية', + chkOlderCode : 'استخدم شيفرة التضمين القديمة', + chkAutoplay : 'Autoplay', + noCode : 'يجب عليك ادخال شيفرة التضمين او الرابط', + invalidEmbed : 'شيفرة التضمين التي قمت بإدخالها تبدو غير صحيحة', + invalidUrl : 'الرابط الذي قمت بإدخاله يبدو غير صحيح', + or : 'او', + noWidth : 'يجب عليك ادخال العرض', + invalidWidth : 'يجب عليك ادخال عرض صحيح', + noHeight : 'يجب عليك ادخال الطول', + invalidHeight : 'يجب عليك ادخال طول صحيح', + invalidTime : 'يجب عليك ادخال وقت بداية صحيح' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/ar_1.js b/libraries/ckeditor/plugins/youtube/lang/ar_1.js new file mode 100644 index 0000000..5eaaac2 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/ar_1.js @@ -0,0 +1,23 @@ +CKEDITOR.plugins.setLang('youtube', 'ar', { + button : 'شيفرة تضمين اليوتيوب', + title : 'شيفرة تضمين اليوتيوب', + txtEmbed : 'الصق شيفرة التضمين هنا', + txtUrl : 'الصق رابط فيديو اليوتيوب', + txtWidth : 'العرض', + txtHeight : 'الطول', + chkRelated : 'اظهر الفيديوهات المقترحة في نهاية الفيديو', + txtStartAt : 'ابدأ عند (ss او mm:ss او hh:mm:ss)', + chkPrivacy : 'تفعيل وضع تحسين الخصوصية', + chkOlderCode : 'استخدم شيفرة التضمين القديمة', + chkAutoplay : 'Autoplay', + noCode : 'يجب عليك ادخال شيفرة التضمين او الرابط', + invalidEmbed : 'شيفرة التضمين التي قمت بإدخالها تبدو غير صحيحة', + invalidUrl : 'الرابط الذي قمت بإدخاله يبدو غير صحيح', + or : 'او', + noWidth : 'يجب عليك ادخال العرض', + invalidWidth : 'يجب عليك ادخال عرض صحيح', + noHeight : 'يجب عليك ادخال الطول', + invalidHeight : 'يجب عليك ادخال طول صحيح', + invalidTime : 'يجب عليك ادخال وقت بداية صحيح', + txtResponsive : 'Responsive video' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/cs.js b/libraries/ckeditor/plugins/youtube/lang/cs.js new file mode 100644 index 0000000..92359d5 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/cs.js @@ -0,0 +1,23 @@ +CKEDITOR.plugins.setLang('youtube', 'cs', { + button : 'Vložit video YouTube', + title : 'Vložit video YouTube', + txtEmbed : 'Zde vložte kód pro vložení', + txtUrl : 'Vložte adresu URL videa YouTube', + txtWidth : 'Šířka', + txtHeight : 'Výška', + chkRelated : 'Po dohrání videa zobrazit navrhovaná videa', + txtStartAt : 'Začít přehrávat v čase (ss nebo mm:ss nebo hh:mm:ss)', + chkPrivacy : 'Povolit režim s rozšířeným soukromím', + chkOlderCode : 'Použít starý kód pro vložení', + chkAutoplay : 'Automatické spuštění přehrávání', + noCode : 'Musíte vložit kód pro vložení nebo adresu URL', + invalidEmbed : 'Vložený kód pro vložení zřejmě není platný', + invalidUrl : 'Zadaná adresa URL zřejmě není platná', + or : 'nebo', + noWidth : 'Musíte zadat šířku', + invalidWidth : 'Zadejte platnou šířku', + noHeight : 'Musíte zadat výšku', + invalidHeight : 'Zadejte platnou výšku', + invalidTime : 'Zadejte platný počáteční čas', + txtResponsive : 'Responzivní design (ignorovat výšku a šířku, uzpůsobit šířce)' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/de.js b/libraries/ckeditor/plugins/youtube/lang/de.js new file mode 100644 index 0000000..a90b397 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/de.js @@ -0,0 +1,22 @@ +CKEDITOR.plugins.setLang('youtube', 'de', { + button : 'Youtube Video einbinden', + title : 'Youtube Video einbinden', + txtEmbed : 'Embed Code hier einfügen', + txtUrl : 'Youtube Video URL hier einfügen', + txtWidth : 'Breite', + txtHeight : 'Höhe', + chkRelated : 'Video Vorschläge am Video Ende einblenden', + txtStartAt : 'Start bei Position (ss oder mm:ss oder hh:mm:ss)', + chkPrivacy : 'Aktiviere die erweiterte Privatsphäre', + chkOlderCode : 'Benutzer alten Embed Code', + chkAutoplay : 'Autoplay', + noCode : 'Sie müssen einen Embed Code oder URL angeben', + invalidEmbed : 'Der angegebene Embed Code scheint nicht gültig zu sein.', + invalidUrl : 'Die angegebene URL scheint nicht gültig zu sein.', + or : 'oder', + noWidth : 'Geben Sie eine Breite an', + invalidWidth : 'Geben Sie eine gültige Breite an', + noHeight : 'Geben Sie eine Höhe an', + invalidHeight : 'Geben Sie eine gültige Höhe an', + invalidTime : 'Geben Sie eine gültige Startzeit an' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/de_1.js b/libraries/ckeditor/plugins/youtube/lang/de_1.js new file mode 100644 index 0000000..34f8d2b --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/de_1.js @@ -0,0 +1,23 @@ +CKEDITOR.plugins.setLang('youtube', 'de', { + button : 'YouTube Video einbinden', + title : 'YouTube Video einbinden', + txtEmbed : 'Embed Code hier einfügen', + txtUrl : 'YouTube Video URL hier einfügen', + txtWidth : 'Breite', + txtHeight : 'Höhe', + chkRelated : 'Vorschläge am Ende des Videos einblenden', + txtStartAt : 'Start bei Position (ss oder mm:ss oder hh:mm:ss)', + chkPrivacy : 'Erweiterten Datenschutzmodus aktivieren', + chkOlderCode : 'Benutze alten Embed Code', + chkAutoplay : 'Autoplay', + noCode : 'Sie müssen einen Embed Code oder URL angeben', + invalidEmbed : 'Der angegebene Embed Code scheint nicht gültig zu sein.', + invalidUrl : 'Die angegebene URL scheint nicht gültig zu sein.', + or : 'oder', + noWidth : 'Geben Sie eine Breite an', + invalidWidth : 'Geben Sie eine gültige Breite an', + noHeight : 'Geben Sie eine Höhe an', + invalidHeight : 'Geben Sie eine gültige Höhe an', + invalidTime : 'Geben Sie eine gültige Startzeit an', + txtResponsive : 'Automatische Größe (ignoriert Breite und Höhe)' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/el.js b/libraries/ckeditor/plugins/youtube/lang/el.js new file mode 100644 index 0000000..bc0ebc1 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/el.js @@ -0,0 +1,22 @@ +CKEDITOR.plugins.setLang('youtube', 'el', { + button: 'Ενσωμάτωση Youtube βίντεο', + title: 'Ενσωμάτωση Youtube βίντεο', + txtEmbed: 'Επικόλλησε τον κώδικα ενσωμάτωσης', + txtUrl: 'Επικόλλησε το URL του βίντεο', + txtWidth: 'Πλάτος', + txtHeight: 'Ύψος', + chkRelated: 'Εμφάνιση προτεινόμενων βίντεο μόλις ολοκληρωθεί', + txtStartAt: 'Χρόνος εκκίνησης (ss or mm:ss or hh:mm:ss)', + chkPrivacy: 'Ενεργοποίηση λειτουργίας ενισχυμένου απορρήτου', + chkOlderCode: 'Χρήση παλαιού κώδικα ενσωμάτωσης', + chkAutoplay: 'Αυτόματη εκκίνηση', + noCode: 'Χρειάζεται κώδικας ενσωμάτωσης ή URL', + invalidEmbed: 'Ο κώδικας ενσωμάτωσης που εισήγατε δεν μοιάζει σωστός', + invalidUrl: 'Το URL που εισήγατε δεν μοιάζει σωστό', + or: 'ή', + noWidth: 'Συμπληρώστε το πλάτος', + invalidWidth: 'Λανθασμένο πλάτος', + noHeight: 'Συμπληρώστε το ύψος', + invalidHeight: 'Λανθασμένο ύψος', + invalidTime: 'Λανθασμένος χρόνος εκκίνησης' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/en.js b/libraries/ckeditor/plugins/youtube/lang/en.js new file mode 100644 index 0000000..7466099 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/en.js @@ -0,0 +1,22 @@ +CKEDITOR.plugins.setLang('youtube', 'en', { + button : 'Embed Youtube Video', + title : 'Embed Youtube Video', + txtEmbed : 'Paste Embed Code Here', + txtUrl : 'Paste Youtube Video URL', + txtWidth : 'Width', + txtHeight : 'Height', + chkRelated : 'Show suggested videos at the video\'s end', + txtStartAt : 'Start at (ss or mm:ss or hh:mm:ss)', + chkPrivacy : 'Enable privacy-enhanced mode', + chkOlderCode : 'Use old embed code', + chkAutoplay: 'Autoplay', + noCode : 'You must input an embed code or URL', + invalidEmbed : 'The embed code you\'ve entered doesn\'t appear to be valid', + invalidUrl : 'The URL you\'ve entered doesn\'t appear to be valid', + or : 'or', + noWidth : 'You must inform the width', + invalidWidth : 'Inform a valid width', + noHeight : 'You must inform the height', + invalidHeight : 'Inform a valid height', + invalidTime : 'Inform a valid start time' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/en_1.js b/libraries/ckeditor/plugins/youtube/lang/en_1.js new file mode 100644 index 0000000..7e3954d --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/en_1.js @@ -0,0 +1,23 @@ +CKEDITOR.plugins.setLang('youtube', 'en', { + button : 'Embed YouTube Video', + title : 'Embed YouTube Video', + txtEmbed : 'Paste Embed Code Here', + txtUrl : 'Paste YouTube Video URL', + txtWidth : 'Width', + txtHeight : 'Height', + chkRelated : 'Show suggested videos at the video\'s end', + txtStartAt : 'Start at (ss or mm:ss or hh:mm:ss)', + chkPrivacy : 'Enable privacy-enhanced mode', + chkOlderCode : 'Use old embed code', + chkAutoplay: 'Autoplay', + noCode : 'You must input an embed code or URL', + invalidEmbed : 'The embed code you\'ve entered doesn\'t appear to be valid', + invalidUrl : 'The URL you\'ve entered doesn\'t appear to be valid', + or : 'or', + noWidth : 'You must inform the width', + invalidWidth : 'Inform a valid width', + noHeight : 'You must inform the height', + invalidHeight : 'Inform a valid height', + invalidTime : 'Inform a valid start time', + txtResponsive : 'Make Responsive (ignore width and height, fit to width)' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/es.js b/libraries/ckeditor/plugins/youtube/lang/es.js new file mode 100644 index 0000000..a0e5cb4 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/es.js @@ -0,0 +1,23 @@ +CKEDITOR.plugins.setLang('youtube', 'es', { + button : 'Embed YouTube video', + title : 'Embed YouTube video', + txtEmbed : 'Pegar el código embed', + txtUrl : 'Pegar la URL al video de Youtube', + txtWidth : 'Anchura', + txtHeight : 'Altura', + chkRelated : 'Mostrar videos sugeridos al final de este video', + txtStartAt : 'Comenzar en (ss or mm:ss or hh:mm:ss)', + chkPrivacy : 'Habilitar el modo privacy-enhanced', + chkOlderCode : 'Usar código embed viejo', + chkAutoplay: 'Autoplay', + noCode : 'Debes de introducir un código embed o URL', + invalidEmbed : 'El código embed introducido parece no ser valido', + invalidUrl : 'La URL introducida parece no ser valida', + or : 'o', + noWidth : 'Debes de dar la anchura', + invalidWidth : 'Da una anchura valida', + noHeight : 'Debes dar una altura valida', + invalidHeight : 'Da una altura valida', + invalidTime : 'Da un tiempo de valido', + txtResponsive : 'Hacer responsivo (ignorar anchura y altura, ajustar a la anchura)' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/et.js b/libraries/ckeditor/plugins/youtube/lang/et.js new file mode 100644 index 0000000..9cd94fb --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/et.js @@ -0,0 +1,23 @@ +CKEDITOR.plugins.setLang('youtube', 'et', { + button : 'Lisa YouTube video', + title : 'YouTube video lisamine', + txtEmbed : 'Kleepige manustatud kood siia', + txtUrl : 'Kleepige YouTube video veebiaadress', + txtWidth : 'Laius', + txtHeight : 'Kõrgus', + chkRelated : 'Näita soovitatud videosi antud video lõppus', + txtStartAt : 'Alguskoht: (ss või mm:ss või hh:mm:ss)', + chkPrivacy : 'Aktiveerige privaatsust täiendav režiim', + chkOlderCode : 'Kasutage vana manuskoodi', + chkAutoplay: 'Automaatesitlus', + noCode : 'Te peate sisestama video manuskoodi või veebiaadressi', + invalidEmbed : 'Manuskood mille sisestasite ei paista olevat korrektne', + invalidUrl : 'Veebiaadress mille sisestasite ei paista olevat korrektne', + or : 'või', + noWidth : 'Te peate sisestama video laiuse', + invalidWidth : 'Sisestage korrektne laius', + noHeight : 'Te peate sisestama video kõrguse', + invalidHeight : 'Sisestage korrektne kõrgus', + invalidTime : 'Sisestage korrektne algusaeg', + txtResponsive : 'Aktiveerige ekraani laiusega ühilduv režiim' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/fi.js b/libraries/ckeditor/plugins/youtube/lang/fi.js new file mode 100644 index 0000000..1228058 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/fi.js @@ -0,0 +1,23 @@ +CKEDITOR.plugins.setLang('youtube', 'fi', { + button : 'Upota YouTube-video', + title : 'Upota YouTube-video', + txtEmbed : 'Syötä YouTube-videon upotuskoodi', + txtUrl : 'Syötä YouTube-videon www-osoite', + txtWidth : 'Leveys', + txtHeight : 'Korkeus', + chkRelated : 'Näytä suositukset lopussa', + txtStartAt : 'Aloitusaika (ss tai mm:ss tai tt:mm:ss)', + chkPrivacy : 'Aktivoi yksityisyyttä parantava tila', + chkOlderCode : 'Käytä vanhaa upotuskoodia', + chkAutoplay: 'Soita automaattisesti', + noCode : 'Sinun täytyy syötää upotuskoodi tai www-osoite', + invalidEmbed : 'Upotuskoodi on virheellinen', + invalidUrl : 'Www-osoite on virheellinen', + or : 'tai', + noWidth : 'Syötä leveys', + invalidWidth : 'Leveys on virheellinen', + noHeight : 'Syötä korkeus', + invalidHeight : 'Korkeus on virheellinen', + invalidTime : 'Aloitusaika on virheellinen', + txtResponsive : 'Responsiivinen leveys (sovita leveys)' +}); \ No newline at end of file diff --git a/libraries/ckeditor/plugins/youtube/lang/fr.js b/libraries/ckeditor/plugins/youtube/lang/fr.js new file mode 100644 index 0000000..ab657d9 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/fr.js @@ -0,0 +1,22 @@ +CKEDITOR.plugins.setLang('youtube', 'fr', { + button : 'Insérer une vidéo Youtube', + title : 'Insérer une vidéo youtube', + txtEmbed : 'Coller le code embed ici', + txtUrl : 'Coller l\'url de la vidéo ici', + txtWidth : 'Largeur', + txtHeight : 'Hauteur', + chkRelated : 'Montrer les suggestions de vidéo à la fin', + txtStartAt : 'Commencer à (ss ou mm:ss ou hh:mm:ss)', + chkPrivacy : 'Activer la protection de la vie privée', + chkOlderCode : 'Utiliser l\'ancien code embed', + chkAutoplay : 'Autoplay', + noCode : 'Vous devez entrer un code embed ou une url', + invalidEmbed : 'Le code embed est invalide', + invalidUrl : 'L\'url est invalide', + or : 'ou', + noWidth : 'Vous devez saisir une largeur', + invalidWidth : 'La largeur saisie est invalide', + noHeight : 'Vous devez saisir une hauteur', + invalidHeight : 'La hauteur saisie est invalide', + invalidTime : 'Le temps de départ de la vidéo est invalide' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/fr_1.js b/libraries/ckeditor/plugins/youtube/lang/fr_1.js new file mode 100644 index 0000000..e4647f9 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/fr_1.js @@ -0,0 +1,23 @@ +CKEDITOR.plugins.setLang('youtube', 'fr', { + button : 'Insérer une vidéo Youtube', + title : 'Insérer une vidéo youtube', + txtEmbed : 'Coller le code embed ici', + txtUrl : 'Coller l\'url de la vidéo ici', + txtWidth : 'Largeur', + txtHeight : 'Hauteur', + chkRelated : 'Montrer les suggestions de vidéo à la fin', + txtStartAt : 'Commencer à (ss ou mm:ss ou hh:mm:ss)', + chkPrivacy : 'Activer la protection de la vie privée', + chkOlderCode : 'Utiliser l\'ancien code embed', + chkAutoplay : 'Autoplay', + noCode : 'Vous devez entrer un code embed ou une url', + invalidEmbed : 'Le code embed est invalide', + invalidUrl : 'L\'url est invalide', + or : 'ou', + noWidth : 'Vous devez saisir une largeur', + invalidWidth : 'La largeur saisie est invalide', + noHeight : 'Vous devez saisir une hauteur', + invalidHeight : 'La hauteur saisie est invalide', + invalidTime : 'Le temps de départ de la vidéo est invalide', + txtResponsive : 'Responsive video' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/he.js b/libraries/ckeditor/plugins/youtube/lang/he.js new file mode 100644 index 0000000..bf4d6ab --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/he.js @@ -0,0 +1,23 @@ +CKEDITOR.plugins.setLang('youtube', 'he', { + button : 'שבץ וידאו של YouTube', + title : 'שבץ וידאו של YouTube', + txtEmbed : 'הדבק את קוד השיבוץ כאן', + txtUrl : 'הדבק כתובת וידאו YouTube', + txtWidth : 'אורך', + txtHeight : 'גובה', + chkRelated : 'הצג סרטונים מומלצים בסוף הודיאו', + txtStartAt : 'התחל ב (ss או mm:ss או hh:mm:ss)', + chkPrivacy : 'הפעל מצב פרטיות המשופרת', + chkOlderCode : 'השתמש בקוד הטמעה ישן', + chkAutoplay: 'הפעלה אוטומטית', + noCode : 'אתה חייב להזין קוד embed כתובת וידאו אתר', + invalidEmbed : 'קוד ההטמעה שהוזן אינו נראה חוקי', + invalidUrl : 'כתובת הוידאו אינה נראת חוקית', + or : 'או', + noWidth : 'חובה להזין אורך', + invalidWidth : 'האורך שהוזן שגוי', + noHeight : 'חובה להזין גובה', + invalidHeight : 'הגובה שהוזן שגוי', + invalidTime : 'זמן התחלה שהוזן שגוי', + txtResponsive : 'הפוך לרספונסיבי (התעלם מרוחב וגובה, התאם לרוחב)' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/hu.js b/libraries/ckeditor/plugins/youtube/lang/hu.js new file mode 100644 index 0000000..3ecff0d --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/hu.js @@ -0,0 +1,22 @@ +CKEDITOR.plugins.setLang('youtube', 'hu', { + button : 'Youtube videó beillesztése', + title : 'Youtube videó beillesztése', + txtEmbed : 'Illessze be a beágyazott kódot', + txtUrl : 'Illessze be a Youtube videó URL-jét', + txtWidth : 'Szélesség', + txtHeight : 'Magasság', + txtStartAt : 'Kezdő időpont (ss vagy mm:ss vagy hh:mm:ss)', + chkRelated : 'Ajánlott videók megjelenítése, amikor a videó befejeződik', + chkPrivacy : 'Fokozott adatvédelmi mód engedélyezése', + chkOlderCode : 'Régi beágyazott kód használata', + chkAutoplay : 'Automatikus lejátszás', + noCode : 'A beágyazott kód, vagy az URL megadása kötelező', + invalidEmbed : 'A beágyazott kód érvénytelen', + invalidUrl : 'A megadott URL érvénytelen', + or : 'vagy', + noWidth : 'A szélesség megadása kötelező', + invalidWidth : 'Érvényes szélességet adjon meg', + noHeight : 'A magasság megadása kötelező', + invalidHeight : 'Érvényes magasságot adjon meg', + invalidTime : 'Érvényes kezdő időpontot adjon meg' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/hu_1.js b/libraries/ckeditor/plugins/youtube/lang/hu_1.js new file mode 100644 index 0000000..7282df7 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/hu_1.js @@ -0,0 +1,23 @@ +CKEDITOR.plugins.setLang('youtube', 'hu', { + button : 'Youtube videó beillesztése', + title : 'Youtube videó beillesztése', + txtEmbed : 'Illessze be a beágyazott kódot', + txtUrl : 'Illessze be a Youtube videó URL-jét', + txtWidth : 'Szélesség', + txtHeight : 'Magasság', + txtStartAt : 'Kezdő időpont (ss vagy mm:ss vagy hh:mm:ss)', + chkRelated : 'Ajánlott videók megjelenítése, amikor a videó befejeződik', + chkPrivacy : 'Fokozott adatvédelmi mód engedélyezése', + chkOlderCode : 'Régi beágyazott kód használata', + chkAutoplay : 'Automatikus lejátszás', + noCode : 'A beágyazott kód, vagy az URL megadása kötelező', + invalidEmbed : 'A beágyazott kód érvénytelen', + invalidUrl : 'A megadott URL érvénytelen', + or : 'vagy', + noWidth : 'A szélesség megadása kötelező', + invalidWidth : 'Érvényes szélességet adjon meg', + noHeight : 'A magasság megadása kötelező', + invalidHeight : 'Érvényes magasságot adjon meg', + invalidTime : 'Érvényes kezdő időpontot adjon meg', + txtResponsive : 'Responsive video' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/it.js b/libraries/ckeditor/plugins/youtube/lang/it.js new file mode 100644 index 0000000..e16da43 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/it.js @@ -0,0 +1,22 @@ +CKEDITOR.plugins.setLang('youtube', 'it', { + button : 'Incorpora video Youtube', + title : 'Incorpora video Youtube', + txtEmbed : 'Incolla qui il codice di incorporamento', + txtUrl : 'Incolla l\'URL del video Youtube', + txtWidth : 'Larghezza', + txtHeight : 'Altezza', + chkRelated : 'Mostra i video suggeriti dopo il video', + txtStartAt : 'Inizia a (ss o mm:ss o hh:mm:ss)', + chkPrivacy : 'Abilita la protezione della privacy', + chkOlderCode : 'Usa il vecchio codice di incorporamento', + chkAutoplay : 'Autoplay', + noCode : 'Devi inserire un codice di incorporamento o un URL', + invalidEmbed : 'Il codice di incorporamento inserito non sembra valido', + invalidUrl : 'L\'URL inserito non sembra valido', + or : 'o', + noWidth : 'Devi indicare la larghezza', + invalidWidth : 'Indica una larghezza valida', + noHeight : 'Devi indicare l\'altezza', + invalidHeight : 'Indica un\'altezza valida', + invalidTime : 'Indica un tempo di inizio valido' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/it_1.js b/libraries/ckeditor/plugins/youtube/lang/it_1.js new file mode 100644 index 0000000..1f19940 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/it_1.js @@ -0,0 +1,23 @@ +CKEDITOR.plugins.setLang('youtube', 'it', { + button : 'Incorpora video Youtube', + title : 'Incorpora video Youtube', + txtEmbed : 'Incolla qui il codice di incorporamento', + txtUrl : 'Incolla l\'URL del video Youtube', + txtWidth : 'Larghezza', + txtHeight : 'Altezza', + chkRelated : 'Mostra i video suggeriti dopo il video', + txtStartAt : 'Inizia a (ss o mm:ss o hh:mm:ss)', + chkPrivacy : 'Abilita la protezione della privacy', + chkOlderCode : 'Usa il vecchio codice di incorporamento', + chkAutoplay : 'Autoplay', + noCode : 'Devi inserire un codice di incorporamento o un URL', + invalidEmbed : 'Il codice di incorporamento inserito non sembra valido', + invalidUrl : 'L\'URL inserito non sembra valido', + or : 'o', + noWidth : 'Devi indicare la larghezza', + invalidWidth : 'Indica una larghezza valida', + noHeight : 'Devi indicare l\'altezza', + invalidHeight : 'Indica un\'altezza valida', + invalidTime : 'Indica un tempo di inizio valido', + txtResponsive : 'Responsive video' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/ja.js b/libraries/ckeditor/plugins/youtube/lang/ja.js new file mode 100644 index 0000000..a5a833e --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/ja.js @@ -0,0 +1,22 @@ +CKEDITOR.plugins.setLang('youtube', 'ja', { + button : 'Youtube動画埋め込み', + title : 'Youtube動画埋め込み', + txtEmbed : '埋め込みコードを貼り付けてください', + txtUrl : 'URLを貼り付けてください', + txtWidth : '幅', + txtHeight : '高さ', + chkRelated : '動画が終わったら関連動画を表示する', + txtStartAt : 'Start at', + chkPrivacy : 'プライバシー強化モードを有効にする', + chkOlderCode : '以前の埋め込みコードを使用する', + chkAutoplay : '自動再生', + noCode : '埋め込みコードまたはURLを入力してください', + invalidEmbed : '不適切な埋め込みコードが入力されました', + invalidUrl : '不適切なURLが入力されました', + or : 'または', + noWidth : '幅を指定してください', + invalidWidth : '幅指定に誤りがあります', + noHeight : '高さを指定してください', + invalidHeight : '高さ指定に誤りがあります', + invalidTime : 'Inform a valid start time' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/ja_1.js b/libraries/ckeditor/plugins/youtube/lang/ja_1.js new file mode 100644 index 0000000..e9a0d77 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/ja_1.js @@ -0,0 +1,23 @@ +CKEDITOR.plugins.setLang('youtube', 'ja', { + button : 'Youtube動画埋め込み', + title : 'Youtube動画埋め込み', + txtEmbed : '埋め込みコードを貼り付けてください', + txtUrl : 'URLを貼り付けてください', + txtWidth : '幅', + txtHeight : '高さ', + chkRelated : '動画が終わったら関連動画を表示する', + txtStartAt : 'Start at', + chkPrivacy : 'プライバシー強化モードを有効にする', + chkOlderCode : '以前の埋め込みコードを使用する', + chkAutoplay : '自動再生', + noCode : '埋め込みコードまたはURLを入力してください', + invalidEmbed : '不適切な埋め込みコードが入力されました', + invalidUrl : '不適切なURLが入力されました', + or : 'または', + noWidth : '幅を指定してください', + invalidWidth : '幅指定に誤りがあります', + noHeight : '高さを指定してください', + invalidHeight : '高さ指定に誤りがあります', + invalidTime : 'Inform a valid start time', + txtResponsive : 'Responsive video' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/nb.js b/libraries/ckeditor/plugins/youtube/lang/nb.js new file mode 100644 index 0000000..2de7275 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/nb.js @@ -0,0 +1,23 @@ +CKEDITOR.plugins.setLang('youtube', 'nb', { + button : 'Bygg inn YouTube-video', + title : 'Bygg inn YouTube-video', + txtEmbed : 'Lim inn embed-kode her', + txtUrl : 'Lim inn YouTube video-URL', + txtWidth : 'Bredde', + txtHeight : 'Høyde', + chkRelated : 'Vis foreslåtte videoer når videoen er ferdig', + txtStartAt : 'Start ved (ss eller mm:ss eller hh:mm:ss)', + chkPrivacy : 'Bruk personverntilpasset modus', + chkOlderCode : 'Bruk gammel embedkode', + chkAutoplay: 'Spill automatisk', + noCode : 'Du må legge inn en embed-kode eller URL', + invalidEmbed : 'Emded-koden du la inn ser ikke ut til å være gyldig', + invalidUrl : 'URLen du la inn ser ikke ut til å være gyldig', + or : 'eller', + noWidth : 'Du må legge inn bredde', + invalidWidth : 'Legg inn en gyldig bredde', + noHeight : 'Du må legge inn høyde', + invalidHeight : 'Legg inn en gyldig høyde', + invalidTime : 'Legg inn gyldig starttid', + txtResponsive : 'Gjør responsiv (ignorer bredde og høyde, tilpass bredde på sida)' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/nl.js b/libraries/ckeditor/plugins/youtube/lang/nl.js new file mode 100644 index 0000000..7ac66d2 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/nl.js @@ -0,0 +1,21 @@ +CKEDITOR.plugins.setLang('youtube', 'nl', { + button : 'Youtube video insluiten', + title : 'Youtube video insluiten', + txtEmbed : 'Plak embedcode hier', + txtUrl : 'Plak video URL', + txtWidth : 'Breedte', + txtHeight : 'Hoogte', + chkRelated : 'Toon gesuggereerde video aan het einde van de video', + txtStartAt : 'Starten op (ss of mm:ss of hh:mm:ss)', + chkPrivacy : 'Privacy-enhanced mode inschakelen', + chkOlderCode : 'Gebruik oude embedcode', + chkAutoplay: 'Automatisch starten', + noCode : 'U moet een embedcode of url ingeven', + invalidEmbed : 'De ingegeven embedcode lijkt niet geldig', + invalidUrl : 'De ingegeven url lijkt niet geldig', + or : 'of', + noWidth : 'U moet een breedte ingeven', + invalidWidth : 'U moet een geldige breedte ingeven', + noHeight : 'U moet een hoogte ingeven', + invalidHeight : 'U moet een geldige starttijd ingeven' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/nl_1.js b/libraries/ckeditor/plugins/youtube/lang/nl_1.js new file mode 100644 index 0000000..cd7b950 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/nl_1.js @@ -0,0 +1,23 @@ +CKEDITOR.plugins.setLang('youtube', 'nl', { + button : 'Youtube video insluiten', + title : 'Youtube video insluiten', + txtEmbed : 'Plak embedcode hier', + txtUrl : 'Plak video URL', + txtWidth : 'Breedte', + txtHeight : 'Hoogte', + chkRelated : 'Toon gesuggereerde video aan het einde van de video', + txtStartAt : 'Starten op (ss of mm:ss of hh:mm:ss)', + chkPrivacy : 'Privacy-enhanced mode inschakelen', + chkOlderCode : 'Gebruik oude embedcode', + chkAutoplay: 'Automatisch starten', + noCode : 'U moet een embedcode of url ingeven', + invalidEmbed : 'De ingegeven embedcode lijkt niet geldig', + invalidUrl : 'De ingegeven url lijkt niet geldig', + or : 'of', + noWidth : 'U moet een breedte ingeven', + invalidWidth : 'U moet een geldige breedte ingeven', + noHeight : 'U moet een hoogte ingeven', + invalidHeight : 'U moet een geldige starttijd ingeven', + invalidTime : 'Inform a valid start time', + txtResponsive : 'Responsive video' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/nn.js b/libraries/ckeditor/plugins/youtube/lang/nn.js new file mode 100644 index 0000000..37abf41 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/nn.js @@ -0,0 +1,23 @@ +CKEDITOR.plugins.setLang('youtube', 'nn', { + button : 'Bygg inn YouTube-video', + title : 'Bygg inn YouTube-video', + txtEmbed : 'Lim inn embed-kode her', + txtUrl : 'Lim inn YouTube video-URL', + txtWidth : 'Breidde', + txtHeight : 'Høgde', + chkRelated : 'Vis foreslåtte videoar når videoen er ferdig', + txtStartAt : 'Start ved (ss eller mm:ss eller hh:mm:ss)', + chkPrivacy : 'Bruk personverntilpassa modus', + chkOlderCode : 'Bruk gamal embedkode', + chkAutoplay: 'Spel automatisk', + noCode : 'Du må leggja inn ein embed-kode eller URL', + invalidEmbed : 'Emded-koden du la inn ser ikkje ut til å vera gyldig', + invalidUrl : 'URLen du la inn ser ikkje ut til å vera gyldig', + or : 'eller', + noWidth : 'Du må leggja inn breidde', + invalidWidth : 'Legg inn ei gyldig breidde', + noHeight : 'Du må leggja inn høgde', + invalidHeight : 'Legg inn ei gyldig høgde', + invalidTime : 'Legg inn gyldig starttid', + txtResponsive : 'Gjer responsiv (ignorer breidde og høgde, tilpass breidda på sida)' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/pl.js b/libraries/ckeditor/plugins/youtube/lang/pl.js new file mode 100644 index 0000000..deb3e92 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/pl.js @@ -0,0 +1,22 @@ +CKEDITOR.plugins.setLang('youtube', 'pl', { + button : 'Załacznik wideo z Youtube', + title : 'Załacznik wideo z Youtube', + txtEmbed : 'Wklej kod do umieszczenia', + txtUrl : 'Wklej link URL do wideo', + txtWidth : 'Szerokość', + txtHeight : 'Wysokość', + chkRelated : 'Pokaż sugerowane filmy po zakończeniu odtwarzania', + txtStartAt : 'Rozpocznij od (ss lub mm:ss lub gg:mm:ss)', + chkPrivacy : 'Włącz rozszerzony tryb prywatności', + chkOlderCode : 'Użyj starego kodu', + chkAutoplay: 'Autoodtwarzanie', + noCode : 'Musisz wprowadzić kod lub link URL', + invalidEmbed : 'Wprowadzony kod nie jest poprawny', + invalidUrl : 'Wprowadzony link URL nie jest poprawny', + or : 'lub', + noWidth : 'Musisz wpisać szerokość', + invalidWidth : 'Wprowadzona szerokość nie jest poprawna', + noHeight : 'Musisz wprowadzić wysokość', + invalidHeight : 'Wprowadzona wysokość nie jest poprawna', + invalidTime : 'Musisz wprowadzić poprawny czas rozpoczęcia' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/pl_1.js b/libraries/ckeditor/plugins/youtube/lang/pl_1.js new file mode 100644 index 0000000..2524a5e --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/pl_1.js @@ -0,0 +1,23 @@ +CKEDITOR.plugins.setLang('youtube', 'pl', { + button : 'Załącznik wideo z YouTube', + title : 'Załącznik wideo z YouTube', + txtEmbed : 'Wklej kod do umieszczenia', + txtUrl : 'Wklej adres URL do wideo z YouTube', + txtWidth : 'Szerokość', + txtHeight : 'Wysokość', + chkRelated : 'Pokaż sugerowane filmy po zakończeniu odtwarzania', + txtStartAt : 'Rozpocznij od (ss lub mm:ss lub gg:mm:ss)', + chkPrivacy : 'Włącz rozszerzony tryb prywatności', + chkOlderCode : 'Użyj starego kodu', + chkAutoplay: 'Autoodtwarzanie', + noCode : 'Musisz wprowadzić kod lub adres URL', + invalidEmbed : 'Wprowadzony kod nie jest poprawny', + invalidUrl : 'Wprowadzony adres URL nie jest poprawny', + or : 'lub', + noWidth : 'Musisz wpisać szerokość', + invalidWidth : 'Wprowadzona szerokość nie jest poprawna', + noHeight : 'Musisz wprowadzić wysokość', + invalidHeight : 'Wprowadzona wysokość nie jest poprawna', + invalidTime : 'Musisz wprowadzić poprawny czas rozpoczęcia', + txtResponsive : 'El. responsywny (ignoruj szerokość i wysokość, dopasuj do szerokości)' +}); \ No newline at end of file diff --git a/libraries/ckeditor/plugins/youtube/lang/pt.js b/libraries/ckeditor/plugins/youtube/lang/pt.js new file mode 100644 index 0000000..e468c55 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/pt.js @@ -0,0 +1,22 @@ +CKEDITOR.plugins.setLang('youtube', 'pt', { + button : 'Inserir Vídeo do Youtube', + title : 'Inserir Vídeo do Youtube', + txtEmbed : 'Cole aqui o código embed de um vídeo do Youtube', + txtUrl : 'Cole aqui uma URL de um vídeo do Youtube', + txtWidth : 'Largura', + txtHeight : 'Altura', + chkRelated : 'Mostrar vídeos sugeridos ao final do vídeo', + txtStartAt : 'Iniciar em (ss ou mm:ss ou hh:mm:ss)', + chkPrivacy : 'Ativar o modo de privacidade aprimorada', + chkOlderCode : 'Usar código de incorporação antigo', + chkAutoplay : 'Reproduzir automaticamente', + noCode : 'Você precisa informar um código embed ou uma URL', + invalidEmbed : 'O código informado não parece ser válido', + invalidUrl : 'A URL informada não parece ser válida', + or : 'ou', + noWidth : 'Você deve informar a largura do vídeo', + invalidWidth : 'Informe uma largura válida', + noHeight : 'Você deve informar a altura do vídeo', + invalidHeight : 'Informe uma altura válida', + invalidTime : 'O tempo informado é inválido' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/pt_1.js b/libraries/ckeditor/plugins/youtube/lang/pt_1.js new file mode 100644 index 0000000..2cfcfdd --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/pt_1.js @@ -0,0 +1,23 @@ +CKEDITOR.plugins.setLang('youtube', 'pt', { + button : 'Inserir Vídeo do Youtube', + title : 'Inserir Vídeo do Youtube', + txtEmbed : 'Cole aqui o código embed de um vídeo do Youtube', + txtUrl : 'Cole aqui uma URL de um vídeo do Youtube', + txtWidth : 'Largura', + txtHeight : 'Altura', + chkRelated : 'Mostrar vídeos sugeridos ao final do vídeo', + txtStartAt : 'Iniciar em (ss ou mm:ss ou hh:mm:ss)', + chkPrivacy : 'Ativar o modo de privacidade aprimorada', + chkOlderCode : 'Usar código de incorporação antigo', + chkAutoplay : 'Reproduzir automaticamente', + noCode : 'Você precisa informar um código embed ou uma URL', + invalidEmbed : 'O código informado não parece ser válido', + invalidUrl : 'A URL informada não parece ser válida', + or : 'ou', + noWidth : 'Você deve informar a largura do vídeo', + invalidWidth : 'Informe uma largura válida', + noHeight : 'Você deve informar a altura do vídeo', + invalidHeight : 'Informe uma altura válida', + invalidTime : 'O tempo informado é inválido', + txtResponsive : 'Vídeo responsivo' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/ru.js b/libraries/ckeditor/plugins/youtube/lang/ru.js new file mode 100644 index 0000000..ce4e19a --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/ru.js @@ -0,0 +1,22 @@ +CKEDITOR.plugins.setLang('youtube', 'ru', { + button : 'Вставить YouTube видео', + title : 'Вставить YouTube видео', + txtEmbed : 'Вставьте HTML-код сюда', + txtUrl : 'Вставьте адрес видео (URL)', + txtWidth : 'Ширина', + txtHeight : 'Высота', + chkRelated : 'Показать похожие видео после завершения просмотра', + txtStartAt : 'Начать с (сс или мм:сс или чч:мм:сс)', + chkPrivacy : 'Включить режим повышенной конфиденциальности', + chkOlderCode : 'Использовать старый код вставки', + chkAutoplay: 'Автозапуск', + noCode : 'Вы должны ввести HTML-код или адрес', + invalidEmbed : 'Ваш HTML-код не похож на правильный', + invalidUrl : 'Ваш адрес видео не похож на правильный', + or : 'или', + noWidth : 'Вы должны указать ширину', + invalidWidth : 'Укажите правильную ширину', + noHeight : 'Вы должны указать высоту', + invalidHeight : 'Укажите правильную высоту', + invalidTime : 'Укажите правильное время начала' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/ru_1.js b/libraries/ckeditor/plugins/youtube/lang/ru_1.js new file mode 100644 index 0000000..75efb95 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/ru_1.js @@ -0,0 +1,23 @@ +CKEDITOR.plugins.setLang('youtube', 'ru', { + button : 'Вставить YouTube видео', + title : 'Вставить YouTube видео', + txtEmbed : 'Вставьте HTML-код сюда', + txtUrl : 'Вставьте адрес видео (URL)', + txtWidth : 'Ширина', + txtHeight : 'Высота', + chkRelated : 'Показать похожие видео после завершения просмотра', + txtStartAt : 'Начать с (сс или мм:сс или чч:мм:сс)', + chkPrivacy : 'Включить режим повышенной конфиденциальности', + chkOlderCode : 'Использовать старый код вставки', + chkAutoplay: 'Автозапуск', + noCode : 'Вы должны ввести HTML-код или адрес', + invalidEmbed : 'Ваш HTML-код не похож на правильный', + invalidUrl : 'Ваш адрес видео не похож на правильный', + or : 'или', + noWidth : 'Вы должны указать ширину', + invalidWidth : 'Укажите правильную ширину', + noHeight : 'Вы должны указать высоту', + invalidHeight : 'Укажите правильную высоту', + invalidTime : 'Укажите правильное время начала', + txtResponsive : 'Растягиваемое видео' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/sk.js b/libraries/ckeditor/plugins/youtube/lang/sk.js new file mode 100644 index 0000000..e5e9103 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/sk.js @@ -0,0 +1,23 @@ +CKEDITOR.plugins.setLang('youtube', 'sk', { + button : 'Vložiť YouTube video', + title : 'Vložiť YouTube video', + txtEmbed : 'Vložiť Youtube Embed Video kódu', + txtUrl : 'Vložiť pomocou YouTube video URL', + txtWidth : 'Šírka', + txtHeight : 'Výška', + chkRelated : 'Zobraziť odporúčané videá po prehratí', + txtStartAt : 'Začať prehrávanie videa (ss alebo mm:ss alebo hh:mm:ss)', + chkPrivacy : 'Povoliť pokročilý mód súkromia', + chkOlderCode : 'Použiť starú metódu vkladania', + chkAutoplay: 'Automatické prehrávanie', + noCode : 'Musíte vložiť Youtube Embed kód alebo URL', + invalidEmbed : 'Vložený kód nie je valídny', + invalidUrl : 'Vložená URL nie je platná', + or : 'alebo', + noWidth : 'Prosím, zadajte šírku videa', + invalidWidth : 'Zadajte valídnu šírku videa', + noHeight : 'Prosím, zadajte výšku videa', + invalidHeight : 'Zadajte valídnu výšku videa', + invalidTime : 'Zadajte valídny formát začiatku prehrávania videa', + txtResponsive : 'Prispôsobit rozmery videa rozmerom obrazovky (ignoruje šírku a výšku, prispôsobí sa šírke obrazovky)' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/tr.js b/libraries/ckeditor/plugins/youtube/lang/tr.js new file mode 100644 index 0000000..c2505f2 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/tr.js @@ -0,0 +1,22 @@ +CKEDITOR.plugins.setLang('youtube', 'tr', { + button : 'Youtube Video Gömün (Embed)', + title : 'Youtube Video', + txtEmbed : 'Youtube gömülü kodu (embed) buraya yapıştırınız', + txtUrl : 'Youtube linkinizi buraya yapıştırınız', + txtWidth : 'Genişlik', + txtHeight : 'Yükseklik', + chkRelated : 'Önerilen videoları video bitiminde göster', + txtStartAt : 'Video başlangıç anı (ss ya da dd:ss ya da ss:dd:ss)', + chkPrivacy : 'Gizlilik modunu etkinleştir', + chkOlderCode : 'Eski gömülü kodu (embed) kullan', + chkAutoplay: 'Otomatik', + noCode : 'Gömülü kod (embed) veya url yapıştırmak zorundasınız', + invalidEmbed : 'Verdiğiniz gömülü kod (embed) ile video bulunamadı', + invalidUrl : 'Verdiğiniz linkte video bulunamadı', + or : 'ya da', + noWidth : 'Genişliği belirtmek zorundasınız', + invalidWidth : 'Bir genişlik belirtin', + noHeight : 'Yükseliği belirtmek zorundasınız', + invalidHeight : 'Yükseklik belirtin', + invalidTime : 'Başlangıç anını doğru girin, örneğin: 13 (13. saniye) ya da 12:25 (12. dakika 25. saniye) ya da 01.25.33 (1 saat 25 dakika 33 saniye)' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/tr_1.js b/libraries/ckeditor/plugins/youtube/lang/tr_1.js new file mode 100644 index 0000000..66f6e37 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/tr_1.js @@ -0,0 +1,23 @@ +CKEDITOR.plugins.setLang('youtube', 'tr', { + button : 'Youtube Video Gömün (Embed)', + title : 'Youtube Video', + txtEmbed : 'Youtube gömülü kodu (embed) buraya yapıştırınız', + txtUrl : 'Youtube linkinizi buraya yapıştırınız', + txtWidth : 'Genişlik', + txtHeight : 'Yükseklik', + chkRelated : 'Önerilen videoları video bitiminde göster', + txtStartAt : 'Video başlangıç anı (ss ya da dd:ss ya da ss:dd:ss)', + chkPrivacy : 'Gizlilik modunu etkinleştir', + chkOlderCode : 'Eski gömülü kodu (embed) kullan', + chkAutoplay: 'Otomatik', + noCode : 'Gömülü kod (embed) veya url yapıştırmak zorundasınız', + invalidEmbed : 'Verdiğiniz gömülü kod (embed) ile video bulunamadı', + invalidUrl : 'Verdiğiniz linkte video bulunamadı', + or : 'ya da', + noWidth : 'Genişliği belirtmek zorundasınız', + invalidWidth : 'Bir genişlik belirtin', + noHeight : 'Yükseliği belirtmek zorundasınız', + invalidHeight : 'Yükseklik belirtin', + invalidTime : 'Başlangıç anını doğru girin, örneğin: 13 (13. saniye) ya da 12:25 (12. dakika 25. saniye) ya da 01.25.33 (1 saat 25 dakika 33 saniye)', + txtResponsive : 'Responsive video' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/vi.js b/libraries/ckeditor/plugins/youtube/lang/vi.js new file mode 100644 index 0000000..163fb32 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/vi.js @@ -0,0 +1,22 @@ +CKEDITOR.plugins.setLang('youtube', 'vi', { + button : 'Embed Youtube Video', + title : 'Nhúng Video Youtube', + txtEmbed : 'Dãn mã nhúng Embed vào đây', + txtUrl : 'Dãn đường dẫn video Youtube', + txtWidth : 'Rộng', + txtHeight : 'Cao', + chkRelated : 'Hiển thị các video được đề xuất khi video kết thúc', + txtStartAt : 'Bắt đầu (ss hoặc mm:ss hoặc hh:mm:ss)', + chkPrivacy : 'Kích hoạt chế độ bảo mật nâng cao', + chkOlderCode : 'Sử dụng mã nhúng cũ', + chkAutoplay: 'Tự động chạy video', + noCode : 'Bạn phải nhập mã nhúng hoặc URL', + invalidEmbed : 'Mã nhúng bạn đã nhập không đúng', + invalidUrl : 'URL bạn đã nhập không đúng', + or : 'hoặc', + noWidth : 'Bạn phải chiều rộng', + invalidWidth : 'Chiều rộng hợp lệ', + noHeight : 'Bạn phải chiều cao', + invalidHeight : 'Chiều cao hợp lệ', + invalidTime : 'Thời gian bắt đầu không đúng' +}); \ No newline at end of file diff --git a/libraries/ckeditor/plugins/youtube/lang/vi_1.js b/libraries/ckeditor/plugins/youtube/lang/vi_1.js new file mode 100644 index 0000000..3b640d6 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/vi_1.js @@ -0,0 +1,23 @@ +CKEDITOR.plugins.setLang('youtube', 'vi', { + button : 'Embed Youtube Video', + title : 'Nhúng Video Youtube', + txtEmbed : 'Dãn mã nhúng Embed vào đây', + txtUrl : 'Dãn đường dẫn video Youtube', + txtWidth : 'Rộng', + txtHeight : 'Cao', + chkRelated : 'Hiển thị các video được đề xuất khi video kết thúc', + txtStartAt : 'Bắt đầu (ss hoặc mm:ss hoặc hh:mm:ss)', + chkPrivacy : 'Kích hoạt chế độ bảo mật nâng cao', + chkOlderCode : 'Sử dụng mã nhúng cũ', + chkAutoplay: 'Tự động chạy video', + noCode : 'Bạn phải nhập mã nhúng hoặc URL', + invalidEmbed : 'Mã nhúng bạn đã nhập không đúng', + invalidUrl : 'URL bạn đã nhập không đúng', + or : 'hoặc', + noWidth : 'Bạn phải chiều rộng', + invalidWidth : 'Chiều rộng hợp lệ', + noHeight : 'Bạn phải chiều cao', + invalidHeight : 'Chiều cao hợp lệ', + invalidTime : 'Thời gian bắt đầu không đúng', + txtResponsive : 'Responsive video' +}); diff --git a/libraries/ckeditor/plugins/youtube/lang/zh.js b/libraries/ckeditor/plugins/youtube/lang/zh.js new file mode 100644 index 0000000..19913ed --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/lang/zh.js @@ -0,0 +1,23 @@ +CKEDITOR.plugins.setLang('youtube', 'zh', { + button: '嵌入 Youtube 影片', + title: '嵌入 Youtube 影片', + txtEmbed: '貼上嵌入碼', + txtUrl: '貼上 Youtube 影片 URL', + txtWidth: '寬', + txtHeight: '高', + txtResponsive: '使用自適應縮放模式 (忽略設定的長寬, 以寬為基準縮放)', + chkRelated: '影片結束時顯示建議影片', + txtStartAt: '開始時間 (ss or mm:ss or hh:mm:ss)', + chkPrivacy: '啟用加強隱私模式', + chkOlderCode: '使用舊的嵌入碼', + chkAutoplay: '自動播放', + noCode: '必須輸入嵌入碼', + invalidEmbed: '錯誤的嵌入碼', + invalidUrl: '錯誤的URL', + or: '或', + noWidth: '必須設定寬', + invalidWidth: '寬設定錯誤', + noHeight: '必須設定高', + invalidHeight: '高設定錯誤', + invalidTime: '開始時間設定錯誤' +}); diff --git a/libraries/ckeditor/plugins/youtube/plugin.js b/libraries/ckeditor/plugins/youtube/plugin.js new file mode 100644 index 0000000..133beba --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/plugin.js @@ -0,0 +1,364 @@ +/* +* Youtube Embed Plugin +* +* @author Jonnas Fonini +* @version 1.0.10 +*/ +( function() { + CKEDITOR.plugins.add( 'youtube', + { + lang: [ 'en', 'pt', 'ja', 'hu', 'it', 'fr', 'tr', 'ru', 'de', 'ar', 'nl', 'pl', 'vi'], + init: function( editor ) + { + editor.addCommand( 'youtube', new CKEDITOR.dialogCommand( 'youtube', { + allowedContent: 'iframe[!width,!height,!src,!frameborder,!allowfullscreen]; object param[*]' + })); + + editor.ui.addButton( 'Youtube', + { + label : editor.lang.youtube.button, + toolbar : 'insert', + command : 'youtube', + icon : this.path + 'images/icon.png' + }); + + CKEDITOR.dialog.add( 'youtube', function ( instance ) + { + var video; + + return { + title : editor.lang.youtube.title, + minWidth : 500, + minHeight : 200, + contents : + [{ + id : 'youtubePlugin', + expand : true, + elements : + [{ + id : 'txtEmbed', + type : 'textarea', + label : editor.lang.youtube.txtEmbed, + autofocus : 'autofocus', + onChange : function ( api ) + { + handleEmbedChange( this, api ); + }, + onKeyUp : function ( api ) + { + handleEmbedChange( this, api ); + }, + validate : function () + { + if ( this.isEnabled() ) + { + if ( !this.getValue() ) + { + alert( editor.lang.youtube.noCode ); + return false; + } + else + if ( this.getValue().length === 0 || this.getValue().indexOf( '//' ) === -1 ) + { + alert( editor.lang.youtube.invalidEmbed ); + return false; + } + } + } + }, + { + type : 'html', + html : editor.lang.youtube.or + '
    ' + }, + { + type : 'hbox', + widths : [ '70%', '15%', '15%' ], + children : + [ + { + id : 'txtUrl', + type : 'text', + label : editor.lang.youtube.txtUrl, + onChange : function ( api ) + { + handleLinkChange( this, api ); + }, + onKeyUp : function ( api ) + { + handleLinkChange( this, api ); + }, + validate : function () + { + if ( this.isEnabled() ) + { + if ( !this.getValue() ) + { + alert( editor.lang.youtube.noCode ); + return false; + } + else{ + video = ytVidId(this.getValue()); + + if ( this.getValue().length === 0 || video === false) + { + alert( editor.lang.youtube.invalidUrl ); + return false; + } + } + } + } + }, + { + type : 'text', + id : 'txtWidth', + width : '60px', + label : editor.lang.youtube.txtWidth, + 'default' : editor.config.youtube_width != null ? editor.config.youtube_width : '640', + validate : function () + { + if ( this.getValue() ) + { + var width = parseInt ( this.getValue() ) || 0; + + if ( width === 0 ) + { + alert( editor.lang.youtube.invalidWidth ); + return false; + } + } + else { + alert( editor.lang.youtube.noWidth ); + return false; + } + } + }, + { + type : 'text', + id : 'txtHeight', + width : '60px', + label : editor.lang.youtube.txtHeight, + 'default' : editor.config.youtube_height != null ? editor.config.youtube_height : '360', + validate : function () + { + if ( this.getValue() ) + { + var height = parseInt ( this.getValue() ) || 0; + + if ( height === 0 ) + { + alert( editor.lang.youtube.invalidHeight ); + return false; + } + } + else { + alert( editor.lang.youtube.noHeight ); + return false; + } + } + } + ] + }, + { + type : 'hbox', + widths : [ '55%', '45%' ], + children : + [ + { + id : 'chkRelated', + type : 'checkbox', + 'default' : editor.config.youtube_related != null ? editor.config.youtube_related : true, + label : editor.lang.youtube.chkRelated + }, + { + id : 'chkOlderCode', + type : 'checkbox', + 'default' : editor.config.youtube_older != null ? editor.config.youtube_older : false, + label : editor.lang.youtube.chkOlderCode + } + ] + }, + { + type : 'hbox', + widths : [ '55%', '45%' ], + children : + [ + { + id : 'chkPrivacy', + type : 'checkbox', + label : editor.lang.youtube.chkPrivacy, + 'default' : editor.config.youtube_privacy != null ? editor.config.youtube_privacy : false + }, + { + id : 'chkAutoplay', + type : 'checkbox', + 'default' : editor.config.youtube_autoplay != null ? editor.config.youtube_autoplay : false, + label : editor.lang.youtube.chkAutoplay + } + ] + }, + { + type : 'hbox', + widths : [ '45%', '55%'], + children : + [ + { + id : 'txtStartAt', + type : 'text', + label : editor.lang.youtube.txtStartAt, + validate : function () + { + if ( this.getValue() ) + { + var str = this.getValue(); + + if ( !/^(?:(?:([01]?\d|2[0-3]):)?([0-5]?\d):)?([0-5]?\d)$/i.test( str ) ) + { + alert( editor.lang.youtube.invalidTime ); + return false; + } + } + } + }, + { + id: 'empty', + type: 'html', + html: '' + } + ] + } + ] + } + ], + onOk: function() + { + var content = ''; + + if ( this.getContentElement( 'youtubePlugin', 'txtEmbed' ).isEnabled() ) + { + content = this.getValueOf( 'youtubePlugin', 'txtEmbed' ); + } + else { + var url = '//', params = [], startSecs; + var width = this.getValueOf( 'youtubePlugin', 'txtWidth' ); + var height = this.getValueOf( 'youtubePlugin', 'txtHeight' ); + + if ( this.getContentElement( 'youtubePlugin', 'chkPrivacy' ).getValue() === true ) + { + url += 'www.youtube-nocookie.com/'; + } + else { + url += 'www.youtube.com/'; + } + + url += 'embed/' + video; + + if ( this.getContentElement( 'youtubePlugin', 'chkRelated' ).getValue() === false ) + { + params.push('rel=0'); + } + + if ( this.getContentElement( 'youtubePlugin', 'chkAutoplay' ).getValue() === true ) + { + params.push('autoplay=1'); + } + + startSecs = this.getValueOf( 'youtubePlugin', 'txtStartAt' ); + if ( startSecs ){ + var seconds = hmsToSeconds( startSecs ); + + params.push('start=' + seconds); + } + + if ( params.length > 0 ) + { + url = url + '?' + params.join( '&' ); + } + + if ( this.getContentElement( 'youtubePlugin', 'chkOlderCode' ).getValue() === true ) + { + url = url.replace('embed/', 'v/'); + url = url.replace(/&/g, '&'); + + if ( url.indexOf('?')== -1 ) + { + url += '?'; + } + else { + url += '&'; + } + url += 'hl=pt_BR&version=3'; + + content = ''; + content += ''; + content += ''; + content += ''; + content += ' 0 ) + { + el.getDialog().getContentElement( 'youtubePlugin', 'txtEmbed' ).disable(); + } + else { + el.getDialog().getContentElement( 'youtubePlugin', 'txtEmbed' ).enable(); + } +} + +function handleEmbedChange( el, api ) +{ + if ( el.getValue().length > 0 ) + { + el.getDialog().getContentElement( 'youtubePlugin', 'txtUrl' ).disable(); + } + else { + el.getDialog().getContentElement( 'youtubePlugin', 'txtUrl' ).enable(); + } +} + + +/** + * JavaScript function to match (and return) the video Id + * of any valid Youtube Url, given as input string. + * @author: Stephan Schmitz + * @url: http://stackoverflow.com/a/10315969/624466 + */ +function ytVidId( url ) +{ + var p = /^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/; + return ( url.match( p ) ) ? RegExp.$1 : false; +} + +/** + * Converts time in hms format to seconds only + */ +function hmsToSeconds( time ) +{ + var arr = time.split(':'), s = 0, m = 1; + + while (arr.length > 0) + { + s += m * parseInt(arr.pop(), 10); + m *= 60; + } + + return s; +} diff --git a/libraries/ckeditor/plugins/youtube/plugin_1.js b/libraries/ckeditor/plugins/youtube/plugin_1.js new file mode 100644 index 0000000..658fd05 --- /dev/null +++ b/libraries/ckeditor/plugins/youtube/plugin_1.js @@ -0,0 +1,388 @@ +/* +* Youtube Embed Plugin +* +* @author Jonnas Fonini +* @version 2.0.9 +*/ +( function() { + CKEDITOR.plugins.add( 'youtube', + { + lang: [ 'en', 'pt', 'ja', 'hu', 'it', 'fr', 'tr', 'ru', 'de', 'ar', 'nl', 'pl', 'vi', 'zh', 'el', 'he', 'es', 'nb', 'nn', 'fi', 'et', 'sk', 'cs'], + init: function( editor ) + { + editor.addCommand( 'youtube', new CKEDITOR.dialogCommand( 'youtube', { + allowedContent: 'div{*}; iframe{*}[!width,!height,!src,!frameborder,!allowfullscreen]; object param[*]' + })); + + editor.ui.addButton( 'Youtube', + { + label : editor.lang.youtube.button, + toolbar : 'insert', + command : 'youtube', + icon : this.path + 'images/icon.png' + }); + + CKEDITOR.dialog.add( 'youtube', function ( instance ) + { + var video; + + return { + title : editor.lang.youtube.title, + minWidth : 500, + minHeight : 200, + contents : + [{ + id : 'youtubePlugin', + expand : true, + elements : + [{ + id : 'txtEmbed', + type : 'textarea', + label : editor.lang.youtube.txtEmbed, + autofocus : 'autofocus', + onChange : function ( api ) + { + handleEmbedChange( this, api ); + }, + onKeyUp : function ( api ) + { + handleEmbedChange( this, api ); + }, + validate : function () + { + if ( this.isEnabled() ) + { + if ( !this.getValue() ) + { + alert( editor.lang.youtube.noCode ); + return false; + } + else + if ( this.getValue().length === 0 || this.getValue().indexOf( '//' ) === -1 ) + { + alert( editor.lang.youtube.invalidEmbed ); + return false; + } + } + } + }, + { + type : 'html', + html : editor.lang.youtube.or + '
    ' + }, + { + type : 'hbox', + widths : [ '70%', '15%', '15%' ], + children : + [ + { + id : 'txtUrl', + type : 'text', + label : editor.lang.youtube.txtUrl, + onChange : function ( api ) + { + handleLinkChange( this, api ); + }, + onKeyUp : function ( api ) + { + handleLinkChange( this, api ); + }, + validate : function () + { + if ( this.isEnabled() ) + { + if ( !this.getValue() ) + { + alert( editor.lang.youtube.noCode ); + return false; + } + else{ + video = ytVidId(this.getValue()); + + if ( this.getValue().length === 0 || video === false) + { + alert( editor.lang.youtube.invalidUrl ); + return false; + } + } + } + } + }, + { + type : 'text', + id : 'txtWidth', + width : '60px', + label : editor.lang.youtube.txtWidth, + 'default' : editor.config.youtube_width != null ? editor.config.youtube_width : '640', + validate : function () + { + if ( this.getValue() ) + { + var width = parseInt ( this.getValue() ) || 0; + + if ( width === 0 ) + { + alert( editor.lang.youtube.invalidWidth ); + return false; + } + } + else { + alert( editor.lang.youtube.noWidth ); + return false; + } + } + }, + { + type : 'text', + id : 'txtHeight', + width : '60px', + label : editor.lang.youtube.txtHeight, + 'default' : editor.config.youtube_height != null ? editor.config.youtube_height : '360', + validate : function () + { + if ( this.getValue() ) + { + var height = parseInt ( this.getValue() ) || 0; + + if ( height === 0 ) + { + alert( editor.lang.youtube.invalidHeight ); + return false; + } + } + else { + alert( editor.lang.youtube.noHeight ); + return false; + } + } + } + ] + }, + { + type : 'hbox', + widths : [ '100%' ], + children : + [ + { + id : 'chkResponsive', + type : 'checkbox', + label : editor.lang.youtube.txtResponsive, + 'default' : editor.config.youtube_responsive != null ? editor.config.youtube_responsive : false + } + ] + }, + { + type : 'hbox', + widths : [ '55%', '45%' ], + children : + [ + { + id : 'chkRelated', + type : 'checkbox', + 'default' : editor.config.youtube_related != null ? editor.config.youtube_related : true, + label : editor.lang.youtube.chkRelated + }, + { + id : 'chkOlderCode', + type : 'checkbox', + 'default' : editor.config.youtube_older != null ? editor.config.youtube_older : false, + label : editor.lang.youtube.chkOlderCode + } + ] + }, + { + type : 'hbox', + widths : [ '55%', '45%' ], + children : + [ + { + id : 'chkPrivacy', + type : 'checkbox', + label : editor.lang.youtube.chkPrivacy, + 'default' : editor.config.youtube_privacy != null ? editor.config.youtube_privacy : false + }, + { + id : 'chkAutoplay', + type : 'checkbox', + 'default' : editor.config.youtube_autoplay != null ? editor.config.youtube_autoplay : false, + label : editor.lang.youtube.chkAutoplay + } + ] + }, + { + type : 'hbox', + widths : [ '55%', '45%'], + children : + [ + { + id : 'txtStartAt', + type : 'text', + label : editor.lang.youtube.txtStartAt, + validate : function () + { + if ( this.getValue() ) + { + var str = this.getValue(); + + if ( !/^(?:(?:([01]?\d|2[0-3]):)?([0-5]?\d):)?([0-5]?\d)$/i.test( str ) ) + { + alert( editor.lang.youtube.invalidTime ); + return false; + } + } + } + }, + { + id: 'empty', + type: 'html', + html: '' + } + ] + } + ] + } + ], + onOk: function() + { + var content = ''; + var responsiveStyle=''; + + if ( this.getContentElement( 'youtubePlugin', 'txtEmbed' ).isEnabled() ) + { + content = this.getValueOf( 'youtubePlugin', 'txtEmbed' ); + } + else { + var url = '//', params = [], startSecs; + var width = this.getValueOf( 'youtubePlugin', 'txtWidth' ); + var height = this.getValueOf( 'youtubePlugin', 'txtHeight' ); + + if ( this.getContentElement( 'youtubePlugin', 'chkPrivacy' ).getValue() === true ) + { + url += 'www.youtube-nocookie.com/'; + } + else { + url += 'www.youtube.com/'; + } + + url += 'embed/' + video; + + if ( this.getContentElement( 'youtubePlugin', 'chkRelated' ).getValue() === false ) + { + params.push('rel=0'); + } + + if ( this.getContentElement( 'youtubePlugin', 'chkAutoplay' ).getValue() === true ) + { + params.push('autoplay=1'); + } + + startSecs = this.getValueOf( 'youtubePlugin', 'txtStartAt' ); + if ( startSecs ){ + var seconds = hmsToSeconds( startSecs ); + + params.push('start=' + seconds); + } + + if ( params.length > 0 ) + { + url = url + '?' + params.join( '&' ); + } + + if ( this.getContentElement( 'youtubePlugin', 'chkResponsive').getValue() === true ) { + content += '
    '; + responsiveStyle = 'style="position: absolute;top: 0;left: 0;width: 100%;height: 100%;"'; + } + + if ( this.getContentElement( 'youtubePlugin', 'chkOlderCode' ).getValue() === true ) + { + url = url.replace('embed/', 'v/'); + url = url.replace(/&/g, '&'); + + if ( url.indexOf('?') === -1 ) + { + url += '?'; + } + else { + url += '&'; + } + url += 'hl=' + (this.getParentEditor().config.language ? this.getParentEditor().config.language : 'en') + '&version=3'; + + content += ''; + content += ''; + content += ''; + content += ''; + content += ' 0 ) + { + el.getDialog().getContentElement( 'youtubePlugin', 'txtEmbed' ).disable(); + } + else { + el.getDialog().getContentElement( 'youtubePlugin', 'txtEmbed' ).enable(); + } +} + +function handleEmbedChange( el, api ) +{ + if ( el.getValue().length > 0 ) + { + el.getDialog().getContentElement( 'youtubePlugin', 'txtUrl' ).disable(); + } + else { + el.getDialog().getContentElement( 'youtubePlugin', 'txtUrl' ).enable(); + } +} + + +/** + * JavaScript function to match (and return) the video Id + * of any valid Youtube Url, given as input string. + * @author: Stephan Schmitz + * @url: http://stackoverflow.com/a/10315969/624466 + */ +function ytVidId( url ) +{ + var p = /^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/; + return ( url.match( p ) ) ? RegExp.$1 : false; +} + +/** + * Converts time in hms format to seconds only + */ +function hmsToSeconds( time ) +{ + var arr = time.split(':'), s = 0, m = 1; + + while (arr.length > 0) + { + s += m * parseInt(arr.pop(), 10); + m *= 60; + } + + return s; +} diff --git a/libraries/ckeditor/skins/moono-lisa/dialog.css b/libraries/ckeditor/skins/moono-lisa/dialog.css new file mode 100644 index 0000000..4806c2b --- /dev/null +++ b/libraries/ckeditor/skins/moono-lisa/dialog.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +.cke_dialog{visibility:visible}.cke_dialog_body{z-index:1;background:#fff}.cke_dialog strong{font-weight:bold}.cke_dialog_title{font-weight:bold;font-size:12px;cursor:move;position:relative;color:#484848;border-bottom:1px solid #d1d1d1;padding:12px 19px 12px 12px;background:#f8f8f8;letter-spacing:.3px}.cke_dialog_spinner{border-radius:50%;width:12px;height:12px;overflow:hidden;text-indent:-9999em;border:2px solid rgba(102,102,102,0.2);border-left-color:rgba(102,102,102,1);-webkit-animation:dialog_spinner 1s infinite linear;animation:dialog_spinner 1s infinite linear}.cke_browser_ie8 .cke_dialog_spinner,.cke_browser_ie9 .cke_dialog_spinner{background:url(images/spinner.gif) center top no-repeat;width:16px;height:16px;border:0}@-webkit-keyframes dialog_spinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes dialog_spinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.cke_dialog_contents{background-color:#fff;overflow:auto;padding:15px 10px 5px 10px;margin-top:43px;border-top:1px solid #d1d1d1}.cke_dialog_contents_body{overflow:auto;padding:9px 10px 5px 10px;margin-top:22px}.cke_dialog_footer{text-align:right;position:relative;border-top:1px solid #d1d1d1;background:#f8f8f8}.cke_rtl .cke_dialog_footer{text-align:left}.cke_hc .cke_dialog_footer{outline:0;border-top:1px solid #fff}.cke_dialog .cke_resizer{margin-top:22px}.cke_dialog .cke_resizer_rtl{margin-left:5px}.cke_dialog .cke_resizer_ltr{margin-right:5px}.cke_dialog_tabs{height:33px;display:inline-block;margin:9px 0 0;position:absolute;z-index:2;left:11px}.cke_rtl .cke_dialog_tabs{left:auto;right:11px}a.cke_dialog_tab{height:25px;padding:4px 8px;display:inline-block;cursor:pointer;line-height:26px;outline:0;color:#484848;border:1px solid #d1d1d1;border-radius:3px 3px 0 0;background:#f8f8f8;min-width:90px;text-align:center;margin-left:-1px;letter-spacing:.3px}a.cke_dialog_tab:hover{background-color:#fff}a.cke_dialog_tab:focus{border:2px solid #139ff7;border-bottom-color:#d1d1d1;padding:3px 7px;position:relative;z-index:1}a.cke_dialog_tab_selected{background:#fff;border-bottom-color:#fff;cursor:default;filter:none}a.cke_dialog_tab_selected:hover,a.cke_dialog_tab_selected:focus{border-bottom-color:#fff}.cke_hc a.cke_dialog_tab:hover,.cke_hc a.cke_dialog_tab:focus,.cke_hc a.cke_dialog_tab_selected{border:3px solid;padding:2px 6px}a.cke_dialog_tab_disabled{color:#bababa;cursor:default}.cke_single_page .cke_dialog_tabs{display:none}.cke_single_page .cke_dialog_contents{padding-top:5px;margin-top:0;border-top:0}a.cke_dialog_close_button{background-image:url(images/close.png);background-repeat:no-repeat;background-position:50%;position:absolute;cursor:pointer;text-align:center;height:16px;width:16px;top:11px;z-index:5;opacity:.7;filter:alpha(opacity = 70)}.cke_rtl .cke_dialog_close_button{left:12px}.cke_ltr .cke_dialog_close_button{right:12px}.cke_hc a.cke_dialog_close_button{background-image:none}.cke_hidpi a.cke_dialog_close_button{background-image:url(images/hidpi/close.png);background-size:16px}a.cke_dialog_close_button:hover{opacity:1;filter:alpha(opacity = 100)}a.cke_dialog_close_button span{display:none}.cke_hc a.cke_dialog_close_button span{display:inline;cursor:pointer;font-weight:bold;position:relative;top:3px}div.cke_disabled .cke_dialog_ui_labeled_content div *{background-color:#ddd;cursor:default}.cke_dialog_ui_vbox table,.cke_dialog_ui_hbox table{margin:auto}.cke_dialog_ui_vbox_child{padding:5px 0}.cke_dialog_ui_hbox{width:100%;margin-top:12px}.cke_dialog_ui_hbox_first,.cke_dialog_ui_hbox_child,.cke_dialog_ui_hbox_last{vertical-align:top}.cke_ltr .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_ui_hbox_child{padding-right:10px}.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_child{padding-left:10px}.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-right:5px}.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-left:5px;padding-right:0}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:1px solid}textarea.cke_dialog_ui_input_textarea{overflow:auto;resize:none}input.cke_dialog_ui_input_text,input.cke_dialog_ui_input_password,textarea.cke_dialog_ui_input_textarea{background-color:#fff;border:1px solid #bcbcbc;padding:4px 6px;outline:0;width:100%;*width:95%;box-sizing:border-box;border-radius:2px;min-height:28px;margin-left:1px}input.cke_dialog_ui_input_text:hover,input.cke_dialog_ui_input_password:hover,textarea.cke_dialog_ui_input_textarea:hover{border:1px solid #aeb3b9}input.cke_dialog_ui_input_text:focus,input.cke_dialog_ui_input_password:focus,textarea.cke_dialog_ui_input_textarea:focus,select.cke_dialog_ui_input_select:focus{outline:0;border:2px solid #139ff7}input.cke_dialog_ui_input_text:focus{padding-left:5px}textarea.cke_dialog_ui_input_textarea:focus{padding:3px 5px}select.cke_dialog_ui_input_select:focus{margin:0;width:100%!important}input.cke_dialog_ui_checkbox_input,input.cke_dialog_ui_radio_input{margin-left:1px;margin-right:2px}input.cke_dialog_ui_checkbox_input:focus,input.cke_dialog_ui_checkbox_input:active,input.cke_dialog_ui_radio_input:focus,input.cke_dialog_ui_radio_input:active{border:0;outline:2px solid #139ff7}a.cke_dialog_ui_button{display:inline-block;*display:inline;*zoom:1;padding:4px 1px;margin:0;text-align:center;color:#484848;vertical-align:middle;cursor:pointer;border:1px solid #bcbcbc;border-radius:2px;background:#f8f8f8;letter-spacing:.3px;line-height:18px;box-sizing:border-box}.cke_hc a.cke_dialog_ui_button{border-width:3px}span.cke_dialog_ui_button{padding:0 10px;cursor:pointer}a.cke_dialog_ui_button:hover{background:#fff}a.cke_dialog_ui_button:focus,a.cke_dialog_ui_button:active{border:2px solid #139ff7;outline:0;padding:3px 0}.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button:focus,.cke_hc a.cke_dialog_ui_button:active{border:3px solid}.cke_dialog_footer_buttons a.cke_dialog_ui_button span{color:inherit;font-size:12px;font-weight:bold;padding:0 12px}a.cke_dialog_ui_button_ok{color:#fff;background:#09863e;border:1px solid #09863e}.cke_hc a.cke_dialog_ui_button{border:3px solid #bcbcbc}a.cke_dialog_ui_button_ok:hover{background:#53aa78;border-color:#53aa78}a.cke_dialog_ui_button_ok:focus{box-shadow:inset 0 0 0 2px #FFF}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active{border-color:#139ff7}.cke_hc a.cke_dialog_ui_button_ok:hover,.cke_hc a.cke_dialog_ui_button_ok:focus,.cke_hc a.cke_dialog_ui_button_ok:active{border-color:#484848}a.cke_dialog_ui_button_ok.cke_disabled{background:#d1d1d1;border-color:#d1d1d1;cursor:default}a.cke_dialog_ui_button_ok.cke_disabled span{cursor:default}.cke_dialog_footer_buttons{display:inline-table;margin:5px;width:auto;position:relative;vertical-align:middle}div.cke_dialog_ui_input_select{display:table}select.cke_dialog_ui_input_select{height:28px;line-height:28px;background-color:#fff;border:1px solid #bcbcbc;padding:3px 3px 3px 6px;outline:0;border-radius:2px;margin:0 1px;box-sizing:border-box;width:calc(100% - 2px)!important}.cke_dialog_ui_input_file{width:100%;height:25px}.cke_hc .cke_dialog_ui_labeled_content input:focus,.cke_hc .cke_dialog_ui_labeled_content select:focus,.cke_hc .cke_dialog_ui_labeled_content textarea:focus{outline:1px dotted}.cke_dialog_ui_labeled_label{margin-left:1px}.cke_dialog .cke_dark_background{background-color:transparent}.cke_dialog .cke_light_background{background-color:#ebebeb}.cke_dialog .cke_centered{text-align:center}.cke_dialog a.cke_btn_reset{float:right;background:url(images/refresh.png) top left no-repeat;width:16px;height:16px;border:1px none;font-size:1px}.cke_hidpi .cke_dialog a.cke_btn_reset{background-size:16px;background-image:url(images/hidpi/refresh.png)}.cke_rtl .cke_dialog a.cke_btn_reset{float:left}.cke_dialog a.cke_btn_locked,.cke_dialog a.cke_btn_unlocked{float:left;width:16px;height:16px;background-repeat:no-repeat;border:none 1px;font-size:1px}.cke_dialog a.cke_btn_locked,.cke_dialog a.cke_btn_unlocked,.cke_dialog a.cke_btn_reset{margin:2px}.cke_dialog a.cke_btn_locked{background-image:url(images/lock.png)}.cke_dialog a.cke_btn_unlocked{background-image:url(images/lock-open.png)}.cke_rtl .cke_dialog a.cke_btn_locked,.cke_rtl .cke_dialog a.cke_btn_unlocked{float:right}.cke_hidpi .cke_dialog a.cke_btn_unlocked,.cke_hidpi .cke_dialog a.cke_btn_locked{background-size:16px}.cke_hidpi .cke_dialog a.cke_btn_locked{background-image:url(images/hidpi/lock.png)}.cke_hidpi .cke_dialog a.cke_btn_unlocked{background-image:url(images/hidpi/lock-open.png)}.cke_dialog a.cke_btn_locked .cke_icon{display:none}.cke_dialog a.cke_btn_over,.cke_dialog a.cke_btn_locked:hover,.cke_dialog a.cke_btn_locked:focus,.cke_dialog a.cke_btn_locked:active,.cke_dialog a.cke_btn_unlocked:hover,.cke_dialog a.cke_btn_unlocked:focus,.cke_dialog a.cke_btn_unlocked:active,.cke_dialog a.cke_btn_reset:hover,.cke_dialog a.cke_btn_reset:focus,.cke_dialog a.cke_btn_reset:active{cursor:pointer;outline:0;margin:0;border:2px solid #139ff7}.cke_dialog fieldset{border:1px solid #bcbcbc}.cke_dialog fieldset legend{padding:0 6px}.cke_dialog_ui_checkbox,.cke_dialog fieldset .cke_dialog_ui_vbox .cke_dialog_ui_checkbox{display:inline-block}.cke_dialog fieldset .cke_dialog_ui_vbox .cke_dialog_ui_checkbox{padding-top:5px}.cke_dialog_ui_checkbox .cke_dialog_ui_checkbox_input,.cke_dialog_ui_checkbox .cke_dialog_ui_checkbox_input+label,.cke_dialog fieldset .cke_dialog_ui_vbox .cke_dialog_ui_checkbox .cke_dialog_ui_checkbox_input,.cke_dialog fieldset .cke_dialog_ui_vbox .cke_dialog_ui_checkbox .cke_dialog_ui_checkbox_input+label{vertical-align:middle}.cke_dialog .ImagePreviewBox{border:1px ridge #bcbcbc;overflow:scroll;height:200px;width:300px;padding:2px;background-color:white}.cke_dialog .ImagePreviewBox table td{white-space:normal}.cke_dialog .ImagePreviewLoader{position:absolute;white-space:normal;overflow:hidden;height:160px;width:230px;margin:2px;padding:2px;opacity:.9;filter:alpha(opacity = 90);background-color:#e4e4e4}.cke_dialog .FlashPreviewBox{white-space:normal;border:1px solid #bcbcbc;overflow:auto;height:160px;width:390px;padding:2px;background-color:white}.cke_dialog .cke_pastetext{width:346px;height:170px}.cke_dialog .cke_pastetext textarea{width:340px;height:170px;resize:none}.cke_dialog iframe.cke_pasteframe{width:346px;height:130px;background-color:white;border:1px solid #aeb3b9;border-radius:3px}.cke_dialog .cke_hand{cursor:pointer}.cke_disabled{color:#a0a0a0}.cke_dialog_body .cke_label{display:none}.cke_dialog_body label{display:inline;cursor:default;letter-spacing:.3px}.cke_dialog_body label+.cke_dialog_ui_labeled_content{margin-top:2px}.cke_dialog_contents_body .cke_dialog_ui_text,.cke_dialog_contents_body .cke_dialog_ui_select,.cke_dialog_contents_body .cke_dialog_ui_hbox_last>a.cke_dialog_ui_button{margin-top:4px}a.cke_smile{overflow:hidden;display:block;text-align:center;padding:.3em 0}a.cke_smile img{vertical-align:middle}a.cke_specialchar{cursor:inherit;display:block;height:1.25em;padding:.2em .3em;text-align:center}a.cke_smile,a.cke_specialchar{border:2px solid transparent}a.cke_smile:hover,a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:hover,a.cke_specialchar:focus,a.cke_specialchar:active{background:#fff;outline:0}a.cke_smile:hover,a.cke_specialchar:hover{border-color:#888}a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:focus,a.cke_specialchar:active{border-color:#139ff7}.cke_dialog_contents a.colorChooser{display:block;margin-top:6px;margin-left:10px;width:80px}.cke_rtl .cke_dialog_contents a.colorChooser{margin-right:10px}.cke_iframe_shim{display:block;position:absolute;top:0;left:0;z-index:-1;filter:alpha(opacity = 0);width:100%;height:100%}.cke_dialog_contents_body .cke_accessibility_legend{margin:2px 7px 2px 2px}.cke_dialog_contents_body .cke_accessibility_legend:focus,.cke_dialog_contents_body .cke_accessibility_legend:active{outline:0;border:2px solid #139ff7;margin:0 5px 0 0}.cke_dialog_contents_body input[type=file]:focus,.cke_dialog_contents_body input[type=file]:active{border:2px solid #139ff7}.cke_dialog_find_fieldset{margin-top:10px!important}.cke_dialog_image_ratiolock{margin-top:52px!important}.cke_dialog_forms_select_order label.cke_dialog_ui_labeled_label{margin-left:0}.cke_dialog_forms_select_order div.cke_dialog_ui_input_select{width:100%}.cke_dialog_forms_select_order_txtsize .cke_dialog_ui_hbox_last{padding-top:4px}.cke_dialog_image_url .cke_dialog_ui_hbox_last,.cke_dialog_flash_url .cke_dialog_ui_hbox_last{vertical-align:bottom}a.cke_dialog_ui_button.cke_dialog_image_browse{margin-top:10px}.cke_dialog_contents_body .cke_tpl_list{border:#bcbcbc 1px solid;margin:1px}.cke_dialog_contents_body .cke_tpl_list:focus,.cke_dialog_contents_body .cke_tpl_list:active{outline:0;margin:0;border:2px solid #139ff7}.cke_dialog_contents_body .cke_tpl_list a:focus,.cke_dialog_contents_body .cke_tpl_list a:active{outline:0}.cke_dialog_contents_body .cke_tpl_list a:focus .cke_tpl_item,.cke_dialog_contents_body .cke_tpl_list a:active .cke_tpl_item{border:2px solid #139ff7;padding:6px} \ No newline at end of file diff --git a/libraries/ckeditor/skins/moono-lisa/dialog_ie.css b/libraries/ckeditor/skins/moono-lisa/dialog_ie.css new file mode 100644 index 0000000..a5522cc --- /dev/null +++ b/libraries/ckeditor/skins/moono-lisa/dialog_ie.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +.cke_dialog{visibility:visible}.cke_dialog_body{z-index:1;background:#fff}.cke_dialog strong{font-weight:bold}.cke_dialog_title{font-weight:bold;font-size:12px;cursor:move;position:relative;color:#484848;border-bottom:1px solid #d1d1d1;padding:12px 19px 12px 12px;background:#f8f8f8;letter-spacing:.3px}.cke_dialog_spinner{border-radius:50%;width:12px;height:12px;overflow:hidden;text-indent:-9999em;border:2px solid rgba(102,102,102,0.2);border-left-color:rgba(102,102,102,1);-webkit-animation:dialog_spinner 1s infinite linear;animation:dialog_spinner 1s infinite linear}.cke_browser_ie8 .cke_dialog_spinner,.cke_browser_ie9 .cke_dialog_spinner{background:url(images/spinner.gif) center top no-repeat;width:16px;height:16px;border:0}@-webkit-keyframes dialog_spinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes dialog_spinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.cke_dialog_contents{background-color:#fff;overflow:auto;padding:15px 10px 5px 10px;margin-top:43px;border-top:1px solid #d1d1d1}.cke_dialog_contents_body{overflow:auto;padding:9px 10px 5px 10px;margin-top:22px}.cke_dialog_footer{text-align:right;position:relative;border-top:1px solid #d1d1d1;background:#f8f8f8}.cke_rtl .cke_dialog_footer{text-align:left}.cke_hc .cke_dialog_footer{outline:0;border-top:1px solid #fff}.cke_dialog .cke_resizer{margin-top:22px}.cke_dialog .cke_resizer_rtl{margin-left:5px}.cke_dialog .cke_resizer_ltr{margin-right:5px}.cke_dialog_tabs{height:33px;display:inline-block;margin:9px 0 0;position:absolute;z-index:2;left:11px}.cke_rtl .cke_dialog_tabs{left:auto;right:11px}a.cke_dialog_tab{height:25px;padding:4px 8px;display:inline-block;cursor:pointer;line-height:26px;outline:0;color:#484848;border:1px solid #d1d1d1;border-radius:3px 3px 0 0;background:#f8f8f8;min-width:90px;text-align:center;margin-left:-1px;letter-spacing:.3px}a.cke_dialog_tab:hover{background-color:#fff}a.cke_dialog_tab:focus{border:2px solid #139ff7;border-bottom-color:#d1d1d1;padding:3px 7px;position:relative;z-index:1}a.cke_dialog_tab_selected{background:#fff;border-bottom-color:#fff;cursor:default;filter:none}a.cke_dialog_tab_selected:hover,a.cke_dialog_tab_selected:focus{border-bottom-color:#fff}.cke_hc a.cke_dialog_tab:hover,.cke_hc a.cke_dialog_tab:focus,.cke_hc a.cke_dialog_tab_selected{border:3px solid;padding:2px 6px}a.cke_dialog_tab_disabled{color:#bababa;cursor:default}.cke_single_page .cke_dialog_tabs{display:none}.cke_single_page .cke_dialog_contents{padding-top:5px;margin-top:0;border-top:0}a.cke_dialog_close_button{background-image:url(images/close.png);background-repeat:no-repeat;background-position:50%;position:absolute;cursor:pointer;text-align:center;height:16px;width:16px;top:11px;z-index:5;opacity:.7;filter:alpha(opacity = 70)}.cke_rtl .cke_dialog_close_button{left:12px}.cke_ltr .cke_dialog_close_button{right:12px}.cke_hc a.cke_dialog_close_button{background-image:none}.cke_hidpi a.cke_dialog_close_button{background-image:url(images/hidpi/close.png);background-size:16px}a.cke_dialog_close_button:hover{opacity:1;filter:alpha(opacity = 100)}a.cke_dialog_close_button span{display:none}.cke_hc a.cke_dialog_close_button span{display:inline;cursor:pointer;font-weight:bold;position:relative;top:3px}div.cke_disabled .cke_dialog_ui_labeled_content div *{background-color:#ddd;cursor:default}.cke_dialog_ui_vbox table,.cke_dialog_ui_hbox table{margin:auto}.cke_dialog_ui_vbox_child{padding:5px 0}.cke_dialog_ui_hbox{width:100%;margin-top:12px}.cke_dialog_ui_hbox_first,.cke_dialog_ui_hbox_child,.cke_dialog_ui_hbox_last{vertical-align:top}.cke_ltr .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_ui_hbox_child{padding-right:10px}.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_child{padding-left:10px}.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-right:5px}.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-left:5px;padding-right:0}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:1px solid}textarea.cke_dialog_ui_input_textarea{overflow:auto;resize:none}input.cke_dialog_ui_input_text,input.cke_dialog_ui_input_password,textarea.cke_dialog_ui_input_textarea{background-color:#fff;border:1px solid #bcbcbc;padding:4px 6px;outline:0;width:100%;*width:95%;box-sizing:border-box;border-radius:2px;min-height:28px;margin-left:1px}input.cke_dialog_ui_input_text:hover,input.cke_dialog_ui_input_password:hover,textarea.cke_dialog_ui_input_textarea:hover{border:1px solid #aeb3b9}input.cke_dialog_ui_input_text:focus,input.cke_dialog_ui_input_password:focus,textarea.cke_dialog_ui_input_textarea:focus,select.cke_dialog_ui_input_select:focus{outline:0;border:2px solid #139ff7}input.cke_dialog_ui_input_text:focus{padding-left:5px}textarea.cke_dialog_ui_input_textarea:focus{padding:3px 5px}select.cke_dialog_ui_input_select:focus{margin:0;width:100%!important}input.cke_dialog_ui_checkbox_input,input.cke_dialog_ui_radio_input{margin-left:1px;margin-right:2px}input.cke_dialog_ui_checkbox_input:focus,input.cke_dialog_ui_checkbox_input:active,input.cke_dialog_ui_radio_input:focus,input.cke_dialog_ui_radio_input:active{border:0;outline:2px solid #139ff7}a.cke_dialog_ui_button{display:inline-block;*display:inline;*zoom:1;padding:4px 1px;margin:0;text-align:center;color:#484848;vertical-align:middle;cursor:pointer;border:1px solid #bcbcbc;border-radius:2px;background:#f8f8f8;letter-spacing:.3px;line-height:18px;box-sizing:border-box}.cke_hc a.cke_dialog_ui_button{border-width:3px}span.cke_dialog_ui_button{padding:0 10px;cursor:pointer}a.cke_dialog_ui_button:hover{background:#fff}a.cke_dialog_ui_button:focus,a.cke_dialog_ui_button:active{border:2px solid #139ff7;outline:0;padding:3px 0}.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button:focus,.cke_hc a.cke_dialog_ui_button:active{border:3px solid}.cke_dialog_footer_buttons a.cke_dialog_ui_button span{color:inherit;font-size:12px;font-weight:bold;padding:0 12px}a.cke_dialog_ui_button_ok{color:#fff;background:#09863e;border:1px solid #09863e}.cke_hc a.cke_dialog_ui_button{border:3px solid #bcbcbc}a.cke_dialog_ui_button_ok:hover{background:#53aa78;border-color:#53aa78}a.cke_dialog_ui_button_ok:focus{box-shadow:inset 0 0 0 2px #FFF}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active{border-color:#139ff7}.cke_hc a.cke_dialog_ui_button_ok:hover,.cke_hc a.cke_dialog_ui_button_ok:focus,.cke_hc a.cke_dialog_ui_button_ok:active{border-color:#484848}a.cke_dialog_ui_button_ok.cke_disabled{background:#d1d1d1;border-color:#d1d1d1;cursor:default}a.cke_dialog_ui_button_ok.cke_disabled span{cursor:default}.cke_dialog_footer_buttons{display:inline-table;margin:5px;width:auto;position:relative;vertical-align:middle}div.cke_dialog_ui_input_select{display:table}select.cke_dialog_ui_input_select{height:28px;line-height:28px;background-color:#fff;border:1px solid #bcbcbc;padding:3px 3px 3px 6px;outline:0;border-radius:2px;margin:0 1px;box-sizing:border-box;width:calc(100% - 2px)!important}.cke_dialog_ui_input_file{width:100%;height:25px}.cke_hc .cke_dialog_ui_labeled_content input:focus,.cke_hc .cke_dialog_ui_labeled_content select:focus,.cke_hc .cke_dialog_ui_labeled_content textarea:focus{outline:1px dotted}.cke_dialog_ui_labeled_label{margin-left:1px}.cke_dialog .cke_dark_background{background-color:transparent}.cke_dialog .cke_light_background{background-color:#ebebeb}.cke_dialog .cke_centered{text-align:center}.cke_dialog a.cke_btn_reset{float:right;background:url(images/refresh.png) top left no-repeat;width:16px;height:16px;border:1px none;font-size:1px}.cke_hidpi .cke_dialog a.cke_btn_reset{background-size:16px;background-image:url(images/hidpi/refresh.png)}.cke_rtl .cke_dialog a.cke_btn_reset{float:left}.cke_dialog a.cke_btn_locked,.cke_dialog a.cke_btn_unlocked{float:left;width:16px;height:16px;background-repeat:no-repeat;border:none 1px;font-size:1px}.cke_dialog a.cke_btn_locked,.cke_dialog a.cke_btn_unlocked,.cke_dialog a.cke_btn_reset{margin:2px}.cke_dialog a.cke_btn_locked{background-image:url(images/lock.png)}.cke_dialog a.cke_btn_unlocked{background-image:url(images/lock-open.png)}.cke_rtl .cke_dialog a.cke_btn_locked,.cke_rtl .cke_dialog a.cke_btn_unlocked{float:right}.cke_hidpi .cke_dialog a.cke_btn_unlocked,.cke_hidpi .cke_dialog a.cke_btn_locked{background-size:16px}.cke_hidpi .cke_dialog a.cke_btn_locked{background-image:url(images/hidpi/lock.png)}.cke_hidpi .cke_dialog a.cke_btn_unlocked{background-image:url(images/hidpi/lock-open.png)}.cke_dialog a.cke_btn_locked .cke_icon{display:none}.cke_dialog a.cke_btn_over,.cke_dialog a.cke_btn_locked:hover,.cke_dialog a.cke_btn_locked:focus,.cke_dialog a.cke_btn_locked:active,.cke_dialog a.cke_btn_unlocked:hover,.cke_dialog a.cke_btn_unlocked:focus,.cke_dialog a.cke_btn_unlocked:active,.cke_dialog a.cke_btn_reset:hover,.cke_dialog a.cke_btn_reset:focus,.cke_dialog a.cke_btn_reset:active{cursor:pointer;outline:0;margin:0;border:2px solid #139ff7}.cke_dialog fieldset{border:1px solid #bcbcbc}.cke_dialog fieldset legend{padding:0 6px}.cke_dialog_ui_checkbox,.cke_dialog fieldset .cke_dialog_ui_vbox .cke_dialog_ui_checkbox{display:inline-block}.cke_dialog fieldset .cke_dialog_ui_vbox .cke_dialog_ui_checkbox{padding-top:5px}.cke_dialog_ui_checkbox .cke_dialog_ui_checkbox_input,.cke_dialog_ui_checkbox .cke_dialog_ui_checkbox_input+label,.cke_dialog fieldset .cke_dialog_ui_vbox .cke_dialog_ui_checkbox .cke_dialog_ui_checkbox_input,.cke_dialog fieldset .cke_dialog_ui_vbox .cke_dialog_ui_checkbox .cke_dialog_ui_checkbox_input+label{vertical-align:middle}.cke_dialog .ImagePreviewBox{border:1px ridge #bcbcbc;overflow:scroll;height:200px;width:300px;padding:2px;background-color:white}.cke_dialog .ImagePreviewBox table td{white-space:normal}.cke_dialog .ImagePreviewLoader{position:absolute;white-space:normal;overflow:hidden;height:160px;width:230px;margin:2px;padding:2px;opacity:.9;filter:alpha(opacity = 90);background-color:#e4e4e4}.cke_dialog .FlashPreviewBox{white-space:normal;border:1px solid #bcbcbc;overflow:auto;height:160px;width:390px;padding:2px;background-color:white}.cke_dialog .cke_pastetext{width:346px;height:170px}.cke_dialog .cke_pastetext textarea{width:340px;height:170px;resize:none}.cke_dialog iframe.cke_pasteframe{width:346px;height:130px;background-color:white;border:1px solid #aeb3b9;border-radius:3px}.cke_dialog .cke_hand{cursor:pointer}.cke_disabled{color:#a0a0a0}.cke_dialog_body .cke_label{display:none}.cke_dialog_body label{display:inline;cursor:default;letter-spacing:.3px}.cke_dialog_body label+.cke_dialog_ui_labeled_content{margin-top:2px}.cke_dialog_contents_body .cke_dialog_ui_text,.cke_dialog_contents_body .cke_dialog_ui_select,.cke_dialog_contents_body .cke_dialog_ui_hbox_last>a.cke_dialog_ui_button{margin-top:4px}a.cke_smile{overflow:hidden;display:block;text-align:center;padding:.3em 0}a.cke_smile img{vertical-align:middle}a.cke_specialchar{cursor:inherit;display:block;height:1.25em;padding:.2em .3em;text-align:center}a.cke_smile,a.cke_specialchar{border:2px solid transparent}a.cke_smile:hover,a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:hover,a.cke_specialchar:focus,a.cke_specialchar:active{background:#fff;outline:0}a.cke_smile:hover,a.cke_specialchar:hover{border-color:#888}a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:focus,a.cke_specialchar:active{border-color:#139ff7}.cke_dialog_contents a.colorChooser{display:block;margin-top:6px;margin-left:10px;width:80px}.cke_rtl .cke_dialog_contents a.colorChooser{margin-right:10px}.cke_iframe_shim{display:block;position:absolute;top:0;left:0;z-index:-1;filter:alpha(opacity = 0);width:100%;height:100%}.cke_dialog_contents_body .cke_accessibility_legend{margin:2px 7px 2px 2px}.cke_dialog_contents_body .cke_accessibility_legend:focus,.cke_dialog_contents_body .cke_accessibility_legend:active{outline:0;border:2px solid #139ff7;margin:0 5px 0 0}.cke_dialog_contents_body input[type=file]:focus,.cke_dialog_contents_body input[type=file]:active{border:2px solid #139ff7}.cke_dialog_find_fieldset{margin-top:10px!important}.cke_dialog_image_ratiolock{margin-top:52px!important}.cke_dialog_forms_select_order label.cke_dialog_ui_labeled_label{margin-left:0}.cke_dialog_forms_select_order div.cke_dialog_ui_input_select{width:100%}.cke_dialog_forms_select_order_txtsize .cke_dialog_ui_hbox_last{padding-top:4px}.cke_dialog_image_url .cke_dialog_ui_hbox_last,.cke_dialog_flash_url .cke_dialog_ui_hbox_last{vertical-align:bottom}a.cke_dialog_ui_button.cke_dialog_image_browse{margin-top:10px}.cke_dialog_contents_body .cke_tpl_list{border:#bcbcbc 1px solid;margin:1px}.cke_dialog_contents_body .cke_tpl_list:focus,.cke_dialog_contents_body .cke_tpl_list:active{outline:0;margin:0;border:2px solid #139ff7}.cke_dialog_contents_body .cke_tpl_list a:focus,.cke_dialog_contents_body .cke_tpl_list a:active{outline:0}.cke_dialog_contents_body .cke_tpl_list a:focus .cke_tpl_item,.cke_dialog_contents_body .cke_tpl_list a:active .cke_tpl_item{border:2px solid #139ff7;padding:6px}.cke_rtl input.cke_dialog_ui_input_text,.cke_rtl input.cke_dialog_ui_input_password{padding-right:2px}.cke_rtl div.cke_dialog_ui_input_text,.cke_rtl div.cke_dialog_ui_input_password{padding-left:2px}.cke_rtl div.cke_dialog_ui_input_text{padding-right:1px}.cke_rtl .cke_dialog_ui_vbox_child,.cke_rtl .cke_dialog_ui_hbox_child,.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_last{padding-right:2px!important}.cke_hc .cke_dialog_title,.cke_hc .cke_dialog_footer,.cke_hc a.cke_dialog_tab,.cke_hc a.cke_dialog_ui_button,.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button_ok,.cke_hc a.cke_dialog_ui_button_ok:hover{filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:0} \ No newline at end of file diff --git a/libraries/ckeditor/skins/moono-lisa/dialog_ie8.css b/libraries/ckeditor/skins/moono-lisa/dialog_ie8.css new file mode 100644 index 0000000..8833e5c --- /dev/null +++ b/libraries/ckeditor/skins/moono-lisa/dialog_ie8.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +.cke_dialog{visibility:visible}.cke_dialog_body{z-index:1;background:#fff}.cke_dialog strong{font-weight:bold}.cke_dialog_title{font-weight:bold;font-size:12px;cursor:move;position:relative;color:#484848;border-bottom:1px solid #d1d1d1;padding:12px 19px 12px 12px;background:#f8f8f8;letter-spacing:.3px}.cke_dialog_spinner{border-radius:50%;width:12px;height:12px;overflow:hidden;text-indent:-9999em;border:2px solid rgba(102,102,102,0.2);border-left-color:rgba(102,102,102,1);-webkit-animation:dialog_spinner 1s infinite linear;animation:dialog_spinner 1s infinite linear}.cke_browser_ie8 .cke_dialog_spinner,.cke_browser_ie9 .cke_dialog_spinner{background:url(images/spinner.gif) center top no-repeat;width:16px;height:16px;border:0}@-webkit-keyframes dialog_spinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes dialog_spinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.cke_dialog_contents{background-color:#fff;overflow:auto;padding:15px 10px 5px 10px;margin-top:43px;border-top:1px solid #d1d1d1}.cke_dialog_contents_body{overflow:auto;padding:9px 10px 5px 10px;margin-top:22px}.cke_dialog_footer{text-align:right;position:relative;border-top:1px solid #d1d1d1;background:#f8f8f8}.cke_rtl .cke_dialog_footer{text-align:left}.cke_hc .cke_dialog_footer{outline:0;border-top:1px solid #fff}.cke_dialog .cke_resizer{margin-top:22px}.cke_dialog .cke_resizer_rtl{margin-left:5px}.cke_dialog .cke_resizer_ltr{margin-right:5px}.cke_dialog_tabs{height:33px;display:inline-block;margin:9px 0 0;position:absolute;z-index:2;left:11px}.cke_rtl .cke_dialog_tabs{left:auto;right:11px}a.cke_dialog_tab{height:25px;padding:4px 8px;display:inline-block;cursor:pointer;line-height:26px;outline:0;color:#484848;border:1px solid #d1d1d1;border-radius:3px 3px 0 0;background:#f8f8f8;min-width:90px;text-align:center;margin-left:-1px;letter-spacing:.3px}a.cke_dialog_tab:hover{background-color:#fff}a.cke_dialog_tab:focus{border:2px solid #139ff7;border-bottom-color:#d1d1d1;padding:3px 7px;position:relative;z-index:1}a.cke_dialog_tab_selected{background:#fff;border-bottom-color:#fff;cursor:default;filter:none}a.cke_dialog_tab_selected:hover,a.cke_dialog_tab_selected:focus{border-bottom-color:#fff}.cke_hc a.cke_dialog_tab:hover,.cke_hc a.cke_dialog_tab:focus,.cke_hc a.cke_dialog_tab_selected{border:3px solid;padding:2px 6px}a.cke_dialog_tab_disabled{color:#bababa;cursor:default}.cke_single_page .cke_dialog_tabs{display:none}.cke_single_page .cke_dialog_contents{padding-top:5px;margin-top:0;border-top:0}a.cke_dialog_close_button{background-image:url(images/close.png);background-repeat:no-repeat;background-position:50%;position:absolute;cursor:pointer;text-align:center;height:16px;width:16px;top:11px;z-index:5;opacity:.7;filter:alpha(opacity = 70)}.cke_rtl .cke_dialog_close_button{left:12px}.cke_ltr .cke_dialog_close_button{right:12px}.cke_hc a.cke_dialog_close_button{background-image:none}.cke_hidpi a.cke_dialog_close_button{background-image:url(images/hidpi/close.png);background-size:16px}a.cke_dialog_close_button:hover{opacity:1;filter:alpha(opacity = 100)}a.cke_dialog_close_button span{display:none}.cke_hc a.cke_dialog_close_button span{display:inline;cursor:pointer;font-weight:bold;position:relative;top:3px}div.cke_disabled .cke_dialog_ui_labeled_content div *{background-color:#ddd;cursor:default}.cke_dialog_ui_vbox table,.cke_dialog_ui_hbox table{margin:auto}.cke_dialog_ui_vbox_child{padding:5px 0}.cke_dialog_ui_hbox{width:100%;margin-top:12px}.cke_dialog_ui_hbox_first,.cke_dialog_ui_hbox_child,.cke_dialog_ui_hbox_last{vertical-align:top}.cke_ltr .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_ui_hbox_child{padding-right:10px}.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_child{padding-left:10px}.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-right:5px}.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-left:5px;padding-right:0}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:1px solid}textarea.cke_dialog_ui_input_textarea{overflow:auto;resize:none}input.cke_dialog_ui_input_text,input.cke_dialog_ui_input_password,textarea.cke_dialog_ui_input_textarea{background-color:#fff;border:1px solid #bcbcbc;padding:4px 6px;outline:0;width:100%;*width:95%;box-sizing:border-box;border-radius:2px;min-height:28px;margin-left:1px}input.cke_dialog_ui_input_text:hover,input.cke_dialog_ui_input_password:hover,textarea.cke_dialog_ui_input_textarea:hover{border:1px solid #aeb3b9}input.cke_dialog_ui_input_text:focus,input.cke_dialog_ui_input_password:focus,textarea.cke_dialog_ui_input_textarea:focus,select.cke_dialog_ui_input_select:focus{outline:0;border:2px solid #139ff7}input.cke_dialog_ui_input_text:focus{padding-left:5px}textarea.cke_dialog_ui_input_textarea:focus{padding:3px 5px}select.cke_dialog_ui_input_select:focus{margin:0;width:100%!important}input.cke_dialog_ui_checkbox_input,input.cke_dialog_ui_radio_input{margin-left:1px;margin-right:2px}input.cke_dialog_ui_checkbox_input:focus,input.cke_dialog_ui_checkbox_input:active,input.cke_dialog_ui_radio_input:focus,input.cke_dialog_ui_radio_input:active{border:0;outline:2px solid #139ff7}a.cke_dialog_ui_button{display:inline-block;*display:inline;*zoom:1;padding:4px 1px;margin:0;text-align:center;color:#484848;vertical-align:middle;cursor:pointer;border:1px solid #bcbcbc;border-radius:2px;background:#f8f8f8;letter-spacing:.3px;line-height:18px;box-sizing:border-box}.cke_hc a.cke_dialog_ui_button{border-width:3px}span.cke_dialog_ui_button{padding:0 10px;cursor:pointer}a.cke_dialog_ui_button:hover{background:#fff}a.cke_dialog_ui_button:focus,a.cke_dialog_ui_button:active{border:2px solid #139ff7;outline:0;padding:3px 0}.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button:focus,.cke_hc a.cke_dialog_ui_button:active{border:3px solid}.cke_dialog_footer_buttons a.cke_dialog_ui_button span{color:inherit;font-size:12px;font-weight:bold;padding:0 12px}a.cke_dialog_ui_button_ok{color:#fff;background:#09863e;border:1px solid #09863e}.cke_hc a.cke_dialog_ui_button{border:3px solid #bcbcbc}a.cke_dialog_ui_button_ok:hover{background:#53aa78;border-color:#53aa78}a.cke_dialog_ui_button_ok:focus{box-shadow:inset 0 0 0 2px #FFF}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active{border-color:#139ff7}.cke_hc a.cke_dialog_ui_button_ok:hover,.cke_hc a.cke_dialog_ui_button_ok:focus,.cke_hc a.cke_dialog_ui_button_ok:active{border-color:#484848}a.cke_dialog_ui_button_ok.cke_disabled{background:#d1d1d1;border-color:#d1d1d1;cursor:default}a.cke_dialog_ui_button_ok.cke_disabled span{cursor:default}.cke_dialog_footer_buttons{display:inline-table;margin:5px;width:auto;position:relative;vertical-align:middle}div.cke_dialog_ui_input_select{display:table}select.cke_dialog_ui_input_select{height:28px;line-height:28px;background-color:#fff;border:1px solid #bcbcbc;padding:3px 3px 3px 6px;outline:0;border-radius:2px;margin:0 1px;box-sizing:border-box;width:calc(100% - 2px)!important}.cke_dialog_ui_input_file{width:100%;height:25px}.cke_hc .cke_dialog_ui_labeled_content input:focus,.cke_hc .cke_dialog_ui_labeled_content select:focus,.cke_hc .cke_dialog_ui_labeled_content textarea:focus{outline:1px dotted}.cke_dialog_ui_labeled_label{margin-left:1px}.cke_dialog .cke_dark_background{background-color:transparent}.cke_dialog .cke_light_background{background-color:#ebebeb}.cke_dialog .cke_centered{text-align:center}.cke_dialog a.cke_btn_reset{float:right;background:url(images/refresh.png) top left no-repeat;width:16px;height:16px;border:1px none;font-size:1px}.cke_hidpi .cke_dialog a.cke_btn_reset{background-size:16px;background-image:url(images/hidpi/refresh.png)}.cke_rtl .cke_dialog a.cke_btn_reset{float:left}.cke_dialog a.cke_btn_locked,.cke_dialog a.cke_btn_unlocked{float:left;width:16px;height:16px;background-repeat:no-repeat;border:none 1px;font-size:1px}.cke_dialog a.cke_btn_locked,.cke_dialog a.cke_btn_unlocked,.cke_dialog a.cke_btn_reset{margin:2px}.cke_dialog a.cke_btn_locked{background-image:url(images/lock.png)}.cke_dialog a.cke_btn_unlocked{background-image:url(images/lock-open.png)}.cke_rtl .cke_dialog a.cke_btn_locked,.cke_rtl .cke_dialog a.cke_btn_unlocked{float:right}.cke_hidpi .cke_dialog a.cke_btn_unlocked,.cke_hidpi .cke_dialog a.cke_btn_locked{background-size:16px}.cke_hidpi .cke_dialog a.cke_btn_locked{background-image:url(images/hidpi/lock.png)}.cke_hidpi .cke_dialog a.cke_btn_unlocked{background-image:url(images/hidpi/lock-open.png)}.cke_dialog a.cke_btn_locked .cke_icon{display:none}.cke_dialog a.cke_btn_over,.cke_dialog a.cke_btn_locked:hover,.cke_dialog a.cke_btn_locked:focus,.cke_dialog a.cke_btn_locked:active,.cke_dialog a.cke_btn_unlocked:hover,.cke_dialog a.cke_btn_unlocked:focus,.cke_dialog a.cke_btn_unlocked:active,.cke_dialog a.cke_btn_reset:hover,.cke_dialog a.cke_btn_reset:focus,.cke_dialog a.cke_btn_reset:active{cursor:pointer;outline:0;margin:0;border:2px solid #139ff7}.cke_dialog fieldset{border:1px solid #bcbcbc}.cke_dialog fieldset legend{padding:0 6px}.cke_dialog_ui_checkbox,.cke_dialog fieldset .cke_dialog_ui_vbox .cke_dialog_ui_checkbox{display:inline-block}.cke_dialog fieldset .cke_dialog_ui_vbox .cke_dialog_ui_checkbox{padding-top:5px}.cke_dialog_ui_checkbox .cke_dialog_ui_checkbox_input,.cke_dialog_ui_checkbox .cke_dialog_ui_checkbox_input+label,.cke_dialog fieldset .cke_dialog_ui_vbox .cke_dialog_ui_checkbox .cke_dialog_ui_checkbox_input,.cke_dialog fieldset .cke_dialog_ui_vbox .cke_dialog_ui_checkbox .cke_dialog_ui_checkbox_input+label{vertical-align:middle}.cke_dialog .ImagePreviewBox{border:1px ridge #bcbcbc;overflow:scroll;height:200px;width:300px;padding:2px;background-color:white}.cke_dialog .ImagePreviewBox table td{white-space:normal}.cke_dialog .ImagePreviewLoader{position:absolute;white-space:normal;overflow:hidden;height:160px;width:230px;margin:2px;padding:2px;opacity:.9;filter:alpha(opacity = 90);background-color:#e4e4e4}.cke_dialog .FlashPreviewBox{white-space:normal;border:1px solid #bcbcbc;overflow:auto;height:160px;width:390px;padding:2px;background-color:white}.cke_dialog .cke_pastetext{width:346px;height:170px}.cke_dialog .cke_pastetext textarea{width:340px;height:170px;resize:none}.cke_dialog iframe.cke_pasteframe{width:346px;height:130px;background-color:white;border:1px solid #aeb3b9;border-radius:3px}.cke_dialog .cke_hand{cursor:pointer}.cke_disabled{color:#a0a0a0}.cke_dialog_body .cke_label{display:none}.cke_dialog_body label{display:inline;cursor:default;letter-spacing:.3px}.cke_dialog_body label+.cke_dialog_ui_labeled_content{margin-top:2px}.cke_dialog_contents_body .cke_dialog_ui_text,.cke_dialog_contents_body .cke_dialog_ui_select,.cke_dialog_contents_body .cke_dialog_ui_hbox_last>a.cke_dialog_ui_button{margin-top:4px}a.cke_smile{overflow:hidden;display:block;text-align:center;padding:.3em 0}a.cke_smile img{vertical-align:middle}a.cke_specialchar{cursor:inherit;display:block;height:1.25em;padding:.2em .3em;text-align:center}a.cke_smile,a.cke_specialchar{border:2px solid transparent}a.cke_smile:hover,a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:hover,a.cke_specialchar:focus,a.cke_specialchar:active{background:#fff;outline:0}a.cke_smile:hover,a.cke_specialchar:hover{border-color:#888}a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:focus,a.cke_specialchar:active{border-color:#139ff7}.cke_dialog_contents a.colorChooser{display:block;margin-top:6px;margin-left:10px;width:80px}.cke_rtl .cke_dialog_contents a.colorChooser{margin-right:10px}.cke_iframe_shim{display:block;position:absolute;top:0;left:0;z-index:-1;filter:alpha(opacity = 0);width:100%;height:100%}.cke_dialog_contents_body .cke_accessibility_legend{margin:2px 7px 2px 2px}.cke_dialog_contents_body .cke_accessibility_legend:focus,.cke_dialog_contents_body .cke_accessibility_legend:active{outline:0;border:2px solid #139ff7;margin:0 5px 0 0}.cke_dialog_contents_body input[type=file]:focus,.cke_dialog_contents_body input[type=file]:active{border:2px solid #139ff7}.cke_dialog_find_fieldset{margin-top:10px!important}.cke_dialog_image_ratiolock{margin-top:52px!important}.cke_dialog_forms_select_order label.cke_dialog_ui_labeled_label{margin-left:0}.cke_dialog_forms_select_order div.cke_dialog_ui_input_select{width:100%}.cke_dialog_forms_select_order_txtsize .cke_dialog_ui_hbox_last{padding-top:4px}.cke_dialog_image_url .cke_dialog_ui_hbox_last,.cke_dialog_flash_url .cke_dialog_ui_hbox_last{vertical-align:bottom}a.cke_dialog_ui_button.cke_dialog_image_browse{margin-top:10px}.cke_dialog_contents_body .cke_tpl_list{border:#bcbcbc 1px solid;margin:1px}.cke_dialog_contents_body .cke_tpl_list:focus,.cke_dialog_contents_body .cke_tpl_list:active{outline:0;margin:0;border:2px solid #139ff7}.cke_dialog_contents_body .cke_tpl_list a:focus,.cke_dialog_contents_body .cke_tpl_list a:active{outline:0}.cke_dialog_contents_body .cke_tpl_list a:focus .cke_tpl_item,.cke_dialog_contents_body .cke_tpl_list a:active .cke_tpl_item{border:2px solid #139ff7;padding:6px}.cke_rtl input.cke_dialog_ui_input_text,.cke_rtl input.cke_dialog_ui_input_password{padding-right:2px}.cke_rtl div.cke_dialog_ui_input_text,.cke_rtl div.cke_dialog_ui_input_password{padding-left:2px}.cke_rtl div.cke_dialog_ui_input_text{padding-right:1px}.cke_rtl .cke_dialog_ui_vbox_child,.cke_rtl .cke_dialog_ui_hbox_child,.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_last{padding-right:2px!important}.cke_hc .cke_dialog_title,.cke_hc .cke_dialog_footer,.cke_hc a.cke_dialog_tab,.cke_hc a.cke_dialog_ui_button,.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button_ok,.cke_hc a.cke_dialog_ui_button_ok:hover{filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:0}a.cke_dialog_ui_button{min-height:18px}input.cke_dialog_ui_input_text,input.cke_dialog_ui_input_password,textarea.cke_dialog_ui_input_textarea{min-height:18px}input.cke_dialog_ui_input_text:focus,input.cke_dialog_ui_input_password:focus,textarea.cke_dialog_ui_input_textarea:focus{padding-top:4px;padding-bottom:2px}select.cke_dialog_ui_input_select{width:100%!important}select.cke_dialog_ui_input_select:focus{margin-left:1px;width:100%!important;padding-top:2px;padding-bottom:2px} \ No newline at end of file diff --git a/libraries/ckeditor/skins/moono-lisa/dialog_iequirks.css b/libraries/ckeditor/skins/moono-lisa/dialog_iequirks.css new file mode 100644 index 0000000..590c5c2 --- /dev/null +++ b/libraries/ckeditor/skins/moono-lisa/dialog_iequirks.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +.cke_dialog{visibility:visible}.cke_dialog_body{z-index:1;background:#fff}.cke_dialog strong{font-weight:bold}.cke_dialog_title{font-weight:bold;font-size:12px;cursor:move;position:relative;color:#484848;border-bottom:1px solid #d1d1d1;padding:12px 19px 12px 12px;background:#f8f8f8;letter-spacing:.3px}.cke_dialog_spinner{border-radius:50%;width:12px;height:12px;overflow:hidden;text-indent:-9999em;border:2px solid rgba(102,102,102,0.2);border-left-color:rgba(102,102,102,1);-webkit-animation:dialog_spinner 1s infinite linear;animation:dialog_spinner 1s infinite linear}.cke_browser_ie8 .cke_dialog_spinner,.cke_browser_ie9 .cke_dialog_spinner{background:url(images/spinner.gif) center top no-repeat;width:16px;height:16px;border:0}@-webkit-keyframes dialog_spinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes dialog_spinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.cke_dialog_contents{background-color:#fff;overflow:auto;padding:15px 10px 5px 10px;margin-top:43px;border-top:1px solid #d1d1d1}.cke_dialog_contents_body{overflow:auto;padding:9px 10px 5px 10px;margin-top:22px}.cke_dialog_footer{text-align:right;position:relative;border-top:1px solid #d1d1d1;background:#f8f8f8}.cke_rtl .cke_dialog_footer{text-align:left}.cke_hc .cke_dialog_footer{outline:0;border-top:1px solid #fff}.cke_dialog .cke_resizer{margin-top:22px}.cke_dialog .cke_resizer_rtl{margin-left:5px}.cke_dialog .cke_resizer_ltr{margin-right:5px}.cke_dialog_tabs{height:33px;display:inline-block;margin:9px 0 0;position:absolute;z-index:2;left:11px}.cke_rtl .cke_dialog_tabs{left:auto;right:11px}a.cke_dialog_tab{height:25px;padding:4px 8px;display:inline-block;cursor:pointer;line-height:26px;outline:0;color:#484848;border:1px solid #d1d1d1;border-radius:3px 3px 0 0;background:#f8f8f8;min-width:90px;text-align:center;margin-left:-1px;letter-spacing:.3px}a.cke_dialog_tab:hover{background-color:#fff}a.cke_dialog_tab:focus{border:2px solid #139ff7;border-bottom-color:#d1d1d1;padding:3px 7px;position:relative;z-index:1}a.cke_dialog_tab_selected{background:#fff;border-bottom-color:#fff;cursor:default;filter:none}a.cke_dialog_tab_selected:hover,a.cke_dialog_tab_selected:focus{border-bottom-color:#fff}.cke_hc a.cke_dialog_tab:hover,.cke_hc a.cke_dialog_tab:focus,.cke_hc a.cke_dialog_tab_selected{border:3px solid;padding:2px 6px}a.cke_dialog_tab_disabled{color:#bababa;cursor:default}.cke_single_page .cke_dialog_tabs{display:none}.cke_single_page .cke_dialog_contents{padding-top:5px;margin-top:0;border-top:0}a.cke_dialog_close_button{background-image:url(images/close.png);background-repeat:no-repeat;background-position:50%;position:absolute;cursor:pointer;text-align:center;height:16px;width:16px;top:11px;z-index:5;opacity:.7;filter:alpha(opacity = 70)}.cke_rtl .cke_dialog_close_button{left:12px}.cke_ltr .cke_dialog_close_button{right:12px}.cke_hc a.cke_dialog_close_button{background-image:none}.cke_hidpi a.cke_dialog_close_button{background-image:url(images/hidpi/close.png);background-size:16px}a.cke_dialog_close_button:hover{opacity:1;filter:alpha(opacity = 100)}a.cke_dialog_close_button span{display:none}.cke_hc a.cke_dialog_close_button span{display:inline;cursor:pointer;font-weight:bold;position:relative;top:3px}div.cke_disabled .cke_dialog_ui_labeled_content div *{background-color:#ddd;cursor:default}.cke_dialog_ui_vbox table,.cke_dialog_ui_hbox table{margin:auto}.cke_dialog_ui_vbox_child{padding:5px 0}.cke_dialog_ui_hbox{width:100%;margin-top:12px}.cke_dialog_ui_hbox_first,.cke_dialog_ui_hbox_child,.cke_dialog_ui_hbox_last{vertical-align:top}.cke_ltr .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_ui_hbox_child{padding-right:10px}.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_child{padding-left:10px}.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-right:5px}.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-left:5px;padding-right:0}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:1px solid}textarea.cke_dialog_ui_input_textarea{overflow:auto;resize:none}input.cke_dialog_ui_input_text,input.cke_dialog_ui_input_password,textarea.cke_dialog_ui_input_textarea{background-color:#fff;border:1px solid #bcbcbc;padding:4px 6px;outline:0;width:100%;*width:95%;box-sizing:border-box;border-radius:2px;min-height:28px;margin-left:1px}input.cke_dialog_ui_input_text:hover,input.cke_dialog_ui_input_password:hover,textarea.cke_dialog_ui_input_textarea:hover{border:1px solid #aeb3b9}input.cke_dialog_ui_input_text:focus,input.cke_dialog_ui_input_password:focus,textarea.cke_dialog_ui_input_textarea:focus,select.cke_dialog_ui_input_select:focus{outline:0;border:2px solid #139ff7}input.cke_dialog_ui_input_text:focus{padding-left:5px}textarea.cke_dialog_ui_input_textarea:focus{padding:3px 5px}select.cke_dialog_ui_input_select:focus{margin:0;width:100%!important}input.cke_dialog_ui_checkbox_input,input.cke_dialog_ui_radio_input{margin-left:1px;margin-right:2px}input.cke_dialog_ui_checkbox_input:focus,input.cke_dialog_ui_checkbox_input:active,input.cke_dialog_ui_radio_input:focus,input.cke_dialog_ui_radio_input:active{border:0;outline:2px solid #139ff7}a.cke_dialog_ui_button{display:inline-block;*display:inline;*zoom:1;padding:4px 1px;margin:0;text-align:center;color:#484848;vertical-align:middle;cursor:pointer;border:1px solid #bcbcbc;border-radius:2px;background:#f8f8f8;letter-spacing:.3px;line-height:18px;box-sizing:border-box}.cke_hc a.cke_dialog_ui_button{border-width:3px}span.cke_dialog_ui_button{padding:0 10px;cursor:pointer}a.cke_dialog_ui_button:hover{background:#fff}a.cke_dialog_ui_button:focus,a.cke_dialog_ui_button:active{border:2px solid #139ff7;outline:0;padding:3px 0}.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button:focus,.cke_hc a.cke_dialog_ui_button:active{border:3px solid}.cke_dialog_footer_buttons a.cke_dialog_ui_button span{color:inherit;font-size:12px;font-weight:bold;padding:0 12px}a.cke_dialog_ui_button_ok{color:#fff;background:#09863e;border:1px solid #09863e}.cke_hc a.cke_dialog_ui_button{border:3px solid #bcbcbc}a.cke_dialog_ui_button_ok:hover{background:#53aa78;border-color:#53aa78}a.cke_dialog_ui_button_ok:focus{box-shadow:inset 0 0 0 2px #FFF}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active{border-color:#139ff7}.cke_hc a.cke_dialog_ui_button_ok:hover,.cke_hc a.cke_dialog_ui_button_ok:focus,.cke_hc a.cke_dialog_ui_button_ok:active{border-color:#484848}a.cke_dialog_ui_button_ok.cke_disabled{background:#d1d1d1;border-color:#d1d1d1;cursor:default}a.cke_dialog_ui_button_ok.cke_disabled span{cursor:default}.cke_dialog_footer_buttons{display:inline-table;margin:5px;width:auto;position:relative;vertical-align:middle}div.cke_dialog_ui_input_select{display:table}select.cke_dialog_ui_input_select{height:28px;line-height:28px;background-color:#fff;border:1px solid #bcbcbc;padding:3px 3px 3px 6px;outline:0;border-radius:2px;margin:0 1px;box-sizing:border-box;width:calc(100% - 2px)!important}.cke_dialog_ui_input_file{width:100%;height:25px}.cke_hc .cke_dialog_ui_labeled_content input:focus,.cke_hc .cke_dialog_ui_labeled_content select:focus,.cke_hc .cke_dialog_ui_labeled_content textarea:focus{outline:1px dotted}.cke_dialog_ui_labeled_label{margin-left:1px}.cke_dialog .cke_dark_background{background-color:transparent}.cke_dialog .cke_light_background{background-color:#ebebeb}.cke_dialog .cke_centered{text-align:center}.cke_dialog a.cke_btn_reset{float:right;background:url(images/refresh.png) top left no-repeat;width:16px;height:16px;border:1px none;font-size:1px}.cke_hidpi .cke_dialog a.cke_btn_reset{background-size:16px;background-image:url(images/hidpi/refresh.png)}.cke_rtl .cke_dialog a.cke_btn_reset{float:left}.cke_dialog a.cke_btn_locked,.cke_dialog a.cke_btn_unlocked{float:left;width:16px;height:16px;background-repeat:no-repeat;border:none 1px;font-size:1px}.cke_dialog a.cke_btn_locked,.cke_dialog a.cke_btn_unlocked,.cke_dialog a.cke_btn_reset{margin:2px}.cke_dialog a.cke_btn_locked{background-image:url(images/lock.png)}.cke_dialog a.cke_btn_unlocked{background-image:url(images/lock-open.png)}.cke_rtl .cke_dialog a.cke_btn_locked,.cke_rtl .cke_dialog a.cke_btn_unlocked{float:right}.cke_hidpi .cke_dialog a.cke_btn_unlocked,.cke_hidpi .cke_dialog a.cke_btn_locked{background-size:16px}.cke_hidpi .cke_dialog a.cke_btn_locked{background-image:url(images/hidpi/lock.png)}.cke_hidpi .cke_dialog a.cke_btn_unlocked{background-image:url(images/hidpi/lock-open.png)}.cke_dialog a.cke_btn_locked .cke_icon{display:none}.cke_dialog a.cke_btn_over,.cke_dialog a.cke_btn_locked:hover,.cke_dialog a.cke_btn_locked:focus,.cke_dialog a.cke_btn_locked:active,.cke_dialog a.cke_btn_unlocked:hover,.cke_dialog a.cke_btn_unlocked:focus,.cke_dialog a.cke_btn_unlocked:active,.cke_dialog a.cke_btn_reset:hover,.cke_dialog a.cke_btn_reset:focus,.cke_dialog a.cke_btn_reset:active{cursor:pointer;outline:0;margin:0;border:2px solid #139ff7}.cke_dialog fieldset{border:1px solid #bcbcbc}.cke_dialog fieldset legend{padding:0 6px}.cke_dialog_ui_checkbox,.cke_dialog fieldset .cke_dialog_ui_vbox .cke_dialog_ui_checkbox{display:inline-block}.cke_dialog fieldset .cke_dialog_ui_vbox .cke_dialog_ui_checkbox{padding-top:5px}.cke_dialog_ui_checkbox .cke_dialog_ui_checkbox_input,.cke_dialog_ui_checkbox .cke_dialog_ui_checkbox_input+label,.cke_dialog fieldset .cke_dialog_ui_vbox .cke_dialog_ui_checkbox .cke_dialog_ui_checkbox_input,.cke_dialog fieldset .cke_dialog_ui_vbox .cke_dialog_ui_checkbox .cke_dialog_ui_checkbox_input+label{vertical-align:middle}.cke_dialog .ImagePreviewBox{border:1px ridge #bcbcbc;overflow:scroll;height:200px;width:300px;padding:2px;background-color:white}.cke_dialog .ImagePreviewBox table td{white-space:normal}.cke_dialog .ImagePreviewLoader{position:absolute;white-space:normal;overflow:hidden;height:160px;width:230px;margin:2px;padding:2px;opacity:.9;filter:alpha(opacity = 90);background-color:#e4e4e4}.cke_dialog .FlashPreviewBox{white-space:normal;border:1px solid #bcbcbc;overflow:auto;height:160px;width:390px;padding:2px;background-color:white}.cke_dialog .cke_pastetext{width:346px;height:170px}.cke_dialog .cke_pastetext textarea{width:340px;height:170px;resize:none}.cke_dialog iframe.cke_pasteframe{width:346px;height:130px;background-color:white;border:1px solid #aeb3b9;border-radius:3px}.cke_dialog .cke_hand{cursor:pointer}.cke_disabled{color:#a0a0a0}.cke_dialog_body .cke_label{display:none}.cke_dialog_body label{display:inline;cursor:default;letter-spacing:.3px}.cke_dialog_body label+.cke_dialog_ui_labeled_content{margin-top:2px}.cke_dialog_contents_body .cke_dialog_ui_text,.cke_dialog_contents_body .cke_dialog_ui_select,.cke_dialog_contents_body .cke_dialog_ui_hbox_last>a.cke_dialog_ui_button{margin-top:4px}a.cke_smile{overflow:hidden;display:block;text-align:center;padding:.3em 0}a.cke_smile img{vertical-align:middle}a.cke_specialchar{cursor:inherit;display:block;height:1.25em;padding:.2em .3em;text-align:center}a.cke_smile,a.cke_specialchar{border:2px solid transparent}a.cke_smile:hover,a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:hover,a.cke_specialchar:focus,a.cke_specialchar:active{background:#fff;outline:0}a.cke_smile:hover,a.cke_specialchar:hover{border-color:#888}a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:focus,a.cke_specialchar:active{border-color:#139ff7}.cke_dialog_contents a.colorChooser{display:block;margin-top:6px;margin-left:10px;width:80px}.cke_rtl .cke_dialog_contents a.colorChooser{margin-right:10px}.cke_iframe_shim{display:block;position:absolute;top:0;left:0;z-index:-1;filter:alpha(opacity = 0);width:100%;height:100%}.cke_dialog_contents_body .cke_accessibility_legend{margin:2px 7px 2px 2px}.cke_dialog_contents_body .cke_accessibility_legend:focus,.cke_dialog_contents_body .cke_accessibility_legend:active{outline:0;border:2px solid #139ff7;margin:0 5px 0 0}.cke_dialog_contents_body input[type=file]:focus,.cke_dialog_contents_body input[type=file]:active{border:2px solid #139ff7}.cke_dialog_find_fieldset{margin-top:10px!important}.cke_dialog_image_ratiolock{margin-top:52px!important}.cke_dialog_forms_select_order label.cke_dialog_ui_labeled_label{margin-left:0}.cke_dialog_forms_select_order div.cke_dialog_ui_input_select{width:100%}.cke_dialog_forms_select_order_txtsize .cke_dialog_ui_hbox_last{padding-top:4px}.cke_dialog_image_url .cke_dialog_ui_hbox_last,.cke_dialog_flash_url .cke_dialog_ui_hbox_last{vertical-align:bottom}a.cke_dialog_ui_button.cke_dialog_image_browse{margin-top:10px}.cke_dialog_contents_body .cke_tpl_list{border:#bcbcbc 1px solid;margin:1px}.cke_dialog_contents_body .cke_tpl_list:focus,.cke_dialog_contents_body .cke_tpl_list:active{outline:0;margin:0;border:2px solid #139ff7}.cke_dialog_contents_body .cke_tpl_list a:focus,.cke_dialog_contents_body .cke_tpl_list a:active{outline:0}.cke_dialog_contents_body .cke_tpl_list a:focus .cke_tpl_item,.cke_dialog_contents_body .cke_tpl_list a:active .cke_tpl_item{border:2px solid #139ff7;padding:6px}.cke_rtl input.cke_dialog_ui_input_text,.cke_rtl input.cke_dialog_ui_input_password{padding-right:2px}.cke_rtl div.cke_dialog_ui_input_text,.cke_rtl div.cke_dialog_ui_input_password{padding-left:2px}.cke_rtl div.cke_dialog_ui_input_text{padding-right:1px}.cke_rtl .cke_dialog_ui_vbox_child,.cke_rtl .cke_dialog_ui_hbox_child,.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_last{padding-right:2px!important}.cke_hc .cke_dialog_title,.cke_hc .cke_dialog_footer,.cke_hc a.cke_dialog_tab,.cke_hc a.cke_dialog_ui_button,.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button_ok,.cke_hc a.cke_dialog_ui_button_ok:hover{filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:0}.cke_dialog_footer{filter:""} \ No newline at end of file diff --git a/libraries/ckeditor/skins/moono-lisa/editor.css b/libraries/ckeditor/skins/moono-lisa/editor.css new file mode 100644 index 0000000..e9f785a --- /dev/null +++ b/libraries/ckeditor/skins/moono-lisa/editor.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +.cke_reset{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;position:static;transition:none}.cke_reset_all,.cke_reset_all *,.cke_reset_all a,.cke_reset_all textarea{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;position:static;transition:none;border-collapse:collapse;font:normal normal normal 12px Arial,Helvetica,Tahoma,Verdana,Sans-Serif;color:#000;text-align:left;white-space:nowrap;cursor:auto;float:none}.cke_reset_all .cke_rtl *{text-align:right}.cke_reset_all iframe{vertical-align:inherit}.cke_reset_all textarea{white-space:pre-wrap}.cke_reset_all textarea,.cke_reset_all input[type="text"],.cke_reset_all input[type="password"]{cursor:text}.cke_reset_all textarea[disabled],.cke_reset_all input[type="text"][disabled],.cke_reset_all input[type="password"][disabled]{cursor:default}.cke_reset_all fieldset{padding:10px;border:2px groove #e0dfe3}.cke_reset_all select{box-sizing:border-box}.cke_reset_all table{table-layout:auto}.cke_chrome{display:block;border:1px solid #d1d1d1;padding:0}.cke_inner{display:block;background:#fff;padding:0;-webkit-touch-callout:none}.cke_float{border:0}.cke_float .cke_inner{padding-bottom:0}.cke_top,.cke_contents,.cke_bottom{display:block;overflow:hidden}.cke_top{border-bottom:1px solid #d1d1d1;background:#f8f8f8;padding:6px 8px 2px;white-space:normal}.cke_float .cke_top{border:1px solid #d1d1d1}.cke_bottom{padding:6px 8px 2px;position:relative;border-top:1px solid #d1d1d1;background:#f8f8f8}.cke_browser_ios .cke_contents{overflow-y:auto;-webkit-overflow-scrolling:touch}.cke_resizer{width:0;height:0;overflow:hidden;border-width:10px 10px 0 0;border-color:transparent #bcbcbc transparent transparent;border-style:dashed solid dashed dashed;font-size:0;vertical-align:bottom;margin-top:6px;margin-bottom:2px}.cke_hc .cke_resizer{font-size:15px;width:auto;height:auto;border-width:0}.cke_resizer_ltr{cursor:se-resize;float:right;margin-right:-4px}.cke_resizer_rtl{border-width:10px 0 0 10px;border-color:transparent transparent transparent #bcbcbc;border-style:dashed dashed dashed solid;cursor:sw-resize;float:left;margin-left:-4px;right:auto}.cke_wysiwyg_div{display:block;height:100%;overflow:auto;padding:0 8px;outline-style:none;box-sizing:border-box}.cke_panel{visibility:visible;width:120px;height:100px;overflow:hidden;background-color:#fff;border:1px solid #d1d1d1}.cke_menu_panel{padding:0;margin:0}.cke_combopanel{width:150px;height:170px}.cke_panel_frame{width:100%;height:100%;font-size:12px;overflow:auto;overflow-x:hidden}.cke_panel_container{overflow-y:auto;overflow-x:hidden}.cke_panel_block:focus{outline:0}.cke_panel_list{margin:0;padding:0;list-style-type:none;white-space:nowrap}.cke_panel_listItem{margin:0;padding:0}.cke_panel_listItem a{padding:6px 7px;display:block;color:inherit!important;text-decoration:none;overflow:hidden;text-overflow:ellipsis}.cke_hc .cke_panel_listItem a{border-style:none}.cke_panel_listItem.cke_selected a,.cke_panel_listItem a:hover,.cke_panel_listItem a:focus,.cke_panel_listItem a:active{background-color:#e9e9e9}.cke_panel_listItem a:focus{outline:1px dotted #000}.cke_hc .cke_panel_listItem a:hover,.cke_hc .cke_panel_listItem a:focus,.cke_hc .cke_panel_listItem a:active{border:2px solid;padding:4px 5px}.cke_panel_listItem p,.cke_panel_listItem h1,.cke_panel_listItem h2,.cke_panel_listItem h3,.cke_panel_listItem h4,.cke_panel_listItem h5,.cke_panel_listItem h6,.cke_panel_listItem pre{margin-top:0;margin-bottom:0}.cke_panel_grouptitle{cursor:default;font-size:11px;font-weight:bold;white-space:nowrap;margin:0;padding:6px 6px 7px 6px;color:#484848;border-bottom:1px solid #d1d1d1;background:#f8f8f8}.cke_colorblock{padding:10px;font-size:11px;font-family:'Microsoft Sans Serif',Tahoma,Arial,Verdana,Sans-Serif}.cke_colorblock,.cke_colorblock a{text-decoration:none;color:#000}a.cke_colorbox{padding:2px;float:left;width:20px;height:20px}.cke_rtl a.cke_colorbox{float:right}a:hover.cke_colorbox,a:focus.cke_colorbox,a:active.cke_colorbox{outline:0;padding:0;border:2px solid #139ff7}a:hover.cke_colorbox{border-color:#bcbcbc}span.cke_colorbox{width:20px;height:20px;float:left}.cke_rtl span.cke_colorbox{float:right}a.cke_colorauto,a.cke_colormore{border:#fff 1px solid;padding:3px;display:block;cursor:pointer}a.cke_colorauto{padding:0;border:1px solid transparent;margin-bottom:6px;height:26px;line-height:26px}a.cke_colormore{margin-top:10px;height:20px;line-height:19px}a:hover.cke_colorauto,a:hover.cke_colormore,a:focus.cke_colorauto,a:focus.cke_colormore,a:active.cke_colorauto,a:active.cke_colormore{outline:0;border:#139ff7 1px solid;background-color:#f8f8f8}a:hover.cke_colorauto,a:hover.cke_colormore{border-color:#bcbcbc}.cke_colorauto span.cke_colorbox{width:18px;height:18px;border:1px solid #808080;margin-left:1px;margin-top:3px}.cke_rtl .cke_colorauto span.cke_colorbox{margin-left:0;margin-right:1px}span.cke_colorbox[style*="#ffffff"],span.cke_colorbox[style*="#FFFFFF"],span.cke_colorbox[style="background-color:#fff"],span.cke_colorbox[style="background-color:#FFF"],span.cke_colorbox[style*="rgb(255,255,255)"],span.cke_colorbox[style*="rgb(255, 255, 255)"]{border:1px solid #808080;width:18px;height:18px}.cke_toolbar{float:left}.cke_rtl .cke_toolbar{float:right}.cke_toolgroup{border:0;float:left;margin:1px 2px 6px 0;padding-right:3px}.cke_rtl .cke_toolgroup{float:right;margin:1px 0 6px 2px;padding-left:3px;padding-right:0}.cke_hc .cke_toolgroup{margin-right:5px;margin-bottom:5px}.cke_hc.cke_rtl .cke_toolgroup{margin-right:0;margin-left:5px}a.cke_button{display:inline-block;height:18px;padding:4px 6px;outline:0;cursor:default;float:left;border:0;position:relative}.cke_rtl a.cke_button{float:right}.cke_hc a.cke_button{border:1px solid black;padding:3px 5px;margin:0 3px 5px 0}.cke_hc.cke_rtl a.cke_button{margin:0 0 5px 3px}a.cke_button_on{background:#fff;border:1px #bcbcbc solid;padding:3px 5px}a.cke_button_off:hover,a.cke_button_off:focus,a.cke_button_off:active{background:#e5e5e5;border:1px #bcbcbc solid;padding:3px 5px}.cke_hc a.cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active{background:#e5e5e5;border:3px solid #000;padding:1px 3px}a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{border:0;padding:4px 6px;background-color:transparent}a.cke_button_disabled:focus{border:1px #bcbcbc solid;padding:3px 5px}.cke_hc a.cke_button_disabled:hover,.cke_hc a.cke_button_disabled:focus,.cke_hc a.cke_button_disabled:active{border:1px solid #acacac;padding:3px 5px;margin:0 3px 5px 0}.cke_hc a.cke_button_disabled:focus{border:3px solid #000;padding:1px 3px}.cke_hc.cke_rtl a.cke_button_disabled:hover,.cke_hc.cke_rtl a.cke_button_disabled:focus,.cke_hc.cke_rtl a.cke_button_disabled:active{margin:0 0 5px 3px}a.cke_button_disabled .cke_button_icon,a.cke_button_disabled .cke_button_arrow{opacity:.3}.cke_hc a.cke_button_disabled{border-color:#acacac}.cke_hc a.cke_button_disabled .cke_button_icon,.cke_hc a.cke_button_disabled .cke_button_label{opacity:.5}.cke_toolgroup a.cke_button:last-child:after,.cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after{content:"";position:absolute;height:18px;width:0;border-right:1px solid #bcbcbc;margin-top:4px;top:0;right:-3px}.cke_rtl .cke_toolgroup a.cke_button:last-child:after,.cke_rtl .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after{border-right:0;right:auto;border-left:1px solid #bcbcbc;top:0;left:-3px}.cke_hc .cke_toolgroup a.cke_button:last-child:after,.cke_hc .cke_toolgroup a.cke_button.cke_button_disabled:last-child:after,.cke_hc .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after{border-color:#000;top:0;right:-7px}.cke_hc.cke_rtl .cke_toolgroup a.cke_button:last-child:after,.cke_hc.cke_rtl .cke_toolgroup a.cke_button.cke_button_disabled:last-child:after,.cke_hc.cke_rtl .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after{top:0;right:auto;left:-7px}.cke_toolgroup a.cke_button:hover:last-child:after,.cke_toolgroup a.cke_button.cke_button_on:last-child:after{top:-1px;right:-4px}.cke_rtl .cke_toolgroup a.cke_button:hover:last-child:after,.cke_rtl .cke_toolgroup a.cke_button.cke_button_on:last-child:after{top:-1px;right:auto;left:-4px}.cke_hc .cke_toolgroup a.cke_button:hover:last-child:after,.cke_hc .cke_toolgroup a.cke_button.cke_button_on:last-child:after{top:-2px;right:-9px}.cke_hc.cke_rtl .cke_toolgroup a.cke_button:hover:last-child:after,.cke_hc.cke_rtl .cke_toolgroup a.cke_button.cke_button_on:last-child:after{top:-2px;right:auto;left:-9px}.cke_toolbar.cke_toolbar_last .cke_toolgroup a.cke_button:last-child:after{content:none;border:0;width:0;height:0}.cke_button_icon{cursor:inherit;background-repeat:no-repeat;margin-top:1px;width:16px;height:16px;float:left;display:inline-block}.cke_rtl .cke_button_icon{float:right}.cke_hc .cke_button_icon{display:none}.cke_button_label{display:none;padding-left:3px;margin-top:1px;line-height:17px;vertical-align:middle;float:left;cursor:default;color:#484848}.cke_rtl .cke_button_label{padding-right:3px;padding-left:0;float:right}.cke_hc .cke_button_label{padding:0;display:inline-block;font-size:12px}.cke_button_arrow{display:inline-block;margin:8px 0 0 1px;width:0;height:0;cursor:default;vertical-align:top;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #484848}.cke_rtl .cke_button_arrow{margin-right:5px;margin-left:0}.cke_hc .cke_button_arrow{font-size:10px;margin:3px 0 0 3px;width:auto;border:0}.cke_toolbar_separator{float:left;background-color:#bcbcbc;margin:4px 2px 0 2px;height:18px;width:1px}.cke_rtl .cke_toolbar_separator{float:right}.cke_hc .cke_toolbar_separator{background-color:#000;margin-left:2px;margin-right:5px;margin-bottom:9px}.cke_hc.cke_rtl .cke_toolbar_separator{margin-left:5px;margin-right:2px}.cke_toolbar_break{display:block;clear:left}.cke_rtl .cke_toolbar_break{clear:right}a.cke_toolbox_collapser{width:12px;height:11px;float:right;margin:11px 0 0;font-size:0;cursor:default;text-align:center;border:1px solid #bcbcbc}.cke_rtl .cke_toolbox_collapser{float:left}.cke_toolbox_collapser:hover{background:#e5e5e5}.cke_toolbox_collapser.cke_toolbox_collapser_min{margin:0 2px 4px}.cke_toolbox_collapser .cke_arrow{display:inline-block;height:0;width:0;font-size:0;margin-top:1px;border:3px solid transparent;border-bottom-color:#484848}.cke_toolbox_collapser.cke_toolbox_collapser_min .cke_arrow{margin-top:4px;border-bottom-color:transparent;border-top-color:#484848}.cke_hc .cke_toolbox_collapser .cke_arrow{font-size:8px;width:auto;border:0;margin-top:0}.cke_menuitem span{cursor:default}.cke_menubutton{display:block}.cke_hc .cke_menubutton{padding:2px}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#e9e9e9;display:block;outline:1px dotted}.cke_menubutton:hover{outline:0}.cke_hc .cke_menubutton:hover,.cke_hc .cke_menubutton:focus,.cke_hc .cke_menubutton:active{border:2px solid;padding:0}.cke_menubutton_disabled:hover,.cke_menubutton_disabled:focus,.cke_menubutton_disabled:active{background-color:transparent;outline:0}.cke_menubutton_inner{display:table-row}.cke_menubutton_icon,.cke_menubutton_label,.cke_menuarrow{display:table-cell}.cke_menubutton_icon{background-color:#f8f8f8;padding:6px 4px}.cke_hc .cke_menubutton_icon{height:16px;width:0;padding:4px 0}.cke_menubutton:hover .cke_menubutton_icon,.cke_menubutton:focus .cke_menubutton_icon,.cke_menubutton:active .cke_menubutton_icon{background-color:#e9e9e9}.cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon{background-color:#f8f8f8;outline:0}.cke_menuitem .cke_menubutton_on{background-color:#e9e9e9;border:1px solid #dedede;outline:0}.cke_menubutton_on .cke_menubutton_icon{padding-right:3px;background-color:#e9e9e9}.cke_menubutton_label{padding:0 5px;background-color:transparent;width:100%;vertical-align:middle}.cke_menubutton_shortcut{color:#979797}.cke_menubutton_disabled .cke_menubutton_label{opacity:.3;filter:alpha(opacity=30)}.cke_panel_frame .cke_menubutton_label{display:none}.cke_menuseparator{background-color:#d1d1d1;height:1px}.cke_menuarrow{background:transparent url(images/arrow.png) no-repeat 0 10px;padding:0 5px}.cke_rtl .cke_menuarrow{background-position:5px -13px;background-repeat:no-repeat}.cke_hc .cke_menuarrow{background-image:none}.cke_menuarrow span{display:none}.cke_hc .cke_menuarrow span{vertical-align:middle;display:inline}.cke_combo{display:inline-block;float:left;position:relative;margin-bottom:5px}.cke_rtl .cke_combo{float:right}.cke_hc .cke_combo{margin-top:1px;margin-bottom:10px}.cke_combo:after{content:"";position:absolute;height:18px;width:0;border-right:1px solid #bcbcbc;margin-top:5px;top:0;right:0}.cke_rtl .cke_combo:after{border-right:0;border-left:1px solid #bcbcbc;right:auto;left:0}.cke_hc .cke_combo:after{border-color:#000}a.cke_combo_button{cursor:default;display:inline-block;float:left;margin:0;padding:1px}.cke_rtl a.cke_combo_button{float:right}.cke_hc a.cke_combo_button{padding:4px}.cke_combo_on a.cke_combo_button,.cke_combo_off a.cke_combo_button:hover,.cke_combo_off a.cke_combo_button:focus,.cke_combo_off a.cke_combo_button:active{background:#e5e5e5;border:1px solid #bcbcbc;padding:0 0 0 1px;margin-left:-1px}.cke_combo_off a.cke_combo_button:focus{outline:0}.cke_combo_on a.cke_combo_button,.cke_combo_off a.cke_combo_button:active{background:#fff}.cke_rtl .cke_combo_on a.cke_combo_button,.cke_rtl .cke_combo_off a.cke_combo_button:hover,.cke_rtl .cke_combo_off a.cke_combo_button:focus,.cke_rtl .cke_combo_off a.cke_combo_button:active{padding:0 1px 0 0;margin-left:0;margin-right:-1px}.cke_hc .cke_combo_on a.cke_combo_button,.cke_hc .cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_combo_off a.cke_combo_button:active{border:3px solid #000;padding:1px 1px 1px 2px}.cke_hc.cke_rtl .cke_combo_on a.cke_combo_button,.cke_hc.cke_rtl .cke_combo_off a.cke_combo_button:hover,.cke_hc.cke_rtl .cke_combo_off a.cke_combo_button:focus,.cke_hc.cke_rtl .cke_combo_off a.cke_combo_button:active{padding:1px 2px 1px 1px}.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:0 0 0 3px;margin-left:-3px}.cke_rtl .cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_rtl .cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_rtl .cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_rtl .cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:0 3px 0 0;margin-left:0;margin-right:-3px}.cke_hc .cke_toolbar>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_hc .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:1px 1px 1px 7px;margin-left:-6px}.cke_hc.cke_rtl .cke_toolbar>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_hc.cke_rtl .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_hc.cke_rtl .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_hc.cke_rtl .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:1px 7px 1px 1px;margin-left:0;margin-right:-6px}.cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active,.cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:0;margin:0}.cke_hc .cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_hc .cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active,.cke_hc .cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_hc .cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:1px;margin:0}.cke_toolbar .cke_combo+.cke_toolbar_end,.cke_toolbar .cke_combo+.cke_toolgroup{margin-right:0;margin-left:2px}.cke_rtl .cke_toolbar .cke_combo+.cke_toolbar_end,.cke_rtl .cke_toolbar .cke_combo+.cke_toolgroup{margin-left:0;margin-right:2px}.cke_hc .cke_toolbar .cke_combo+.cke_toolbar_end,.cke_hc .cke_toolbar .cke_combo+.cke_toolgroup{margin-left:5px}.cke_hc.cke_rtl .cke_toolbar .cke_combo+.cke_toolbar_end,.cke_hc.cke_rtl .cke_toolbar .cke_combo+.cke_toolgroup{margin-left:0;margin-right:5px}.cke_toolbar.cke_toolbar_last .cke_combo:nth-last-child(-n+2):after{content:none;border:0;width:0;height:0}.cke_combo_text{line-height:26px;padding-left:10px;text-overflow:ellipsis;overflow:hidden;float:left;cursor:default;color:#484848;width:60px}.cke_rtl .cke_combo_text{float:right;text-align:right;padding-left:0;padding-right:10px}.cke_hc .cke_combo_text{line-height:18px;font-size:12px}.cke_combo_open{cursor:default;display:inline-block;font-size:0;height:19px;line-height:17px;margin:1px 10px 1px;width:5px}.cke_hc .cke_combo_open{height:12px}.cke_combo_arrow{cursor:default;margin:11px 0 0;float:left;height:0;width:0;font-size:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #484848}.cke_hc .cke_combo_arrow{font-size:10px;width:auto;border:0;margin-top:3px}.cke_combo_label{display:none;float:left;line-height:26px;vertical-align:top;margin-right:5px}.cke_rtl .cke_combo_label{float:right;margin-left:5px;margin-right:0}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{opacity:.3}.cke_path{float:left;margin:-2px 0 2px}a.cke_path_item,span.cke_path_empty{display:inline-block;float:left;padding:3px 4px;margin-right:2px;cursor:default;text-decoration:none;outline:0;border:0;color:#484848;font-weight:bold;font-size:11px}.cke_rtl .cke_path,.cke_rtl .cke_path_item,.cke_rtl .cke_path_empty{float:right}a.cke_path_item:hover,a.cke_path_item:focus,a.cke_path_item:active{background-color:#e5e5e5}.cke_hc a.cke_path_item:hover,.cke_hc a.cke_path_item:focus,.cke_hc a.cke_path_item:active{border:2px solid;padding:1px 2px}.cke_button__source_label,.cke_button__sourcedialog_label{display:inline}.cke_combopanel__fontsize{width:135px}textarea.cke_source{font-family:'Courier New',Monospace;font-size:small;background-color:#fff;white-space:pre-wrap;border:0;padding:0;margin:0;display:block}.cke_wysiwyg_frame,.cke_wysiwyg_div{background-color:#fff}.cke_notifications_area{pointer-events:none}.cke_notification{pointer-events:auto;position:relative;margin:10px;width:300px;color:white;text-align:center;opacity:.95;filter:alpha(opacity = 95);-webkit-animation:fadeIn .7s;animation:fadeIn .7s}.cke_notification_message a{color:#12306f}@-webkit-keyframes fadeIn{from{opacity:.4}to{opacity:.95}}@keyframes fadeIn{from{opacity:.4}to{opacity:.95}}.cke_notification_success{background:#72b572;border:1px solid #63a563}.cke_notification_warning{background:#c83939;border:1px solid #902b2b}.cke_notification_info{background:#2e9ad0;border:1px solid #0f74a8}.cke_notification_info span.cke_notification_progress{background-color:#0f74a8;display:block;padding:0;margin:0;height:100%;overflow:hidden;position:absolute;z-index:1}.cke_notification_message{position:relative;margin:4px 23px 3px;font-family:Arial,Helvetica,sans-serif;font-size:12px;line-height:18px;z-index:4;text-overflow:ellipsis;overflow:hidden}.cke_notification_close{background-image:url(images/close.png);background-repeat:no-repeat;background-position:50%;position:absolute;cursor:pointer;text-align:center;height:20px;width:20px;top:1px;right:1px;padding:0;margin:0;z-index:5;opacity:.6;filter:alpha(opacity = 60)}.cke_notification_close:hover{opacity:1;filter:alpha(opacity = 100)}.cke_notification_close span{display:none}.cke_notification_warning a.cke_notification_close{opacity:.8;filter:alpha(opacity = 80)}.cke_notification_warning a.cke_notification_close:hover{opacity:1;filter:alpha(opacity = 100)}.cke_chrome{visibility:inherit}.cke_voice_label{display:none}legend.cke_voice_label{display:none}.cke_button__about_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -0px !important;}.cke_button__bold_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -24px !important;}.cke_button__italic_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -48px !important;}.cke_button__strike_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -72px !important;}.cke_button__subscript_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -96px !important;}.cke_button__superscript_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -120px !important;}.cke_button__underline_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -144px !important;}.cke_button__bidiltr_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -168px !important;}.cke_button__bidirtl_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -192px !important;}.cke_button__blockquote_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -216px !important;}.cke_rtl .cke_button__copy_icon, .cke_mixed_dir_content .cke_rtl .cke_button__copy_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -240px !important;}.cke_ltr .cke_button__copy_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -264px !important;}.cke_rtl .cke_button__cut_icon, .cke_mixed_dir_content .cke_rtl .cke_button__cut_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -288px !important;}.cke_ltr .cke_button__cut_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -312px !important;}.cke_rtl .cke_button__paste_icon, .cke_mixed_dir_content .cke_rtl .cke_button__paste_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -336px !important;}.cke_ltr .cke_button__paste_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -360px !important;}.cke_button__bgcolor_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -384px !important;}.cke_button__textcolor_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -408px !important;}.cke_rtl .cke_button__templates_icon, .cke_mixed_dir_content .cke_rtl .cke_button__templates_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -432px !important;}.cke_ltr .cke_button__templates_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -456px !important;}.cke_button__copyformatting_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -480px !important;}.cke_button__creatediv_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -504px !important;}.cke_rtl .cke_button__find_icon, .cke_mixed_dir_content .cke_rtl .cke_button__find_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -528px !important;}.cke_ltr .cke_button__find_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -552px !important;}.cke_button__replace_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -576px !important;}.cke_button__flash_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -600px !important;}.cke_button__button_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -624px !important;}.cke_button__checkbox_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -648px !important;}.cke_button__form_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -672px !important;}.cke_button__hiddenfield_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -696px !important;}.cke_button__imagebutton_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -720px !important;}.cke_button__radio_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -744px !important;}.cke_rtl .cke_button__select_icon, .cke_mixed_dir_content .cke_rtl .cke_button__select_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -768px !important;}.cke_ltr .cke_button__select_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -792px !important;}.cke_rtl .cke_button__textarea_icon, .cke_mixed_dir_content .cke_rtl .cke_button__textarea_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -816px !important;}.cke_ltr .cke_button__textarea_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -840px !important;}.cke_rtl .cke_button__textfield_icon, .cke_mixed_dir_content .cke_rtl .cke_button__textfield_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -864px !important;}.cke_ltr .cke_button__textfield_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -888px !important;}.cke_button__horizontalrule_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -912px !important;}.cke_button__iframe_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -936px !important;}.cke_button__image_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -960px !important;}.cke_rtl .cke_button__indent_icon, .cke_mixed_dir_content .cke_rtl .cke_button__indent_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -984px !important;}.cke_ltr .cke_button__indent_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1008px !important;}.cke_rtl .cke_button__outdent_icon, .cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1032px !important;}.cke_ltr .cke_button__outdent_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1056px !important;}.cke_button__smiley_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1080px !important;}.cke_button__justifyblock_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1104px !important;}.cke_button__justifycenter_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1128px !important;}.cke_button__justifyleft_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1152px !important;}.cke_button__justifyright_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1176px !important;}.cke_button__language_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1200px !important;}.cke_rtl .cke_button__anchor_icon, .cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1224px !important;}.cke_ltr .cke_button__anchor_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1248px !important;}.cke_button__link_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1272px !important;}.cke_button__unlink_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1296px !important;}.cke_rtl .cke_button__bulletedlist_icon, .cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1320px !important;}.cke_ltr .cke_button__bulletedlist_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1344px !important;}.cke_rtl .cke_button__numberedlist_icon, .cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1368px !important;}.cke_ltr .cke_button__numberedlist_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1392px !important;}.cke_button__maximize_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1416px !important;}.cke_rtl .cke_button__newpage_icon, .cke_mixed_dir_content .cke_rtl .cke_button__newpage_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1440px !important;}.cke_ltr .cke_button__newpage_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1464px !important;}.cke_rtl .cke_button__pagebreak_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pagebreak_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1488px !important;}.cke_ltr .cke_button__pagebreak_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1512px !important;}.cke_rtl .cke_button__pastetext_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1536px !important;}.cke_ltr .cke_button__pastetext_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1560px !important;}.cke_rtl .cke_button__pastefromword_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1584px !important;}.cke_ltr .cke_button__pastefromword_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1608px !important;}.cke_rtl .cke_button__preview_icon, .cke_mixed_dir_content .cke_rtl .cke_button__preview_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1632px !important;}.cke_ltr .cke_button__preview_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1656px !important;}.cke_button__print_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1680px !important;}.cke_button__removeformat_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1704px !important;}.cke_button__save_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1728px !important;}.cke_button__selectall_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1752px !important;}.cke_rtl .cke_button__showblocks_icon, .cke_mixed_dir_content .cke_rtl .cke_button__showblocks_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1776px !important;}.cke_ltr .cke_button__showblocks_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1800px !important;}.cke_rtl .cke_button__source_icon, .cke_mixed_dir_content .cke_rtl .cke_button__source_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1824px !important;}.cke_ltr .cke_button__source_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1848px !important;}.cke_button__specialchar_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1872px !important;}.cke_button__scayt_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1896px !important;}.cke_button__table_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1920px !important;}.cke_rtl .cke_button__redo_icon, .cke_mixed_dir_content .cke_rtl .cke_button__redo_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1944px !important;}.cke_ltr .cke_button__redo_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1968px !important;}.cke_rtl .cke_button__undo_icon, .cke_mixed_dir_content .cke_rtl .cke_button__undo_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1992px !important;}.cke_ltr .cke_button__undo_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -2016px !important;}.cke_button__spellchecker_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -2040px !important;}.cke_hidpi .cke_button__about_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -0px !important;background-size: 16px !important;}.cke_hidpi .cke_button__bold_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -24px !important;background-size: 16px !important;}.cke_hidpi .cke_button__italic_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -48px !important;background-size: 16px !important;}.cke_hidpi .cke_button__strike_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -72px !important;background-size: 16px !important;}.cke_hidpi .cke_button__subscript_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -96px !important;background-size: 16px !important;}.cke_hidpi .cke_button__superscript_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -120px !important;background-size: 16px !important;}.cke_hidpi .cke_button__underline_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -144px !important;background-size: 16px !important;}.cke_hidpi .cke_button__bidiltr_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -168px !important;background-size: 16px !important;}.cke_hidpi .cke_button__bidirtl_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -192px !important;background-size: 16px !important;}.cke_hidpi .cke_button__blockquote_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -216px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__copy_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__copy_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -240px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__copy_icon,.cke_ltr.cke_hidpi .cke_button__copy_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -264px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__cut_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__cut_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -288px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__cut_icon,.cke_ltr.cke_hidpi .cke_button__cut_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -312px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__paste_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__paste_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -336px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__paste_icon,.cke_ltr.cke_hidpi .cke_button__paste_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -360px !important;background-size: 16px !important;}.cke_hidpi .cke_button__bgcolor_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -384px !important;background-size: 16px !important;}.cke_hidpi .cke_button__textcolor_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -408px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__templates_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__templates_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -432px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__templates_icon,.cke_ltr.cke_hidpi .cke_button__templates_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -456px !important;background-size: 16px !important;}.cke_hidpi .cke_button__copyformatting_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -480px !important;background-size: 16px !important;}.cke_hidpi .cke_button__creatediv_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -504px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__find_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__find_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -528px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__find_icon,.cke_ltr.cke_hidpi .cke_button__find_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -552px !important;background-size: 16px !important;}.cke_hidpi .cke_button__replace_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -576px !important;background-size: 16px !important;}.cke_hidpi .cke_button__flash_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -600px !important;background-size: 16px !important;}.cke_hidpi .cke_button__button_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -624px !important;background-size: 16px !important;}.cke_hidpi .cke_button__checkbox_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -648px !important;background-size: 16px !important;}.cke_hidpi .cke_button__form_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -672px !important;background-size: 16px !important;}.cke_hidpi .cke_button__hiddenfield_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -696px !important;background-size: 16px !important;}.cke_hidpi .cke_button__imagebutton_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -720px !important;background-size: 16px !important;}.cke_hidpi .cke_button__radio_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -744px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__select_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__select_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -768px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__select_icon,.cke_ltr.cke_hidpi .cke_button__select_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -792px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__textarea_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__textarea_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -816px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__textarea_icon,.cke_ltr.cke_hidpi .cke_button__textarea_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -840px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__textfield_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__textfield_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -864px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__textfield_icon,.cke_ltr.cke_hidpi .cke_button__textfield_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -888px !important;background-size: 16px !important;}.cke_hidpi .cke_button__horizontalrule_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -912px !important;background-size: 16px !important;}.cke_hidpi .cke_button__iframe_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -936px !important;background-size: 16px !important;}.cke_hidpi .cke_button__image_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -960px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__indent_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__indent_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -984px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__indent_icon,.cke_ltr.cke_hidpi .cke_button__indent_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1008px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__outdent_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1032px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__outdent_icon,.cke_ltr.cke_hidpi .cke_button__outdent_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1056px !important;background-size: 16px !important;}.cke_hidpi .cke_button__smiley_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1080px !important;background-size: 16px !important;}.cke_hidpi .cke_button__justifyblock_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1104px !important;background-size: 16px !important;}.cke_hidpi .cke_button__justifycenter_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1128px !important;background-size: 16px !important;}.cke_hidpi .cke_button__justifyleft_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1152px !important;background-size: 16px !important;}.cke_hidpi .cke_button__justifyright_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1176px !important;background-size: 16px !important;}.cke_hidpi .cke_button__language_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1200px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__anchor_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1224px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__anchor_icon,.cke_ltr.cke_hidpi .cke_button__anchor_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1248px !important;background-size: 16px !important;}.cke_hidpi .cke_button__link_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1272px !important;background-size: 16px !important;}.cke_hidpi .cke_button__unlink_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1296px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__bulletedlist_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1320px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__bulletedlist_icon,.cke_ltr.cke_hidpi .cke_button__bulletedlist_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1344px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__numberedlist_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1368px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__numberedlist_icon,.cke_ltr.cke_hidpi .cke_button__numberedlist_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1392px !important;background-size: 16px !important;}.cke_hidpi .cke_button__maximize_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1416px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__newpage_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__newpage_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1440px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__newpage_icon,.cke_ltr.cke_hidpi .cke_button__newpage_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1464px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pagebreak_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pagebreak_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1488px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pagebreak_icon,.cke_ltr.cke_hidpi .cke_button__pagebreak_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1512px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pastetext_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1536px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pastetext_icon,.cke_ltr.cke_hidpi .cke_button__pastetext_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1560px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pastefromword_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1584px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pastefromword_icon,.cke_ltr.cke_hidpi .cke_button__pastefromword_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1608px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__preview_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__preview_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1632px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__preview_icon,.cke_ltr.cke_hidpi .cke_button__preview_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1656px !important;background-size: 16px !important;}.cke_hidpi .cke_button__print_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1680px !important;background-size: 16px !important;}.cke_hidpi .cke_button__removeformat_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1704px !important;background-size: 16px !important;}.cke_hidpi .cke_button__save_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1728px !important;background-size: 16px !important;}.cke_hidpi .cke_button__selectall_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1752px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__showblocks_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__showblocks_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1776px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__showblocks_icon,.cke_ltr.cke_hidpi .cke_button__showblocks_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1800px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__source_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__source_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1824px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__source_icon,.cke_ltr.cke_hidpi .cke_button__source_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1848px !important;background-size: 16px !important;}.cke_hidpi .cke_button__specialchar_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1872px !important;background-size: 16px !important;}.cke_hidpi .cke_button__scayt_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1896px !important;background-size: 16px !important;}.cke_hidpi .cke_button__table_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1920px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__redo_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__redo_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1944px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__redo_icon,.cke_ltr.cke_hidpi .cke_button__redo_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1968px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__undo_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__undo_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1992px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__undo_icon,.cke_ltr.cke_hidpi .cke_button__undo_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -2016px !important;background-size: 16px !important;}.cke_hidpi .cke_button__spellchecker_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -2040px !important;background-size: 16px !important;} \ No newline at end of file diff --git a/libraries/ckeditor/skins/moono-lisa/editor_gecko.css b/libraries/ckeditor/skins/moono-lisa/editor_gecko.css new file mode 100644 index 0000000..ce1ed8c --- /dev/null +++ b/libraries/ckeditor/skins/moono-lisa/editor_gecko.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +.cke_reset{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;position:static;transition:none}.cke_reset_all,.cke_reset_all *,.cke_reset_all a,.cke_reset_all textarea{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;position:static;transition:none;border-collapse:collapse;font:normal normal normal 12px Arial,Helvetica,Tahoma,Verdana,Sans-Serif;color:#000;text-align:left;white-space:nowrap;cursor:auto;float:none}.cke_reset_all .cke_rtl *{text-align:right}.cke_reset_all iframe{vertical-align:inherit}.cke_reset_all textarea{white-space:pre-wrap}.cke_reset_all textarea,.cke_reset_all input[type="text"],.cke_reset_all input[type="password"]{cursor:text}.cke_reset_all textarea[disabled],.cke_reset_all input[type="text"][disabled],.cke_reset_all input[type="password"][disabled]{cursor:default}.cke_reset_all fieldset{padding:10px;border:2px groove #e0dfe3}.cke_reset_all select{box-sizing:border-box}.cke_reset_all table{table-layout:auto}.cke_chrome{display:block;border:1px solid #d1d1d1;padding:0}.cke_inner{display:block;background:#fff;padding:0;-webkit-touch-callout:none}.cke_float{border:0}.cke_float .cke_inner{padding-bottom:0}.cke_top,.cke_contents,.cke_bottom{display:block;overflow:hidden}.cke_top{border-bottom:1px solid #d1d1d1;background:#f8f8f8;padding:6px 8px 2px;white-space:normal}.cke_float .cke_top{border:1px solid #d1d1d1}.cke_bottom{padding:6px 8px 2px;position:relative;border-top:1px solid #d1d1d1;background:#f8f8f8}.cke_browser_ios .cke_contents{overflow-y:auto;-webkit-overflow-scrolling:touch}.cke_resizer{width:0;height:0;overflow:hidden;border-width:10px 10px 0 0;border-color:transparent #bcbcbc transparent transparent;border-style:dashed solid dashed dashed;font-size:0;vertical-align:bottom;margin-top:6px;margin-bottom:2px}.cke_hc .cke_resizer{font-size:15px;width:auto;height:auto;border-width:0}.cke_resizer_ltr{cursor:se-resize;float:right;margin-right:-4px}.cke_resizer_rtl{border-width:10px 0 0 10px;border-color:transparent transparent transparent #bcbcbc;border-style:dashed dashed dashed solid;cursor:sw-resize;float:left;margin-left:-4px;right:auto}.cke_wysiwyg_div{display:block;height:100%;overflow:auto;padding:0 8px;outline-style:none;box-sizing:border-box}.cke_panel{visibility:visible;width:120px;height:100px;overflow:hidden;background-color:#fff;border:1px solid #d1d1d1}.cke_menu_panel{padding:0;margin:0}.cke_combopanel{width:150px;height:170px}.cke_panel_frame{width:100%;height:100%;font-size:12px;overflow:auto;overflow-x:hidden}.cke_panel_container{overflow-y:auto;overflow-x:hidden}.cke_panel_block:focus{outline:0}.cke_panel_list{margin:0;padding:0;list-style-type:none;white-space:nowrap}.cke_panel_listItem{margin:0;padding:0}.cke_panel_listItem a{padding:6px 7px;display:block;color:inherit!important;text-decoration:none;overflow:hidden;text-overflow:ellipsis}.cke_hc .cke_panel_listItem a{border-style:none}.cke_panel_listItem.cke_selected a,.cke_panel_listItem a:hover,.cke_panel_listItem a:focus,.cke_panel_listItem a:active{background-color:#e9e9e9}.cke_panel_listItem a:focus{outline:1px dotted #000}.cke_hc .cke_panel_listItem a:hover,.cke_hc .cke_panel_listItem a:focus,.cke_hc .cke_panel_listItem a:active{border:2px solid;padding:4px 5px}.cke_panel_listItem p,.cke_panel_listItem h1,.cke_panel_listItem h2,.cke_panel_listItem h3,.cke_panel_listItem h4,.cke_panel_listItem h5,.cke_panel_listItem h6,.cke_panel_listItem pre{margin-top:0;margin-bottom:0}.cke_panel_grouptitle{cursor:default;font-size:11px;font-weight:bold;white-space:nowrap;margin:0;padding:6px 6px 7px 6px;color:#484848;border-bottom:1px solid #d1d1d1;background:#f8f8f8}.cke_colorblock{padding:10px;font-size:11px;font-family:'Microsoft Sans Serif',Tahoma,Arial,Verdana,Sans-Serif}.cke_colorblock,.cke_colorblock a{text-decoration:none;color:#000}a.cke_colorbox{padding:2px;float:left;width:20px;height:20px}.cke_rtl a.cke_colorbox{float:right}a:hover.cke_colorbox,a:focus.cke_colorbox,a:active.cke_colorbox{outline:0;padding:0;border:2px solid #139ff7}a:hover.cke_colorbox{border-color:#bcbcbc}span.cke_colorbox{width:20px;height:20px;float:left}.cke_rtl span.cke_colorbox{float:right}a.cke_colorauto,a.cke_colormore{border:#fff 1px solid;padding:3px;display:block;cursor:pointer}a.cke_colorauto{padding:0;border:1px solid transparent;margin-bottom:6px;height:26px;line-height:26px}a.cke_colormore{margin-top:10px;height:20px;line-height:19px}a:hover.cke_colorauto,a:hover.cke_colormore,a:focus.cke_colorauto,a:focus.cke_colormore,a:active.cke_colorauto,a:active.cke_colormore{outline:0;border:#139ff7 1px solid;background-color:#f8f8f8}a:hover.cke_colorauto,a:hover.cke_colormore{border-color:#bcbcbc}.cke_colorauto span.cke_colorbox{width:18px;height:18px;border:1px solid #808080;margin-left:1px;margin-top:3px}.cke_rtl .cke_colorauto span.cke_colorbox{margin-left:0;margin-right:1px}span.cke_colorbox[style*="#ffffff"],span.cke_colorbox[style*="#FFFFFF"],span.cke_colorbox[style="background-color:#fff"],span.cke_colorbox[style="background-color:#FFF"],span.cke_colorbox[style*="rgb(255,255,255)"],span.cke_colorbox[style*="rgb(255, 255, 255)"]{border:1px solid #808080;width:18px;height:18px}.cke_toolbar{float:left}.cke_rtl .cke_toolbar{float:right}.cke_toolgroup{border:0;float:left;margin:1px 2px 6px 0;padding-right:3px}.cke_rtl .cke_toolgroup{float:right;margin:1px 0 6px 2px;padding-left:3px;padding-right:0}.cke_hc .cke_toolgroup{margin-right:5px;margin-bottom:5px}.cke_hc.cke_rtl .cke_toolgroup{margin-right:0;margin-left:5px}a.cke_button{display:inline-block;height:18px;padding:4px 6px;outline:0;cursor:default;float:left;border:0;position:relative}.cke_rtl a.cke_button{float:right}.cke_hc a.cke_button{border:1px solid black;padding:3px 5px;margin:0 3px 5px 0}.cke_hc.cke_rtl a.cke_button{margin:0 0 5px 3px}a.cke_button_on{background:#fff;border:1px #bcbcbc solid;padding:3px 5px}a.cke_button_off:hover,a.cke_button_off:focus,a.cke_button_off:active{background:#e5e5e5;border:1px #bcbcbc solid;padding:3px 5px}.cke_hc a.cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active{background:#e5e5e5;border:3px solid #000;padding:1px 3px}a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{border:0;padding:4px 6px;background-color:transparent}a.cke_button_disabled:focus{border:1px #bcbcbc solid;padding:3px 5px}.cke_hc a.cke_button_disabled:hover,.cke_hc a.cke_button_disabled:focus,.cke_hc a.cke_button_disabled:active{border:1px solid #acacac;padding:3px 5px;margin:0 3px 5px 0}.cke_hc a.cke_button_disabled:focus{border:3px solid #000;padding:1px 3px}.cke_hc.cke_rtl a.cke_button_disabled:hover,.cke_hc.cke_rtl a.cke_button_disabled:focus,.cke_hc.cke_rtl a.cke_button_disabled:active{margin:0 0 5px 3px}a.cke_button_disabled .cke_button_icon,a.cke_button_disabled .cke_button_arrow{opacity:.3}.cke_hc a.cke_button_disabled{border-color:#acacac}.cke_hc a.cke_button_disabled .cke_button_icon,.cke_hc a.cke_button_disabled .cke_button_label{opacity:.5}.cke_toolgroup a.cke_button:last-child:after,.cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after{content:"";position:absolute;height:18px;width:0;border-right:1px solid #bcbcbc;margin-top:4px;top:0;right:-3px}.cke_rtl .cke_toolgroup a.cke_button:last-child:after,.cke_rtl .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after{border-right:0;right:auto;border-left:1px solid #bcbcbc;top:0;left:-3px}.cke_hc .cke_toolgroup a.cke_button:last-child:after,.cke_hc .cke_toolgroup a.cke_button.cke_button_disabled:last-child:after,.cke_hc .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after{border-color:#000;top:0;right:-7px}.cke_hc.cke_rtl .cke_toolgroup a.cke_button:last-child:after,.cke_hc.cke_rtl .cke_toolgroup a.cke_button.cke_button_disabled:last-child:after,.cke_hc.cke_rtl .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after{top:0;right:auto;left:-7px}.cke_toolgroup a.cke_button:hover:last-child:after,.cke_toolgroup a.cke_button.cke_button_on:last-child:after{top:-1px;right:-4px}.cke_rtl .cke_toolgroup a.cke_button:hover:last-child:after,.cke_rtl .cke_toolgroup a.cke_button.cke_button_on:last-child:after{top:-1px;right:auto;left:-4px}.cke_hc .cke_toolgroup a.cke_button:hover:last-child:after,.cke_hc .cke_toolgroup a.cke_button.cke_button_on:last-child:after{top:-2px;right:-9px}.cke_hc.cke_rtl .cke_toolgroup a.cke_button:hover:last-child:after,.cke_hc.cke_rtl .cke_toolgroup a.cke_button.cke_button_on:last-child:after{top:-2px;right:auto;left:-9px}.cke_toolbar.cke_toolbar_last .cke_toolgroup a.cke_button:last-child:after{content:none;border:0;width:0;height:0}.cke_button_icon{cursor:inherit;background-repeat:no-repeat;margin-top:1px;width:16px;height:16px;float:left;display:inline-block}.cke_rtl .cke_button_icon{float:right}.cke_hc .cke_button_icon{display:none}.cke_button_label{display:none;padding-left:3px;margin-top:1px;line-height:17px;vertical-align:middle;float:left;cursor:default;color:#484848}.cke_rtl .cke_button_label{padding-right:3px;padding-left:0;float:right}.cke_hc .cke_button_label{padding:0;display:inline-block;font-size:12px}.cke_button_arrow{display:inline-block;margin:8px 0 0 1px;width:0;height:0;cursor:default;vertical-align:top;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #484848}.cke_rtl .cke_button_arrow{margin-right:5px;margin-left:0}.cke_hc .cke_button_arrow{font-size:10px;margin:3px 0 0 3px;width:auto;border:0}.cke_toolbar_separator{float:left;background-color:#bcbcbc;margin:4px 2px 0 2px;height:18px;width:1px}.cke_rtl .cke_toolbar_separator{float:right}.cke_hc .cke_toolbar_separator{background-color:#000;margin-left:2px;margin-right:5px;margin-bottom:9px}.cke_hc.cke_rtl .cke_toolbar_separator{margin-left:5px;margin-right:2px}.cke_toolbar_break{display:block;clear:left}.cke_rtl .cke_toolbar_break{clear:right}a.cke_toolbox_collapser{width:12px;height:11px;float:right;margin:11px 0 0;font-size:0;cursor:default;text-align:center;border:1px solid #bcbcbc}.cke_rtl .cke_toolbox_collapser{float:left}.cke_toolbox_collapser:hover{background:#e5e5e5}.cke_toolbox_collapser.cke_toolbox_collapser_min{margin:0 2px 4px}.cke_toolbox_collapser .cke_arrow{display:inline-block;height:0;width:0;font-size:0;margin-top:1px;border:3px solid transparent;border-bottom-color:#484848}.cke_toolbox_collapser.cke_toolbox_collapser_min .cke_arrow{margin-top:4px;border-bottom-color:transparent;border-top-color:#484848}.cke_hc .cke_toolbox_collapser .cke_arrow{font-size:8px;width:auto;border:0;margin-top:0}.cke_menuitem span{cursor:default}.cke_menubutton{display:block}.cke_hc .cke_menubutton{padding:2px}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#e9e9e9;display:block;outline:1px dotted}.cke_menubutton:hover{outline:0}.cke_hc .cke_menubutton:hover,.cke_hc .cke_menubutton:focus,.cke_hc .cke_menubutton:active{border:2px solid;padding:0}.cke_menubutton_disabled:hover,.cke_menubutton_disabled:focus,.cke_menubutton_disabled:active{background-color:transparent;outline:0}.cke_menubutton_inner{display:table-row}.cke_menubutton_icon,.cke_menubutton_label,.cke_menuarrow{display:table-cell}.cke_menubutton_icon{background-color:#f8f8f8;padding:6px 4px}.cke_hc .cke_menubutton_icon{height:16px;width:0;padding:4px 0}.cke_menubutton:hover .cke_menubutton_icon,.cke_menubutton:focus .cke_menubutton_icon,.cke_menubutton:active .cke_menubutton_icon{background-color:#e9e9e9}.cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon{background-color:#f8f8f8;outline:0}.cke_menuitem .cke_menubutton_on{background-color:#e9e9e9;border:1px solid #dedede;outline:0}.cke_menubutton_on .cke_menubutton_icon{padding-right:3px;background-color:#e9e9e9}.cke_menubutton_label{padding:0 5px;background-color:transparent;width:100%;vertical-align:middle}.cke_menubutton_shortcut{color:#979797}.cke_menubutton_disabled .cke_menubutton_label{opacity:.3;filter:alpha(opacity=30)}.cke_panel_frame .cke_menubutton_label{display:none}.cke_menuseparator{background-color:#d1d1d1;height:1px}.cke_menuarrow{background:transparent url(images/arrow.png) no-repeat 0 10px;padding:0 5px}.cke_rtl .cke_menuarrow{background-position:5px -13px;background-repeat:no-repeat}.cke_hc .cke_menuarrow{background-image:none}.cke_menuarrow span{display:none}.cke_hc .cke_menuarrow span{vertical-align:middle;display:inline}.cke_combo{display:inline-block;float:left;position:relative;margin-bottom:5px}.cke_rtl .cke_combo{float:right}.cke_hc .cke_combo{margin-top:1px;margin-bottom:10px}.cke_combo:after{content:"";position:absolute;height:18px;width:0;border-right:1px solid #bcbcbc;margin-top:5px;top:0;right:0}.cke_rtl .cke_combo:after{border-right:0;border-left:1px solid #bcbcbc;right:auto;left:0}.cke_hc .cke_combo:after{border-color:#000}a.cke_combo_button{cursor:default;display:inline-block;float:left;margin:0;padding:1px}.cke_rtl a.cke_combo_button{float:right}.cke_hc a.cke_combo_button{padding:4px}.cke_combo_on a.cke_combo_button,.cke_combo_off a.cke_combo_button:hover,.cke_combo_off a.cke_combo_button:focus,.cke_combo_off a.cke_combo_button:active{background:#e5e5e5;border:1px solid #bcbcbc;padding:0 0 0 1px;margin-left:-1px}.cke_combo_off a.cke_combo_button:focus{outline:0}.cke_combo_on a.cke_combo_button,.cke_combo_off a.cke_combo_button:active{background:#fff}.cke_rtl .cke_combo_on a.cke_combo_button,.cke_rtl .cke_combo_off a.cke_combo_button:hover,.cke_rtl .cke_combo_off a.cke_combo_button:focus,.cke_rtl .cke_combo_off a.cke_combo_button:active{padding:0 1px 0 0;margin-left:0;margin-right:-1px}.cke_hc .cke_combo_on a.cke_combo_button,.cke_hc .cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_combo_off a.cke_combo_button:active{border:3px solid #000;padding:1px 1px 1px 2px}.cke_hc.cke_rtl .cke_combo_on a.cke_combo_button,.cke_hc.cke_rtl .cke_combo_off a.cke_combo_button:hover,.cke_hc.cke_rtl .cke_combo_off a.cke_combo_button:focus,.cke_hc.cke_rtl .cke_combo_off a.cke_combo_button:active{padding:1px 2px 1px 1px}.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:0 0 0 3px;margin-left:-3px}.cke_rtl .cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_rtl .cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_rtl .cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_rtl .cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:0 3px 0 0;margin-left:0;margin-right:-3px}.cke_hc .cke_toolbar>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_hc .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:1px 1px 1px 7px;margin-left:-6px}.cke_hc.cke_rtl .cke_toolbar>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_hc.cke_rtl .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_hc.cke_rtl .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_hc.cke_rtl .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:1px 7px 1px 1px;margin-left:0;margin-right:-6px}.cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active,.cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:0;margin:0}.cke_hc .cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_hc .cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active,.cke_hc .cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_hc .cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:1px;margin:0}.cke_toolbar .cke_combo+.cke_toolbar_end,.cke_toolbar .cke_combo+.cke_toolgroup{margin-right:0;margin-left:2px}.cke_rtl .cke_toolbar .cke_combo+.cke_toolbar_end,.cke_rtl .cke_toolbar .cke_combo+.cke_toolgroup{margin-left:0;margin-right:2px}.cke_hc .cke_toolbar .cke_combo+.cke_toolbar_end,.cke_hc .cke_toolbar .cke_combo+.cke_toolgroup{margin-left:5px}.cke_hc.cke_rtl .cke_toolbar .cke_combo+.cke_toolbar_end,.cke_hc.cke_rtl .cke_toolbar .cke_combo+.cke_toolgroup{margin-left:0;margin-right:5px}.cke_toolbar.cke_toolbar_last .cke_combo:nth-last-child(-n+2):after{content:none;border:0;width:0;height:0}.cke_combo_text{line-height:26px;padding-left:10px;text-overflow:ellipsis;overflow:hidden;float:left;cursor:default;color:#484848;width:60px}.cke_rtl .cke_combo_text{float:right;text-align:right;padding-left:0;padding-right:10px}.cke_hc .cke_combo_text{line-height:18px;font-size:12px}.cke_combo_open{cursor:default;display:inline-block;font-size:0;height:19px;line-height:17px;margin:1px 10px 1px;width:5px}.cke_hc .cke_combo_open{height:12px}.cke_combo_arrow{cursor:default;margin:11px 0 0;float:left;height:0;width:0;font-size:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #484848}.cke_hc .cke_combo_arrow{font-size:10px;width:auto;border:0;margin-top:3px}.cke_combo_label{display:none;float:left;line-height:26px;vertical-align:top;margin-right:5px}.cke_rtl .cke_combo_label{float:right;margin-left:5px;margin-right:0}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{opacity:.3}.cke_path{float:left;margin:-2px 0 2px}a.cke_path_item,span.cke_path_empty{display:inline-block;float:left;padding:3px 4px;margin-right:2px;cursor:default;text-decoration:none;outline:0;border:0;color:#484848;font-weight:bold;font-size:11px}.cke_rtl .cke_path,.cke_rtl .cke_path_item,.cke_rtl .cke_path_empty{float:right}a.cke_path_item:hover,a.cke_path_item:focus,a.cke_path_item:active{background-color:#e5e5e5}.cke_hc a.cke_path_item:hover,.cke_hc a.cke_path_item:focus,.cke_hc a.cke_path_item:active{border:2px solid;padding:1px 2px}.cke_button__source_label,.cke_button__sourcedialog_label{display:inline}.cke_combopanel__fontsize{width:135px}textarea.cke_source{font-family:'Courier New',Monospace;font-size:small;background-color:#fff;white-space:pre-wrap;border:0;padding:0;margin:0;display:block}.cke_wysiwyg_frame,.cke_wysiwyg_div{background-color:#fff}.cke_notifications_area{pointer-events:none}.cke_notification{pointer-events:auto;position:relative;margin:10px;width:300px;color:white;text-align:center;opacity:.95;filter:alpha(opacity = 95);-webkit-animation:fadeIn .7s;animation:fadeIn .7s}.cke_notification_message a{color:#12306f}@-webkit-keyframes fadeIn{from{opacity:.4}to{opacity:.95}}@keyframes fadeIn{from{opacity:.4}to{opacity:.95}}.cke_notification_success{background:#72b572;border:1px solid #63a563}.cke_notification_warning{background:#c83939;border:1px solid #902b2b}.cke_notification_info{background:#2e9ad0;border:1px solid #0f74a8}.cke_notification_info span.cke_notification_progress{background-color:#0f74a8;display:block;padding:0;margin:0;height:100%;overflow:hidden;position:absolute;z-index:1}.cke_notification_message{position:relative;margin:4px 23px 3px;font-family:Arial,Helvetica,sans-serif;font-size:12px;line-height:18px;z-index:4;text-overflow:ellipsis;overflow:hidden}.cke_notification_close{background-image:url(images/close.png);background-repeat:no-repeat;background-position:50%;position:absolute;cursor:pointer;text-align:center;height:20px;width:20px;top:1px;right:1px;padding:0;margin:0;z-index:5;opacity:.6;filter:alpha(opacity = 60)}.cke_notification_close:hover{opacity:1;filter:alpha(opacity = 100)}.cke_notification_close span{display:none}.cke_notification_warning a.cke_notification_close{opacity:.8;filter:alpha(opacity = 80)}.cke_notification_warning a.cke_notification_close:hover{opacity:1;filter:alpha(opacity = 100)}.cke_chrome{visibility:inherit}.cke_voice_label{display:none}legend.cke_voice_label{display:none}.cke_bottom{padding-bottom:3px}.cke_combo_text{margin-bottom:-1px;margin-top:1px}.cke_button__about_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -0px !important;}.cke_button__bold_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -24px !important;}.cke_button__italic_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -48px !important;}.cke_button__strike_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -72px !important;}.cke_button__subscript_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -96px !important;}.cke_button__superscript_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -120px !important;}.cke_button__underline_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -144px !important;}.cke_button__bidiltr_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -168px !important;}.cke_button__bidirtl_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -192px !important;}.cke_button__blockquote_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -216px !important;}.cke_rtl .cke_button__copy_icon, .cke_mixed_dir_content .cke_rtl .cke_button__copy_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -240px !important;}.cke_ltr .cke_button__copy_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -264px !important;}.cke_rtl .cke_button__cut_icon, .cke_mixed_dir_content .cke_rtl .cke_button__cut_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -288px !important;}.cke_ltr .cke_button__cut_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -312px !important;}.cke_rtl .cke_button__paste_icon, .cke_mixed_dir_content .cke_rtl .cke_button__paste_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -336px !important;}.cke_ltr .cke_button__paste_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -360px !important;}.cke_button__bgcolor_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -384px !important;}.cke_button__textcolor_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -408px !important;}.cke_rtl .cke_button__templates_icon, .cke_mixed_dir_content .cke_rtl .cke_button__templates_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -432px !important;}.cke_ltr .cke_button__templates_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -456px !important;}.cke_button__copyformatting_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -480px !important;}.cke_button__creatediv_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -504px !important;}.cke_rtl .cke_button__find_icon, .cke_mixed_dir_content .cke_rtl .cke_button__find_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -528px !important;}.cke_ltr .cke_button__find_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -552px !important;}.cke_button__replace_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -576px !important;}.cke_button__flash_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -600px !important;}.cke_button__button_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -624px !important;}.cke_button__checkbox_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -648px !important;}.cke_button__form_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -672px !important;}.cke_button__hiddenfield_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -696px !important;}.cke_button__imagebutton_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -720px !important;}.cke_button__radio_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -744px !important;}.cke_rtl .cke_button__select_icon, .cke_mixed_dir_content .cke_rtl .cke_button__select_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -768px !important;}.cke_ltr .cke_button__select_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -792px !important;}.cke_rtl .cke_button__textarea_icon, .cke_mixed_dir_content .cke_rtl .cke_button__textarea_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -816px !important;}.cke_ltr .cke_button__textarea_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -840px !important;}.cke_rtl .cke_button__textfield_icon, .cke_mixed_dir_content .cke_rtl .cke_button__textfield_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -864px !important;}.cke_ltr .cke_button__textfield_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -888px !important;}.cke_button__horizontalrule_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -912px !important;}.cke_button__iframe_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -936px !important;}.cke_button__image_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -960px !important;}.cke_rtl .cke_button__indent_icon, .cke_mixed_dir_content .cke_rtl .cke_button__indent_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -984px !important;}.cke_ltr .cke_button__indent_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1008px !important;}.cke_rtl .cke_button__outdent_icon, .cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1032px !important;}.cke_ltr .cke_button__outdent_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1056px !important;}.cke_button__smiley_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1080px !important;}.cke_button__justifyblock_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1104px !important;}.cke_button__justifycenter_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1128px !important;}.cke_button__justifyleft_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1152px !important;}.cke_button__justifyright_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1176px !important;}.cke_button__language_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1200px !important;}.cke_rtl .cke_button__anchor_icon, .cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1224px !important;}.cke_ltr .cke_button__anchor_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1248px !important;}.cke_button__link_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1272px !important;}.cke_button__unlink_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1296px !important;}.cke_rtl .cke_button__bulletedlist_icon, .cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1320px !important;}.cke_ltr .cke_button__bulletedlist_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1344px !important;}.cke_rtl .cke_button__numberedlist_icon, .cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1368px !important;}.cke_ltr .cke_button__numberedlist_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1392px !important;}.cke_button__maximize_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1416px !important;}.cke_rtl .cke_button__newpage_icon, .cke_mixed_dir_content .cke_rtl .cke_button__newpage_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1440px !important;}.cke_ltr .cke_button__newpage_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1464px !important;}.cke_rtl .cke_button__pagebreak_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pagebreak_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1488px !important;}.cke_ltr .cke_button__pagebreak_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1512px !important;}.cke_rtl .cke_button__pastetext_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1536px !important;}.cke_ltr .cke_button__pastetext_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1560px !important;}.cke_rtl .cke_button__pastefromword_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1584px !important;}.cke_ltr .cke_button__pastefromword_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1608px !important;}.cke_rtl .cke_button__preview_icon, .cke_mixed_dir_content .cke_rtl .cke_button__preview_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1632px !important;}.cke_ltr .cke_button__preview_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1656px !important;}.cke_button__print_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1680px !important;}.cke_button__removeformat_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1704px !important;}.cke_button__save_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1728px !important;}.cke_button__selectall_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1752px !important;}.cke_rtl .cke_button__showblocks_icon, .cke_mixed_dir_content .cke_rtl .cke_button__showblocks_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1776px !important;}.cke_ltr .cke_button__showblocks_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1800px !important;}.cke_rtl .cke_button__source_icon, .cke_mixed_dir_content .cke_rtl .cke_button__source_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1824px !important;}.cke_ltr .cke_button__source_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1848px !important;}.cke_button__specialchar_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1872px !important;}.cke_button__scayt_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1896px !important;}.cke_button__table_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1920px !important;}.cke_rtl .cke_button__redo_icon, .cke_mixed_dir_content .cke_rtl .cke_button__redo_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1944px !important;}.cke_ltr .cke_button__redo_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1968px !important;}.cke_rtl .cke_button__undo_icon, .cke_mixed_dir_content .cke_rtl .cke_button__undo_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1992px !important;}.cke_ltr .cke_button__undo_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -2016px !important;}.cke_button__spellchecker_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -2040px !important;}.cke_hidpi .cke_button__about_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -0px !important;background-size: 16px !important;}.cke_hidpi .cke_button__bold_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -24px !important;background-size: 16px !important;}.cke_hidpi .cke_button__italic_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -48px !important;background-size: 16px !important;}.cke_hidpi .cke_button__strike_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -72px !important;background-size: 16px !important;}.cke_hidpi .cke_button__subscript_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -96px !important;background-size: 16px !important;}.cke_hidpi .cke_button__superscript_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -120px !important;background-size: 16px !important;}.cke_hidpi .cke_button__underline_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -144px !important;background-size: 16px !important;}.cke_hidpi .cke_button__bidiltr_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -168px !important;background-size: 16px !important;}.cke_hidpi .cke_button__bidirtl_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -192px !important;background-size: 16px !important;}.cke_hidpi .cke_button__blockquote_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -216px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__copy_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__copy_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -240px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__copy_icon,.cke_ltr.cke_hidpi .cke_button__copy_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -264px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__cut_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__cut_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -288px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__cut_icon,.cke_ltr.cke_hidpi .cke_button__cut_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -312px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__paste_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__paste_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -336px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__paste_icon,.cke_ltr.cke_hidpi .cke_button__paste_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -360px !important;background-size: 16px !important;}.cke_hidpi .cke_button__bgcolor_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -384px !important;background-size: 16px !important;}.cke_hidpi .cke_button__textcolor_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -408px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__templates_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__templates_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -432px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__templates_icon,.cke_ltr.cke_hidpi .cke_button__templates_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -456px !important;background-size: 16px !important;}.cke_hidpi .cke_button__copyformatting_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -480px !important;background-size: 16px !important;}.cke_hidpi .cke_button__creatediv_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -504px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__find_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__find_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -528px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__find_icon,.cke_ltr.cke_hidpi .cke_button__find_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -552px !important;background-size: 16px !important;}.cke_hidpi .cke_button__replace_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -576px !important;background-size: 16px !important;}.cke_hidpi .cke_button__flash_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -600px !important;background-size: 16px !important;}.cke_hidpi .cke_button__button_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -624px !important;background-size: 16px !important;}.cke_hidpi .cke_button__checkbox_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -648px !important;background-size: 16px !important;}.cke_hidpi .cke_button__form_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -672px !important;background-size: 16px !important;}.cke_hidpi .cke_button__hiddenfield_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -696px !important;background-size: 16px !important;}.cke_hidpi .cke_button__imagebutton_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -720px !important;background-size: 16px !important;}.cke_hidpi .cke_button__radio_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -744px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__select_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__select_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -768px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__select_icon,.cke_ltr.cke_hidpi .cke_button__select_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -792px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__textarea_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__textarea_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -816px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__textarea_icon,.cke_ltr.cke_hidpi .cke_button__textarea_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -840px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__textfield_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__textfield_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -864px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__textfield_icon,.cke_ltr.cke_hidpi .cke_button__textfield_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -888px !important;background-size: 16px !important;}.cke_hidpi .cke_button__horizontalrule_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -912px !important;background-size: 16px !important;}.cke_hidpi .cke_button__iframe_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -936px !important;background-size: 16px !important;}.cke_hidpi .cke_button__image_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -960px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__indent_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__indent_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -984px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__indent_icon,.cke_ltr.cke_hidpi .cke_button__indent_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1008px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__outdent_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1032px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__outdent_icon,.cke_ltr.cke_hidpi .cke_button__outdent_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1056px !important;background-size: 16px !important;}.cke_hidpi .cke_button__smiley_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1080px !important;background-size: 16px !important;}.cke_hidpi .cke_button__justifyblock_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1104px !important;background-size: 16px !important;}.cke_hidpi .cke_button__justifycenter_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1128px !important;background-size: 16px !important;}.cke_hidpi .cke_button__justifyleft_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1152px !important;background-size: 16px !important;}.cke_hidpi .cke_button__justifyright_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1176px !important;background-size: 16px !important;}.cke_hidpi .cke_button__language_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1200px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__anchor_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1224px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__anchor_icon,.cke_ltr.cke_hidpi .cke_button__anchor_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1248px !important;background-size: 16px !important;}.cke_hidpi .cke_button__link_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1272px !important;background-size: 16px !important;}.cke_hidpi .cke_button__unlink_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1296px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__bulletedlist_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1320px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__bulletedlist_icon,.cke_ltr.cke_hidpi .cke_button__bulletedlist_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1344px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__numberedlist_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1368px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__numberedlist_icon,.cke_ltr.cke_hidpi .cke_button__numberedlist_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1392px !important;background-size: 16px !important;}.cke_hidpi .cke_button__maximize_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1416px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__newpage_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__newpage_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1440px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__newpage_icon,.cke_ltr.cke_hidpi .cke_button__newpage_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1464px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pagebreak_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pagebreak_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1488px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pagebreak_icon,.cke_ltr.cke_hidpi .cke_button__pagebreak_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1512px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pastetext_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1536px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pastetext_icon,.cke_ltr.cke_hidpi .cke_button__pastetext_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1560px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pastefromword_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1584px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pastefromword_icon,.cke_ltr.cke_hidpi .cke_button__pastefromword_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1608px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__preview_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__preview_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1632px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__preview_icon,.cke_ltr.cke_hidpi .cke_button__preview_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1656px !important;background-size: 16px !important;}.cke_hidpi .cke_button__print_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1680px !important;background-size: 16px !important;}.cke_hidpi .cke_button__removeformat_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1704px !important;background-size: 16px !important;}.cke_hidpi .cke_button__save_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1728px !important;background-size: 16px !important;}.cke_hidpi .cke_button__selectall_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1752px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__showblocks_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__showblocks_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1776px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__showblocks_icon,.cke_ltr.cke_hidpi .cke_button__showblocks_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1800px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__source_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__source_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1824px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__source_icon,.cke_ltr.cke_hidpi .cke_button__source_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1848px !important;background-size: 16px !important;}.cke_hidpi .cke_button__specialchar_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1872px !important;background-size: 16px !important;}.cke_hidpi .cke_button__scayt_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1896px !important;background-size: 16px !important;}.cke_hidpi .cke_button__table_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1920px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__redo_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__redo_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1944px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__redo_icon,.cke_ltr.cke_hidpi .cke_button__redo_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1968px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__undo_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__undo_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1992px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__undo_icon,.cke_ltr.cke_hidpi .cke_button__undo_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -2016px !important;background-size: 16px !important;}.cke_hidpi .cke_button__spellchecker_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -2040px !important;background-size: 16px !important;} \ No newline at end of file diff --git a/libraries/ckeditor/skins/moono-lisa/editor_ie.css b/libraries/ckeditor/skins/moono-lisa/editor_ie.css new file mode 100644 index 0000000..ff700dc --- /dev/null +++ b/libraries/ckeditor/skins/moono-lisa/editor_ie.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +.cke_reset{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;position:static;transition:none}.cke_reset_all,.cke_reset_all *,.cke_reset_all a,.cke_reset_all textarea{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;position:static;transition:none;border-collapse:collapse;font:normal normal normal 12px Arial,Helvetica,Tahoma,Verdana,Sans-Serif;color:#000;text-align:left;white-space:nowrap;cursor:auto;float:none}.cke_reset_all .cke_rtl *{text-align:right}.cke_reset_all iframe{vertical-align:inherit}.cke_reset_all textarea{white-space:pre-wrap}.cke_reset_all textarea,.cke_reset_all input[type="text"],.cke_reset_all input[type="password"]{cursor:text}.cke_reset_all textarea[disabled],.cke_reset_all input[type="text"][disabled],.cke_reset_all input[type="password"][disabled]{cursor:default}.cke_reset_all fieldset{padding:10px;border:2px groove #e0dfe3}.cke_reset_all select{box-sizing:border-box}.cke_reset_all table{table-layout:auto}.cke_chrome{display:block;border:1px solid #d1d1d1;padding:0}.cke_inner{display:block;background:#fff;padding:0;-webkit-touch-callout:none}.cke_float{border:0}.cke_float .cke_inner{padding-bottom:0}.cke_top,.cke_contents,.cke_bottom{display:block;overflow:hidden}.cke_top{border-bottom:1px solid #d1d1d1;background:#f8f8f8;padding:6px 8px 2px;white-space:normal}.cke_float .cke_top{border:1px solid #d1d1d1}.cke_bottom{padding:6px 8px 2px;position:relative;border-top:1px solid #d1d1d1;background:#f8f8f8}.cke_browser_ios .cke_contents{overflow-y:auto;-webkit-overflow-scrolling:touch}.cke_resizer{width:0;height:0;overflow:hidden;border-width:10px 10px 0 0;border-color:transparent #bcbcbc transparent transparent;border-style:dashed solid dashed dashed;font-size:0;vertical-align:bottom;margin-top:6px;margin-bottom:2px}.cke_hc .cke_resizer{font-size:15px;width:auto;height:auto;border-width:0}.cke_resizer_ltr{cursor:se-resize;float:right;margin-right:-4px}.cke_resizer_rtl{border-width:10px 0 0 10px;border-color:transparent transparent transparent #bcbcbc;border-style:dashed dashed dashed solid;cursor:sw-resize;float:left;margin-left:-4px;right:auto}.cke_wysiwyg_div{display:block;height:100%;overflow:auto;padding:0 8px;outline-style:none;box-sizing:border-box}.cke_panel{visibility:visible;width:120px;height:100px;overflow:hidden;background-color:#fff;border:1px solid #d1d1d1}.cke_menu_panel{padding:0;margin:0}.cke_combopanel{width:150px;height:170px}.cke_panel_frame{width:100%;height:100%;font-size:12px;overflow:auto;overflow-x:hidden}.cke_panel_container{overflow-y:auto;overflow-x:hidden}.cke_panel_block:focus{outline:0}.cke_panel_list{margin:0;padding:0;list-style-type:none;white-space:nowrap}.cke_panel_listItem{margin:0;padding:0}.cke_panel_listItem a{padding:6px 7px;display:block;color:inherit!important;text-decoration:none;overflow:hidden;text-overflow:ellipsis}.cke_hc .cke_panel_listItem a{border-style:none}.cke_panel_listItem.cke_selected a,.cke_panel_listItem a:hover,.cke_panel_listItem a:focus,.cke_panel_listItem a:active{background-color:#e9e9e9}.cke_panel_listItem a:focus{outline:1px dotted #000}.cke_hc .cke_panel_listItem a:hover,.cke_hc .cke_panel_listItem a:focus,.cke_hc .cke_panel_listItem a:active{border:2px solid;padding:4px 5px}.cke_panel_listItem p,.cke_panel_listItem h1,.cke_panel_listItem h2,.cke_panel_listItem h3,.cke_panel_listItem h4,.cke_panel_listItem h5,.cke_panel_listItem h6,.cke_panel_listItem pre{margin-top:0;margin-bottom:0}.cke_panel_grouptitle{cursor:default;font-size:11px;font-weight:bold;white-space:nowrap;margin:0;padding:6px 6px 7px 6px;color:#484848;border-bottom:1px solid #d1d1d1;background:#f8f8f8}.cke_colorblock{padding:10px;font-size:11px;font-family:'Microsoft Sans Serif',Tahoma,Arial,Verdana,Sans-Serif}.cke_colorblock,.cke_colorblock a{text-decoration:none;color:#000}a.cke_colorbox{padding:2px;float:left;width:20px;height:20px}.cke_rtl a.cke_colorbox{float:right}a:hover.cke_colorbox,a:focus.cke_colorbox,a:active.cke_colorbox{outline:0;padding:0;border:2px solid #139ff7}a:hover.cke_colorbox{border-color:#bcbcbc}span.cke_colorbox{width:20px;height:20px;float:left}.cke_rtl span.cke_colorbox{float:right}a.cke_colorauto,a.cke_colormore{border:#fff 1px solid;padding:3px;display:block;cursor:pointer}a.cke_colorauto{padding:0;border:1px solid transparent;margin-bottom:6px;height:26px;line-height:26px}a.cke_colormore{margin-top:10px;height:20px;line-height:19px}a:hover.cke_colorauto,a:hover.cke_colormore,a:focus.cke_colorauto,a:focus.cke_colormore,a:active.cke_colorauto,a:active.cke_colormore{outline:0;border:#139ff7 1px solid;background-color:#f8f8f8}a:hover.cke_colorauto,a:hover.cke_colormore{border-color:#bcbcbc}.cke_colorauto span.cke_colorbox{width:18px;height:18px;border:1px solid #808080;margin-left:1px;margin-top:3px}.cke_rtl .cke_colorauto span.cke_colorbox{margin-left:0;margin-right:1px}span.cke_colorbox[style*="#ffffff"],span.cke_colorbox[style*="#FFFFFF"],span.cke_colorbox[style="background-color:#fff"],span.cke_colorbox[style="background-color:#FFF"],span.cke_colorbox[style*="rgb(255,255,255)"],span.cke_colorbox[style*="rgb(255, 255, 255)"]{border:1px solid #808080;width:18px;height:18px}.cke_toolbar{float:left}.cke_rtl .cke_toolbar{float:right}.cke_toolgroup{border:0;float:left;margin:1px 2px 6px 0;padding-right:3px}.cke_rtl .cke_toolgroup{float:right;margin:1px 0 6px 2px;padding-left:3px;padding-right:0}.cke_hc .cke_toolgroup{margin-right:5px;margin-bottom:5px}.cke_hc.cke_rtl .cke_toolgroup{margin-right:0;margin-left:5px}a.cke_button{display:inline-block;height:18px;padding:4px 6px;outline:0;cursor:default;float:left;border:0;position:relative}.cke_rtl a.cke_button{float:right}.cke_hc a.cke_button{border:1px solid black;padding:3px 5px;margin:0 3px 5px 0}.cke_hc.cke_rtl a.cke_button{margin:0 0 5px 3px}a.cke_button_on{background:#fff;border:1px #bcbcbc solid;padding:3px 5px}a.cke_button_off:hover,a.cke_button_off:focus,a.cke_button_off:active{background:#e5e5e5;border:1px #bcbcbc solid;padding:3px 5px}.cke_hc a.cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active{background:#e5e5e5;border:3px solid #000;padding:1px 3px}a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{border:0;padding:4px 6px;background-color:transparent}a.cke_button_disabled:focus{border:1px #bcbcbc solid;padding:3px 5px}.cke_hc a.cke_button_disabled:hover,.cke_hc a.cke_button_disabled:focus,.cke_hc a.cke_button_disabled:active{border:1px solid #acacac;padding:3px 5px;margin:0 3px 5px 0}.cke_hc a.cke_button_disabled:focus{border:3px solid #000;padding:1px 3px}.cke_hc.cke_rtl a.cke_button_disabled:hover,.cke_hc.cke_rtl a.cke_button_disabled:focus,.cke_hc.cke_rtl a.cke_button_disabled:active{margin:0 0 5px 3px}a.cke_button_disabled .cke_button_icon,a.cke_button_disabled .cke_button_arrow{opacity:.3}.cke_hc a.cke_button_disabled{border-color:#acacac}.cke_hc a.cke_button_disabled .cke_button_icon,.cke_hc a.cke_button_disabled .cke_button_label{opacity:.5}.cke_toolgroup a.cke_button:last-child:after,.cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after{content:"";position:absolute;height:18px;width:0;border-right:1px solid #bcbcbc;margin-top:4px;top:0;right:-3px}.cke_rtl .cke_toolgroup a.cke_button:last-child:after,.cke_rtl .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after{border-right:0;right:auto;border-left:1px solid #bcbcbc;top:0;left:-3px}.cke_hc .cke_toolgroup a.cke_button:last-child:after,.cke_hc .cke_toolgroup a.cke_button.cke_button_disabled:last-child:after,.cke_hc .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after{border-color:#000;top:0;right:-7px}.cke_hc.cke_rtl .cke_toolgroup a.cke_button:last-child:after,.cke_hc.cke_rtl .cke_toolgroup a.cke_button.cke_button_disabled:last-child:after,.cke_hc.cke_rtl .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after{top:0;right:auto;left:-7px}.cke_toolgroup a.cke_button:hover:last-child:after,.cke_toolgroup a.cke_button.cke_button_on:last-child:after{top:-1px;right:-4px}.cke_rtl .cke_toolgroup a.cke_button:hover:last-child:after,.cke_rtl .cke_toolgroup a.cke_button.cke_button_on:last-child:after{top:-1px;right:auto;left:-4px}.cke_hc .cke_toolgroup a.cke_button:hover:last-child:after,.cke_hc .cke_toolgroup a.cke_button.cke_button_on:last-child:after{top:-2px;right:-9px}.cke_hc.cke_rtl .cke_toolgroup a.cke_button:hover:last-child:after,.cke_hc.cke_rtl .cke_toolgroup a.cke_button.cke_button_on:last-child:after{top:-2px;right:auto;left:-9px}.cke_toolbar.cke_toolbar_last .cke_toolgroup a.cke_button:last-child:after{content:none;border:0;width:0;height:0}.cke_button_icon{cursor:inherit;background-repeat:no-repeat;margin-top:1px;width:16px;height:16px;float:left;display:inline-block}.cke_rtl .cke_button_icon{float:right}.cke_hc .cke_button_icon{display:none}.cke_button_label{display:none;padding-left:3px;margin-top:1px;line-height:17px;vertical-align:middle;float:left;cursor:default;color:#484848}.cke_rtl .cke_button_label{padding-right:3px;padding-left:0;float:right}.cke_hc .cke_button_label{padding:0;display:inline-block;font-size:12px}.cke_button_arrow{display:inline-block;margin:8px 0 0 1px;width:0;height:0;cursor:default;vertical-align:top;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #484848}.cke_rtl .cke_button_arrow{margin-right:5px;margin-left:0}.cke_hc .cke_button_arrow{font-size:10px;margin:3px 0 0 3px;width:auto;border:0}.cke_toolbar_separator{float:left;background-color:#bcbcbc;margin:4px 2px 0 2px;height:18px;width:1px}.cke_rtl .cke_toolbar_separator{float:right}.cke_hc .cke_toolbar_separator{background-color:#000;margin-left:2px;margin-right:5px;margin-bottom:9px}.cke_hc.cke_rtl .cke_toolbar_separator{margin-left:5px;margin-right:2px}.cke_toolbar_break{display:block;clear:left}.cke_rtl .cke_toolbar_break{clear:right}a.cke_toolbox_collapser{width:12px;height:11px;float:right;margin:11px 0 0;font-size:0;cursor:default;text-align:center;border:1px solid #bcbcbc}.cke_rtl .cke_toolbox_collapser{float:left}.cke_toolbox_collapser:hover{background:#e5e5e5}.cke_toolbox_collapser.cke_toolbox_collapser_min{margin:0 2px 4px}.cke_toolbox_collapser .cke_arrow{display:inline-block;height:0;width:0;font-size:0;margin-top:1px;border:3px solid transparent;border-bottom-color:#484848}.cke_toolbox_collapser.cke_toolbox_collapser_min .cke_arrow{margin-top:4px;border-bottom-color:transparent;border-top-color:#484848}.cke_hc .cke_toolbox_collapser .cke_arrow{font-size:8px;width:auto;border:0;margin-top:0}.cke_menuitem span{cursor:default}.cke_menubutton{display:block}.cke_hc .cke_menubutton{padding:2px}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#e9e9e9;display:block;outline:1px dotted}.cke_menubutton:hover{outline:0}.cke_hc .cke_menubutton:hover,.cke_hc .cke_menubutton:focus,.cke_hc .cke_menubutton:active{border:2px solid;padding:0}.cke_menubutton_disabled:hover,.cke_menubutton_disabled:focus,.cke_menubutton_disabled:active{background-color:transparent;outline:0}.cke_menubutton_inner{display:table-row}.cke_menubutton_icon,.cke_menubutton_label,.cke_menuarrow{display:table-cell}.cke_menubutton_icon{background-color:#f8f8f8;padding:6px 4px}.cke_hc .cke_menubutton_icon{height:16px;width:0;padding:4px 0}.cke_menubutton:hover .cke_menubutton_icon,.cke_menubutton:focus .cke_menubutton_icon,.cke_menubutton:active .cke_menubutton_icon{background-color:#e9e9e9}.cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon{background-color:#f8f8f8;outline:0}.cke_menuitem .cke_menubutton_on{background-color:#e9e9e9;border:1px solid #dedede;outline:0}.cke_menubutton_on .cke_menubutton_icon{padding-right:3px;background-color:#e9e9e9}.cke_menubutton_label{padding:0 5px;background-color:transparent;width:100%;vertical-align:middle}.cke_menubutton_shortcut{color:#979797}.cke_menubutton_disabled .cke_menubutton_label{opacity:.3;filter:alpha(opacity=30)}.cke_panel_frame .cke_menubutton_label{display:none}.cke_menuseparator{background-color:#d1d1d1;height:1px}.cke_menuarrow{background:transparent url(images/arrow.png) no-repeat 0 10px;padding:0 5px}.cke_rtl .cke_menuarrow{background-position:5px -13px;background-repeat:no-repeat}.cke_hc .cke_menuarrow{background-image:none}.cke_menuarrow span{display:none}.cke_hc .cke_menuarrow span{vertical-align:middle;display:inline}.cke_combo{display:inline-block;float:left;position:relative;margin-bottom:5px}.cke_rtl .cke_combo{float:right}.cke_hc .cke_combo{margin-top:1px;margin-bottom:10px}.cke_combo:after{content:"";position:absolute;height:18px;width:0;border-right:1px solid #bcbcbc;margin-top:5px;top:0;right:0}.cke_rtl .cke_combo:after{border-right:0;border-left:1px solid #bcbcbc;right:auto;left:0}.cke_hc .cke_combo:after{border-color:#000}a.cke_combo_button{cursor:default;display:inline-block;float:left;margin:0;padding:1px}.cke_rtl a.cke_combo_button{float:right}.cke_hc a.cke_combo_button{padding:4px}.cke_combo_on a.cke_combo_button,.cke_combo_off a.cke_combo_button:hover,.cke_combo_off a.cke_combo_button:focus,.cke_combo_off a.cke_combo_button:active{background:#e5e5e5;border:1px solid #bcbcbc;padding:0 0 0 1px;margin-left:-1px}.cke_combo_off a.cke_combo_button:focus{outline:0}.cke_combo_on a.cke_combo_button,.cke_combo_off a.cke_combo_button:active{background:#fff}.cke_rtl .cke_combo_on a.cke_combo_button,.cke_rtl .cke_combo_off a.cke_combo_button:hover,.cke_rtl .cke_combo_off a.cke_combo_button:focus,.cke_rtl .cke_combo_off a.cke_combo_button:active{padding:0 1px 0 0;margin-left:0;margin-right:-1px}.cke_hc .cke_combo_on a.cke_combo_button,.cke_hc .cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_combo_off a.cke_combo_button:active{border:3px solid #000;padding:1px 1px 1px 2px}.cke_hc.cke_rtl .cke_combo_on a.cke_combo_button,.cke_hc.cke_rtl .cke_combo_off a.cke_combo_button:hover,.cke_hc.cke_rtl .cke_combo_off a.cke_combo_button:focus,.cke_hc.cke_rtl .cke_combo_off a.cke_combo_button:active{padding:1px 2px 1px 1px}.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:0 0 0 3px;margin-left:-3px}.cke_rtl .cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_rtl .cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_rtl .cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_rtl .cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:0 3px 0 0;margin-left:0;margin-right:-3px}.cke_hc .cke_toolbar>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_hc .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:1px 1px 1px 7px;margin-left:-6px}.cke_hc.cke_rtl .cke_toolbar>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_hc.cke_rtl .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_hc.cke_rtl .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_hc.cke_rtl .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:1px 7px 1px 1px;margin-left:0;margin-right:-6px}.cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active,.cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:0;margin:0}.cke_hc .cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_hc .cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active,.cke_hc .cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_hc .cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:1px;margin:0}.cke_toolbar .cke_combo+.cke_toolbar_end,.cke_toolbar .cke_combo+.cke_toolgroup{margin-right:0;margin-left:2px}.cke_rtl .cke_toolbar .cke_combo+.cke_toolbar_end,.cke_rtl .cke_toolbar .cke_combo+.cke_toolgroup{margin-left:0;margin-right:2px}.cke_hc .cke_toolbar .cke_combo+.cke_toolbar_end,.cke_hc .cke_toolbar .cke_combo+.cke_toolgroup{margin-left:5px}.cke_hc.cke_rtl .cke_toolbar .cke_combo+.cke_toolbar_end,.cke_hc.cke_rtl .cke_toolbar .cke_combo+.cke_toolgroup{margin-left:0;margin-right:5px}.cke_toolbar.cke_toolbar_last .cke_combo:nth-last-child(-n+2):after{content:none;border:0;width:0;height:0}.cke_combo_text{line-height:26px;padding-left:10px;text-overflow:ellipsis;overflow:hidden;float:left;cursor:default;color:#484848;width:60px}.cke_rtl .cke_combo_text{float:right;text-align:right;padding-left:0;padding-right:10px}.cke_hc .cke_combo_text{line-height:18px;font-size:12px}.cke_combo_open{cursor:default;display:inline-block;font-size:0;height:19px;line-height:17px;margin:1px 10px 1px;width:5px}.cke_hc .cke_combo_open{height:12px}.cke_combo_arrow{cursor:default;margin:11px 0 0;float:left;height:0;width:0;font-size:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #484848}.cke_hc .cke_combo_arrow{font-size:10px;width:auto;border:0;margin-top:3px}.cke_combo_label{display:none;float:left;line-height:26px;vertical-align:top;margin-right:5px}.cke_rtl .cke_combo_label{float:right;margin-left:5px;margin-right:0}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{opacity:.3}.cke_path{float:left;margin:-2px 0 2px}a.cke_path_item,span.cke_path_empty{display:inline-block;float:left;padding:3px 4px;margin-right:2px;cursor:default;text-decoration:none;outline:0;border:0;color:#484848;font-weight:bold;font-size:11px}.cke_rtl .cke_path,.cke_rtl .cke_path_item,.cke_rtl .cke_path_empty{float:right}a.cke_path_item:hover,a.cke_path_item:focus,a.cke_path_item:active{background-color:#e5e5e5}.cke_hc a.cke_path_item:hover,.cke_hc a.cke_path_item:focus,.cke_hc a.cke_path_item:active{border:2px solid;padding:1px 2px}.cke_button__source_label,.cke_button__sourcedialog_label{display:inline}.cke_combopanel__fontsize{width:135px}textarea.cke_source{font-family:'Courier New',Monospace;font-size:small;background-color:#fff;white-space:pre-wrap;border:0;padding:0;margin:0;display:block}.cke_wysiwyg_frame,.cke_wysiwyg_div{background-color:#fff}.cke_notifications_area{pointer-events:none}.cke_notification{pointer-events:auto;position:relative;margin:10px;width:300px;color:white;text-align:center;opacity:.95;filter:alpha(opacity = 95);-webkit-animation:fadeIn .7s;animation:fadeIn .7s}.cke_notification_message a{color:#12306f}@-webkit-keyframes fadeIn{from{opacity:.4}to{opacity:.95}}@keyframes fadeIn{from{opacity:.4}to{opacity:.95}}.cke_notification_success{background:#72b572;border:1px solid #63a563}.cke_notification_warning{background:#c83939;border:1px solid #902b2b}.cke_notification_info{background:#2e9ad0;border:1px solid #0f74a8}.cke_notification_info span.cke_notification_progress{background-color:#0f74a8;display:block;padding:0;margin:0;height:100%;overflow:hidden;position:absolute;z-index:1}.cke_notification_message{position:relative;margin:4px 23px 3px;font-family:Arial,Helvetica,sans-serif;font-size:12px;line-height:18px;z-index:4;text-overflow:ellipsis;overflow:hidden}.cke_notification_close{background-image:url(images/close.png);background-repeat:no-repeat;background-position:50%;position:absolute;cursor:pointer;text-align:center;height:20px;width:20px;top:1px;right:1px;padding:0;margin:0;z-index:5;opacity:.6;filter:alpha(opacity = 60)}.cke_notification_close:hover{opacity:1;filter:alpha(opacity = 100)}.cke_notification_close span{display:none}.cke_notification_warning a.cke_notification_close{opacity:.8;filter:alpha(opacity = 80)}.cke_notification_warning a.cke_notification_close:hover{opacity:1;filter:alpha(opacity = 100)}.cke_chrome{visibility:inherit}.cke_voice_label{display:none}legend.cke_voice_label{display:none}a.cke_button_disabled,a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{filter:alpha(opacity = 30)}.cke_button_disabled .cke_button_icon{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#00ffffff,endColorstr=#00ffffff)}.cke_button_off:hover,.cke_button_off:focus,.cke_button_off:active{filter:alpha(opacity = 100)}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{filter:alpha(opacity = 30)}.cke_toolbox_collapser{border:1px solid #a6a6a6}.cke_toolbox_collapser .cke_arrow{margin-top:1px}.cke_hc .cke_top,.cke_hc .cke_bottom,.cke_hc .cke_combo_button,.cke_hc a.cke_combo_button:hover,.cke_hc a.cke_combo_button:focus,.cke_hc .cke_toolgroup,.cke_hc .cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active,.cke_hc .cke_toolbox_collapser,.cke_hc .cke_toolbox_collapser:hover,.cke_hc .cke_panel_grouptitle{filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.cke_button__about_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -0px !important;}.cke_button__bold_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -24px !important;}.cke_button__italic_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -48px !important;}.cke_button__strike_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -72px !important;}.cke_button__subscript_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -96px !important;}.cke_button__superscript_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -120px !important;}.cke_button__underline_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -144px !important;}.cke_button__bidiltr_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -168px !important;}.cke_button__bidirtl_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -192px !important;}.cke_button__blockquote_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -216px !important;}.cke_rtl .cke_button__copy_icon, .cke_mixed_dir_content .cke_rtl .cke_button__copy_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -240px !important;}.cke_ltr .cke_button__copy_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -264px !important;}.cke_rtl .cke_button__cut_icon, .cke_mixed_dir_content .cke_rtl .cke_button__cut_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -288px !important;}.cke_ltr .cke_button__cut_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -312px !important;}.cke_rtl .cke_button__paste_icon, .cke_mixed_dir_content .cke_rtl .cke_button__paste_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -336px !important;}.cke_ltr .cke_button__paste_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -360px !important;}.cke_button__bgcolor_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -384px !important;}.cke_button__textcolor_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -408px !important;}.cke_rtl .cke_button__templates_icon, .cke_mixed_dir_content .cke_rtl .cke_button__templates_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -432px !important;}.cke_ltr .cke_button__templates_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -456px !important;}.cke_button__copyformatting_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -480px !important;}.cke_button__creatediv_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -504px !important;}.cke_rtl .cke_button__find_icon, .cke_mixed_dir_content .cke_rtl .cke_button__find_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -528px !important;}.cke_ltr .cke_button__find_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -552px !important;}.cke_button__replace_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -576px !important;}.cke_button__flash_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -600px !important;}.cke_button__button_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -624px !important;}.cke_button__checkbox_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -648px !important;}.cke_button__form_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -672px !important;}.cke_button__hiddenfield_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -696px !important;}.cke_button__imagebutton_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -720px !important;}.cke_button__radio_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -744px !important;}.cke_rtl .cke_button__select_icon, .cke_mixed_dir_content .cke_rtl .cke_button__select_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -768px !important;}.cke_ltr .cke_button__select_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -792px !important;}.cke_rtl .cke_button__textarea_icon, .cke_mixed_dir_content .cke_rtl .cke_button__textarea_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -816px !important;}.cke_ltr .cke_button__textarea_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -840px !important;}.cke_rtl .cke_button__textfield_icon, .cke_mixed_dir_content .cke_rtl .cke_button__textfield_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -864px !important;}.cke_ltr .cke_button__textfield_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -888px !important;}.cke_button__horizontalrule_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -912px !important;}.cke_button__iframe_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -936px !important;}.cke_button__image_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -960px !important;}.cke_rtl .cke_button__indent_icon, .cke_mixed_dir_content .cke_rtl .cke_button__indent_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -984px !important;}.cke_ltr .cke_button__indent_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1008px !important;}.cke_rtl .cke_button__outdent_icon, .cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1032px !important;}.cke_ltr .cke_button__outdent_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1056px !important;}.cke_button__smiley_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1080px !important;}.cke_button__justifyblock_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1104px !important;}.cke_button__justifycenter_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1128px !important;}.cke_button__justifyleft_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1152px !important;}.cke_button__justifyright_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1176px !important;}.cke_button__language_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1200px !important;}.cke_rtl .cke_button__anchor_icon, .cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1224px !important;}.cke_ltr .cke_button__anchor_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1248px !important;}.cke_button__link_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1272px !important;}.cke_button__unlink_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1296px !important;}.cke_rtl .cke_button__bulletedlist_icon, .cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1320px !important;}.cke_ltr .cke_button__bulletedlist_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1344px !important;}.cke_rtl .cke_button__numberedlist_icon, .cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1368px !important;}.cke_ltr .cke_button__numberedlist_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1392px !important;}.cke_button__maximize_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1416px !important;}.cke_rtl .cke_button__newpage_icon, .cke_mixed_dir_content .cke_rtl .cke_button__newpage_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1440px !important;}.cke_ltr .cke_button__newpage_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1464px !important;}.cke_rtl .cke_button__pagebreak_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pagebreak_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1488px !important;}.cke_ltr .cke_button__pagebreak_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1512px !important;}.cke_rtl .cke_button__pastetext_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1536px !important;}.cke_ltr .cke_button__pastetext_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1560px !important;}.cke_rtl .cke_button__pastefromword_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1584px !important;}.cke_ltr .cke_button__pastefromword_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1608px !important;}.cke_rtl .cke_button__preview_icon, .cke_mixed_dir_content .cke_rtl .cke_button__preview_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1632px !important;}.cke_ltr .cke_button__preview_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1656px !important;}.cke_button__print_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1680px !important;}.cke_button__removeformat_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1704px !important;}.cke_button__save_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1728px !important;}.cke_button__selectall_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1752px !important;}.cke_rtl .cke_button__showblocks_icon, .cke_mixed_dir_content .cke_rtl .cke_button__showblocks_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1776px !important;}.cke_ltr .cke_button__showblocks_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1800px !important;}.cke_rtl .cke_button__source_icon, .cke_mixed_dir_content .cke_rtl .cke_button__source_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1824px !important;}.cke_ltr .cke_button__source_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1848px !important;}.cke_button__specialchar_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1872px !important;}.cke_button__scayt_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1896px !important;}.cke_button__table_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1920px !important;}.cke_rtl .cke_button__redo_icon, .cke_mixed_dir_content .cke_rtl .cke_button__redo_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1944px !important;}.cke_ltr .cke_button__redo_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1968px !important;}.cke_rtl .cke_button__undo_icon, .cke_mixed_dir_content .cke_rtl .cke_button__undo_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1992px !important;}.cke_ltr .cke_button__undo_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -2016px !important;}.cke_button__spellchecker_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -2040px !important;}.cke_hidpi .cke_button__about_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -0px !important;background-size: 16px !important;}.cke_hidpi .cke_button__bold_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -24px !important;background-size: 16px !important;}.cke_hidpi .cke_button__italic_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -48px !important;background-size: 16px !important;}.cke_hidpi .cke_button__strike_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -72px !important;background-size: 16px !important;}.cke_hidpi .cke_button__subscript_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -96px !important;background-size: 16px !important;}.cke_hidpi .cke_button__superscript_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -120px !important;background-size: 16px !important;}.cke_hidpi .cke_button__underline_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -144px !important;background-size: 16px !important;}.cke_hidpi .cke_button__bidiltr_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -168px !important;background-size: 16px !important;}.cke_hidpi .cke_button__bidirtl_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -192px !important;background-size: 16px !important;}.cke_hidpi .cke_button__blockquote_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -216px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__copy_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__copy_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -240px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__copy_icon,.cke_ltr.cke_hidpi .cke_button__copy_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -264px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__cut_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__cut_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -288px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__cut_icon,.cke_ltr.cke_hidpi .cke_button__cut_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -312px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__paste_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__paste_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -336px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__paste_icon,.cke_ltr.cke_hidpi .cke_button__paste_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -360px !important;background-size: 16px !important;}.cke_hidpi .cke_button__bgcolor_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -384px !important;background-size: 16px !important;}.cke_hidpi .cke_button__textcolor_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -408px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__templates_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__templates_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -432px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__templates_icon,.cke_ltr.cke_hidpi .cke_button__templates_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -456px !important;background-size: 16px !important;}.cke_hidpi .cke_button__copyformatting_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -480px !important;background-size: 16px !important;}.cke_hidpi .cke_button__creatediv_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -504px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__find_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__find_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -528px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__find_icon,.cke_ltr.cke_hidpi .cke_button__find_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -552px !important;background-size: 16px !important;}.cke_hidpi .cke_button__replace_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -576px !important;background-size: 16px !important;}.cke_hidpi .cke_button__flash_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -600px !important;background-size: 16px !important;}.cke_hidpi .cke_button__button_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -624px !important;background-size: 16px !important;}.cke_hidpi .cke_button__checkbox_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -648px !important;background-size: 16px !important;}.cke_hidpi .cke_button__form_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -672px !important;background-size: 16px !important;}.cke_hidpi .cke_button__hiddenfield_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -696px !important;background-size: 16px !important;}.cke_hidpi .cke_button__imagebutton_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -720px !important;background-size: 16px !important;}.cke_hidpi .cke_button__radio_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -744px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__select_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__select_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -768px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__select_icon,.cke_ltr.cke_hidpi .cke_button__select_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -792px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__textarea_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__textarea_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -816px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__textarea_icon,.cke_ltr.cke_hidpi .cke_button__textarea_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -840px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__textfield_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__textfield_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -864px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__textfield_icon,.cke_ltr.cke_hidpi .cke_button__textfield_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -888px !important;background-size: 16px !important;}.cke_hidpi .cke_button__horizontalrule_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -912px !important;background-size: 16px !important;}.cke_hidpi .cke_button__iframe_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -936px !important;background-size: 16px !important;}.cke_hidpi .cke_button__image_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -960px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__indent_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__indent_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -984px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__indent_icon,.cke_ltr.cke_hidpi .cke_button__indent_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1008px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__outdent_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1032px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__outdent_icon,.cke_ltr.cke_hidpi .cke_button__outdent_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1056px !important;background-size: 16px !important;}.cke_hidpi .cke_button__smiley_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1080px !important;background-size: 16px !important;}.cke_hidpi .cke_button__justifyblock_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1104px !important;background-size: 16px !important;}.cke_hidpi .cke_button__justifycenter_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1128px !important;background-size: 16px !important;}.cke_hidpi .cke_button__justifyleft_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1152px !important;background-size: 16px !important;}.cke_hidpi .cke_button__justifyright_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1176px !important;background-size: 16px !important;}.cke_hidpi .cke_button__language_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1200px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__anchor_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1224px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__anchor_icon,.cke_ltr.cke_hidpi .cke_button__anchor_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1248px !important;background-size: 16px !important;}.cke_hidpi .cke_button__link_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1272px !important;background-size: 16px !important;}.cke_hidpi .cke_button__unlink_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1296px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__bulletedlist_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1320px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__bulletedlist_icon,.cke_ltr.cke_hidpi .cke_button__bulletedlist_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1344px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__numberedlist_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1368px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__numberedlist_icon,.cke_ltr.cke_hidpi .cke_button__numberedlist_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1392px !important;background-size: 16px !important;}.cke_hidpi .cke_button__maximize_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1416px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__newpage_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__newpage_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1440px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__newpage_icon,.cke_ltr.cke_hidpi .cke_button__newpage_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1464px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pagebreak_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pagebreak_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1488px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pagebreak_icon,.cke_ltr.cke_hidpi .cke_button__pagebreak_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1512px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pastetext_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1536px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pastetext_icon,.cke_ltr.cke_hidpi .cke_button__pastetext_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1560px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pastefromword_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1584px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pastefromword_icon,.cke_ltr.cke_hidpi .cke_button__pastefromword_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1608px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__preview_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__preview_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1632px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__preview_icon,.cke_ltr.cke_hidpi .cke_button__preview_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1656px !important;background-size: 16px !important;}.cke_hidpi .cke_button__print_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1680px !important;background-size: 16px !important;}.cke_hidpi .cke_button__removeformat_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1704px !important;background-size: 16px !important;}.cke_hidpi .cke_button__save_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1728px !important;background-size: 16px !important;}.cke_hidpi .cke_button__selectall_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1752px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__showblocks_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__showblocks_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1776px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__showblocks_icon,.cke_ltr.cke_hidpi .cke_button__showblocks_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1800px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__source_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__source_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1824px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__source_icon,.cke_ltr.cke_hidpi .cke_button__source_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1848px !important;background-size: 16px !important;}.cke_hidpi .cke_button__specialchar_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1872px !important;background-size: 16px !important;}.cke_hidpi .cke_button__scayt_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1896px !important;background-size: 16px !important;}.cke_hidpi .cke_button__table_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1920px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__redo_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__redo_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1944px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__redo_icon,.cke_ltr.cke_hidpi .cke_button__redo_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1968px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__undo_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__undo_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1992px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__undo_icon,.cke_ltr.cke_hidpi .cke_button__undo_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -2016px !important;background-size: 16px !important;}.cke_hidpi .cke_button__spellchecker_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -2040px !important;background-size: 16px !important;} \ No newline at end of file diff --git a/libraries/ckeditor/skins/moono-lisa/editor_ie8.css b/libraries/ckeditor/skins/moono-lisa/editor_ie8.css new file mode 100644 index 0000000..2280ec4 --- /dev/null +++ b/libraries/ckeditor/skins/moono-lisa/editor_ie8.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +.cke_reset{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;position:static;transition:none}.cke_reset_all,.cke_reset_all *,.cke_reset_all a,.cke_reset_all textarea{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;position:static;transition:none;border-collapse:collapse;font:normal normal normal 12px Arial,Helvetica,Tahoma,Verdana,Sans-Serif;color:#000;text-align:left;white-space:nowrap;cursor:auto;float:none}.cke_reset_all .cke_rtl *{text-align:right}.cke_reset_all iframe{vertical-align:inherit}.cke_reset_all textarea{white-space:pre-wrap}.cke_reset_all textarea,.cke_reset_all input[type="text"],.cke_reset_all input[type="password"]{cursor:text}.cke_reset_all textarea[disabled],.cke_reset_all input[type="text"][disabled],.cke_reset_all input[type="password"][disabled]{cursor:default}.cke_reset_all fieldset{padding:10px;border:2px groove #e0dfe3}.cke_reset_all select{box-sizing:border-box}.cke_reset_all table{table-layout:auto}.cke_chrome{display:block;border:1px solid #d1d1d1;padding:0}.cke_inner{display:block;background:#fff;padding:0;-webkit-touch-callout:none}.cke_float{border:0}.cke_float .cke_inner{padding-bottom:0}.cke_top,.cke_contents,.cke_bottom{display:block;overflow:hidden}.cke_top{border-bottom:1px solid #d1d1d1;background:#f8f8f8;padding:6px 8px 2px;white-space:normal}.cke_float .cke_top{border:1px solid #d1d1d1}.cke_bottom{padding:6px 8px 2px;position:relative;border-top:1px solid #d1d1d1;background:#f8f8f8}.cke_browser_ios .cke_contents{overflow-y:auto;-webkit-overflow-scrolling:touch}.cke_resizer{width:0;height:0;overflow:hidden;border-width:10px 10px 0 0;border-color:transparent #bcbcbc transparent transparent;border-style:dashed solid dashed dashed;font-size:0;vertical-align:bottom;margin-top:6px;margin-bottom:2px}.cke_hc .cke_resizer{font-size:15px;width:auto;height:auto;border-width:0}.cke_resizer_ltr{cursor:se-resize;float:right;margin-right:-4px}.cke_resizer_rtl{border-width:10px 0 0 10px;border-color:transparent transparent transparent #bcbcbc;border-style:dashed dashed dashed solid;cursor:sw-resize;float:left;margin-left:-4px;right:auto}.cke_wysiwyg_div{display:block;height:100%;overflow:auto;padding:0 8px;outline-style:none;box-sizing:border-box}.cke_panel{visibility:visible;width:120px;height:100px;overflow:hidden;background-color:#fff;border:1px solid #d1d1d1}.cke_menu_panel{padding:0;margin:0}.cke_combopanel{width:150px;height:170px}.cke_panel_frame{width:100%;height:100%;font-size:12px;overflow:auto;overflow-x:hidden}.cke_panel_container{overflow-y:auto;overflow-x:hidden}.cke_panel_block:focus{outline:0}.cke_panel_list{margin:0;padding:0;list-style-type:none;white-space:nowrap}.cke_panel_listItem{margin:0;padding:0}.cke_panel_listItem a{padding:6px 7px;display:block;color:inherit!important;text-decoration:none;overflow:hidden;text-overflow:ellipsis}.cke_hc .cke_panel_listItem a{border-style:none}.cke_panel_listItem.cke_selected a,.cke_panel_listItem a:hover,.cke_panel_listItem a:focus,.cke_panel_listItem a:active{background-color:#e9e9e9}.cke_panel_listItem a:focus{outline:1px dotted #000}.cke_hc .cke_panel_listItem a:hover,.cke_hc .cke_panel_listItem a:focus,.cke_hc .cke_panel_listItem a:active{border:2px solid;padding:4px 5px}.cke_panel_listItem p,.cke_panel_listItem h1,.cke_panel_listItem h2,.cke_panel_listItem h3,.cke_panel_listItem h4,.cke_panel_listItem h5,.cke_panel_listItem h6,.cke_panel_listItem pre{margin-top:0;margin-bottom:0}.cke_panel_grouptitle{cursor:default;font-size:11px;font-weight:bold;white-space:nowrap;margin:0;padding:6px 6px 7px 6px;color:#484848;border-bottom:1px solid #d1d1d1;background:#f8f8f8}.cke_colorblock{padding:10px;font-size:11px;font-family:'Microsoft Sans Serif',Tahoma,Arial,Verdana,Sans-Serif}.cke_colorblock,.cke_colorblock a{text-decoration:none;color:#000}a.cke_colorbox{padding:2px;float:left;width:20px;height:20px}.cke_rtl a.cke_colorbox{float:right}a:hover.cke_colorbox,a:focus.cke_colorbox,a:active.cke_colorbox{outline:0;padding:0;border:2px solid #139ff7}a:hover.cke_colorbox{border-color:#bcbcbc}span.cke_colorbox{width:20px;height:20px;float:left}.cke_rtl span.cke_colorbox{float:right}a.cke_colorauto,a.cke_colormore{border:#fff 1px solid;padding:3px;display:block;cursor:pointer}a.cke_colorauto{padding:0;border:1px solid transparent;margin-bottom:6px;height:26px;line-height:26px}a.cke_colormore{margin-top:10px;height:20px;line-height:19px}a:hover.cke_colorauto,a:hover.cke_colormore,a:focus.cke_colorauto,a:focus.cke_colormore,a:active.cke_colorauto,a:active.cke_colormore{outline:0;border:#139ff7 1px solid;background-color:#f8f8f8}a:hover.cke_colorauto,a:hover.cke_colormore{border-color:#bcbcbc}.cke_colorauto span.cke_colorbox{width:18px;height:18px;border:1px solid #808080;margin-left:1px;margin-top:3px}.cke_rtl .cke_colorauto span.cke_colorbox{margin-left:0;margin-right:1px}span.cke_colorbox[style*="#ffffff"],span.cke_colorbox[style*="#FFFFFF"],span.cke_colorbox[style="background-color:#fff"],span.cke_colorbox[style="background-color:#FFF"],span.cke_colorbox[style*="rgb(255,255,255)"],span.cke_colorbox[style*="rgb(255, 255, 255)"]{border:1px solid #808080;width:18px;height:18px}.cke_toolbar{float:left}.cke_rtl .cke_toolbar{float:right}.cke_toolgroup{border:0;float:left;margin:1px 2px 6px 0;padding-right:3px}.cke_rtl .cke_toolgroup{float:right;margin:1px 0 6px 2px;padding-left:3px;padding-right:0}.cke_hc .cke_toolgroup{margin-right:5px;margin-bottom:5px}.cke_hc.cke_rtl .cke_toolgroup{margin-right:0;margin-left:5px}a.cke_button{display:inline-block;height:18px;padding:4px 6px;outline:0;cursor:default;float:left;border:0;position:relative}.cke_rtl a.cke_button{float:right}.cke_hc a.cke_button{border:1px solid black;padding:3px 5px;margin:0 3px 5px 0}.cke_hc.cke_rtl a.cke_button{margin:0 0 5px 3px}a.cke_button_on{background:#fff;border:1px #bcbcbc solid;padding:3px 5px}a.cke_button_off:hover,a.cke_button_off:focus,a.cke_button_off:active{background:#e5e5e5;border:1px #bcbcbc solid;padding:3px 5px}.cke_hc a.cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active{background:#e5e5e5;border:3px solid #000;padding:1px 3px}a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{border:0;padding:4px 6px;background-color:transparent}a.cke_button_disabled:focus{border:1px #bcbcbc solid;padding:3px 5px}.cke_hc a.cke_button_disabled:hover,.cke_hc a.cke_button_disabled:focus,.cke_hc a.cke_button_disabled:active{border:1px solid #acacac;padding:3px 5px;margin:0 3px 5px 0}.cke_hc a.cke_button_disabled:focus{border:3px solid #000;padding:1px 3px}.cke_hc.cke_rtl a.cke_button_disabled:hover,.cke_hc.cke_rtl a.cke_button_disabled:focus,.cke_hc.cke_rtl a.cke_button_disabled:active{margin:0 0 5px 3px}a.cke_button_disabled .cke_button_icon,a.cke_button_disabled .cke_button_arrow{opacity:.3}.cke_hc a.cke_button_disabled{border-color:#acacac}.cke_hc a.cke_button_disabled .cke_button_icon,.cke_hc a.cke_button_disabled .cke_button_label{opacity:.5}.cke_toolgroup a.cke_button:last-child:after,.cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after{content:"";position:absolute;height:18px;width:0;border-right:1px solid #bcbcbc;margin-top:4px;top:0;right:-3px}.cke_rtl .cke_toolgroup a.cke_button:last-child:after,.cke_rtl .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after{border-right:0;right:auto;border-left:1px solid #bcbcbc;top:0;left:-3px}.cke_hc .cke_toolgroup a.cke_button:last-child:after,.cke_hc .cke_toolgroup a.cke_button.cke_button_disabled:last-child:after,.cke_hc .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after{border-color:#000;top:0;right:-7px}.cke_hc.cke_rtl .cke_toolgroup a.cke_button:last-child:after,.cke_hc.cke_rtl .cke_toolgroup a.cke_button.cke_button_disabled:last-child:after,.cke_hc.cke_rtl .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after{top:0;right:auto;left:-7px}.cke_toolgroup a.cke_button:hover:last-child:after,.cke_toolgroup a.cke_button.cke_button_on:last-child:after{top:-1px;right:-4px}.cke_rtl .cke_toolgroup a.cke_button:hover:last-child:after,.cke_rtl .cke_toolgroup a.cke_button.cke_button_on:last-child:after{top:-1px;right:auto;left:-4px}.cke_hc .cke_toolgroup a.cke_button:hover:last-child:after,.cke_hc .cke_toolgroup a.cke_button.cke_button_on:last-child:after{top:-2px;right:-9px}.cke_hc.cke_rtl .cke_toolgroup a.cke_button:hover:last-child:after,.cke_hc.cke_rtl .cke_toolgroup a.cke_button.cke_button_on:last-child:after{top:-2px;right:auto;left:-9px}.cke_toolbar.cke_toolbar_last .cke_toolgroup a.cke_button:last-child:after{content:none;border:0;width:0;height:0}.cke_button_icon{cursor:inherit;background-repeat:no-repeat;margin-top:1px;width:16px;height:16px;float:left;display:inline-block}.cke_rtl .cke_button_icon{float:right}.cke_hc .cke_button_icon{display:none}.cke_button_label{display:none;padding-left:3px;margin-top:1px;line-height:17px;vertical-align:middle;float:left;cursor:default;color:#484848}.cke_rtl .cke_button_label{padding-right:3px;padding-left:0;float:right}.cke_hc .cke_button_label{padding:0;display:inline-block;font-size:12px}.cke_button_arrow{display:inline-block;margin:8px 0 0 1px;width:0;height:0;cursor:default;vertical-align:top;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #484848}.cke_rtl .cke_button_arrow{margin-right:5px;margin-left:0}.cke_hc .cke_button_arrow{font-size:10px;margin:3px 0 0 3px;width:auto;border:0}.cke_toolbar_separator{float:left;background-color:#bcbcbc;margin:4px 2px 0 2px;height:18px;width:1px}.cke_rtl .cke_toolbar_separator{float:right}.cke_hc .cke_toolbar_separator{background-color:#000;margin-left:2px;margin-right:5px;margin-bottom:9px}.cke_hc.cke_rtl .cke_toolbar_separator{margin-left:5px;margin-right:2px}.cke_toolbar_break{display:block;clear:left}.cke_rtl .cke_toolbar_break{clear:right}a.cke_toolbox_collapser{width:12px;height:11px;float:right;margin:11px 0 0;font-size:0;cursor:default;text-align:center;border:1px solid #bcbcbc}.cke_rtl .cke_toolbox_collapser{float:left}.cke_toolbox_collapser:hover{background:#e5e5e5}.cke_toolbox_collapser.cke_toolbox_collapser_min{margin:0 2px 4px}.cke_toolbox_collapser .cke_arrow{display:inline-block;height:0;width:0;font-size:0;margin-top:1px;border:3px solid transparent;border-bottom-color:#484848}.cke_toolbox_collapser.cke_toolbox_collapser_min .cke_arrow{margin-top:4px;border-bottom-color:transparent;border-top-color:#484848}.cke_hc .cke_toolbox_collapser .cke_arrow{font-size:8px;width:auto;border:0;margin-top:0}.cke_menuitem span{cursor:default}.cke_menubutton{display:block}.cke_hc .cke_menubutton{padding:2px}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#e9e9e9;display:block;outline:1px dotted}.cke_menubutton:hover{outline:0}.cke_hc .cke_menubutton:hover,.cke_hc .cke_menubutton:focus,.cke_hc .cke_menubutton:active{border:2px solid;padding:0}.cke_menubutton_disabled:hover,.cke_menubutton_disabled:focus,.cke_menubutton_disabled:active{background-color:transparent;outline:0}.cke_menubutton_inner{display:table-row}.cke_menubutton_icon,.cke_menubutton_label,.cke_menuarrow{display:table-cell}.cke_menubutton_icon{background-color:#f8f8f8;padding:6px 4px}.cke_hc .cke_menubutton_icon{height:16px;width:0;padding:4px 0}.cke_menubutton:hover .cke_menubutton_icon,.cke_menubutton:focus .cke_menubutton_icon,.cke_menubutton:active .cke_menubutton_icon{background-color:#e9e9e9}.cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon{background-color:#f8f8f8;outline:0}.cke_menuitem .cke_menubutton_on{background-color:#e9e9e9;border:1px solid #dedede;outline:0}.cke_menubutton_on .cke_menubutton_icon{padding-right:3px;background-color:#e9e9e9}.cke_menubutton_label{padding:0 5px;background-color:transparent;width:100%;vertical-align:middle}.cke_menubutton_shortcut{color:#979797}.cke_menubutton_disabled .cke_menubutton_label{opacity:.3;filter:alpha(opacity=30)}.cke_panel_frame .cke_menubutton_label{display:none}.cke_menuseparator{background-color:#d1d1d1;height:1px}.cke_menuarrow{background:transparent url(images/arrow.png) no-repeat 0 10px;padding:0 5px}.cke_rtl .cke_menuarrow{background-position:5px -13px;background-repeat:no-repeat}.cke_hc .cke_menuarrow{background-image:none}.cke_menuarrow span{display:none}.cke_hc .cke_menuarrow span{vertical-align:middle;display:inline}.cke_combo{display:inline-block;float:left;position:relative;margin-bottom:5px}.cke_rtl .cke_combo{float:right}.cke_hc .cke_combo{margin-top:1px;margin-bottom:10px}.cke_combo:after{content:"";position:absolute;height:18px;width:0;border-right:1px solid #bcbcbc;margin-top:5px;top:0;right:0}.cke_rtl .cke_combo:after{border-right:0;border-left:1px solid #bcbcbc;right:auto;left:0}.cke_hc .cke_combo:after{border-color:#000}a.cke_combo_button{cursor:default;display:inline-block;float:left;margin:0;padding:1px}.cke_rtl a.cke_combo_button{float:right}.cke_hc a.cke_combo_button{padding:4px}.cke_combo_on a.cke_combo_button,.cke_combo_off a.cke_combo_button:hover,.cke_combo_off a.cke_combo_button:focus,.cke_combo_off a.cke_combo_button:active{background:#e5e5e5;border:1px solid #bcbcbc;padding:0 0 0 1px;margin-left:-1px}.cke_combo_off a.cke_combo_button:focus{outline:0}.cke_combo_on a.cke_combo_button,.cke_combo_off a.cke_combo_button:active{background:#fff}.cke_rtl .cke_combo_on a.cke_combo_button,.cke_rtl .cke_combo_off a.cke_combo_button:hover,.cke_rtl .cke_combo_off a.cke_combo_button:focus,.cke_rtl .cke_combo_off a.cke_combo_button:active{padding:0 1px 0 0;margin-left:0;margin-right:-1px}.cke_hc .cke_combo_on a.cke_combo_button,.cke_hc .cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_combo_off a.cke_combo_button:active{border:3px solid #000;padding:1px 1px 1px 2px}.cke_hc.cke_rtl .cke_combo_on a.cke_combo_button,.cke_hc.cke_rtl .cke_combo_off a.cke_combo_button:hover,.cke_hc.cke_rtl .cke_combo_off a.cke_combo_button:focus,.cke_hc.cke_rtl .cke_combo_off a.cke_combo_button:active{padding:1px 2px 1px 1px}.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:0 0 0 3px;margin-left:-3px}.cke_rtl .cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_rtl .cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_rtl .cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_rtl .cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:0 3px 0 0;margin-left:0;margin-right:-3px}.cke_hc .cke_toolbar>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_hc .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:1px 1px 1px 7px;margin-left:-6px}.cke_hc.cke_rtl .cke_toolbar>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_hc.cke_rtl .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_hc.cke_rtl .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_hc.cke_rtl .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:1px 7px 1px 1px;margin-left:0;margin-right:-6px}.cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active,.cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:0;margin:0}.cke_hc .cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_hc .cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active,.cke_hc .cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_hc .cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:1px;margin:0}.cke_toolbar .cke_combo+.cke_toolbar_end,.cke_toolbar .cke_combo+.cke_toolgroup{margin-right:0;margin-left:2px}.cke_rtl .cke_toolbar .cke_combo+.cke_toolbar_end,.cke_rtl .cke_toolbar .cke_combo+.cke_toolgroup{margin-left:0;margin-right:2px}.cke_hc .cke_toolbar .cke_combo+.cke_toolbar_end,.cke_hc .cke_toolbar .cke_combo+.cke_toolgroup{margin-left:5px}.cke_hc.cke_rtl .cke_toolbar .cke_combo+.cke_toolbar_end,.cke_hc.cke_rtl .cke_toolbar .cke_combo+.cke_toolgroup{margin-left:0;margin-right:5px}.cke_toolbar.cke_toolbar_last .cke_combo:nth-last-child(-n+2):after{content:none;border:0;width:0;height:0}.cke_combo_text{line-height:26px;padding-left:10px;text-overflow:ellipsis;overflow:hidden;float:left;cursor:default;color:#484848;width:60px}.cke_rtl .cke_combo_text{float:right;text-align:right;padding-left:0;padding-right:10px}.cke_hc .cke_combo_text{line-height:18px;font-size:12px}.cke_combo_open{cursor:default;display:inline-block;font-size:0;height:19px;line-height:17px;margin:1px 10px 1px;width:5px}.cke_hc .cke_combo_open{height:12px}.cke_combo_arrow{cursor:default;margin:11px 0 0;float:left;height:0;width:0;font-size:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #484848}.cke_hc .cke_combo_arrow{font-size:10px;width:auto;border:0;margin-top:3px}.cke_combo_label{display:none;float:left;line-height:26px;vertical-align:top;margin-right:5px}.cke_rtl .cke_combo_label{float:right;margin-left:5px;margin-right:0}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{opacity:.3}.cke_path{float:left;margin:-2px 0 2px}a.cke_path_item,span.cke_path_empty{display:inline-block;float:left;padding:3px 4px;margin-right:2px;cursor:default;text-decoration:none;outline:0;border:0;color:#484848;font-weight:bold;font-size:11px}.cke_rtl .cke_path,.cke_rtl .cke_path_item,.cke_rtl .cke_path_empty{float:right}a.cke_path_item:hover,a.cke_path_item:focus,a.cke_path_item:active{background-color:#e5e5e5}.cke_hc a.cke_path_item:hover,.cke_hc a.cke_path_item:focus,.cke_hc a.cke_path_item:active{border:2px solid;padding:1px 2px}.cke_button__source_label,.cke_button__sourcedialog_label{display:inline}.cke_combopanel__fontsize{width:135px}textarea.cke_source{font-family:'Courier New',Monospace;font-size:small;background-color:#fff;white-space:pre-wrap;border:0;padding:0;margin:0;display:block}.cke_wysiwyg_frame,.cke_wysiwyg_div{background-color:#fff}.cke_notifications_area{pointer-events:none}.cke_notification{pointer-events:auto;position:relative;margin:10px;width:300px;color:white;text-align:center;opacity:.95;filter:alpha(opacity = 95);-webkit-animation:fadeIn .7s;animation:fadeIn .7s}.cke_notification_message a{color:#12306f}@-webkit-keyframes fadeIn{from{opacity:.4}to{opacity:.95}}@keyframes fadeIn{from{opacity:.4}to{opacity:.95}}.cke_notification_success{background:#72b572;border:1px solid #63a563}.cke_notification_warning{background:#c83939;border:1px solid #902b2b}.cke_notification_info{background:#2e9ad0;border:1px solid #0f74a8}.cke_notification_info span.cke_notification_progress{background-color:#0f74a8;display:block;padding:0;margin:0;height:100%;overflow:hidden;position:absolute;z-index:1}.cke_notification_message{position:relative;margin:4px 23px 3px;font-family:Arial,Helvetica,sans-serif;font-size:12px;line-height:18px;z-index:4;text-overflow:ellipsis;overflow:hidden}.cke_notification_close{background-image:url(images/close.png);background-repeat:no-repeat;background-position:50%;position:absolute;cursor:pointer;text-align:center;height:20px;width:20px;top:1px;right:1px;padding:0;margin:0;z-index:5;opacity:.6;filter:alpha(opacity = 60)}.cke_notification_close:hover{opacity:1;filter:alpha(opacity = 100)}.cke_notification_close span{display:none}.cke_notification_warning a.cke_notification_close{opacity:.8;filter:alpha(opacity = 80)}.cke_notification_warning a.cke_notification_close:hover{opacity:1;filter:alpha(opacity = 100)}.cke_chrome{visibility:inherit}.cke_voice_label{display:none}legend.cke_voice_label{display:none}a.cke_button_disabled,a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{filter:alpha(opacity = 30)}.cke_button_disabled .cke_button_icon{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#00ffffff,endColorstr=#00ffffff)}.cke_button_off:hover,.cke_button_off:focus,.cke_button_off:active{filter:alpha(opacity = 100)}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{filter:alpha(opacity = 30)}.cke_toolbox_collapser{border:1px solid #a6a6a6}.cke_toolbox_collapser .cke_arrow{margin-top:1px}.cke_hc .cke_top,.cke_hc .cke_bottom,.cke_hc .cke_combo_button,.cke_hc a.cke_combo_button:hover,.cke_hc a.cke_combo_button:focus,.cke_hc .cke_toolgroup,.cke_hc .cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active,.cke_hc .cke_toolbox_collapser,.cke_hc .cke_toolbox_collapser:hover,.cke_hc .cke_panel_grouptitle{filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.cke_toolbox_collapser .cke_arrow{border-width:4px}.cke_toolbox_collapser.cke_toolbox_collapser_min .cke_arrow{border-width:3px}.cke_toolbox_collapser .cke_arrow{margin-top:0}.cke_toolbar{position:relative}.cke_rtl .cke_toolbar_end{right:auto;left:0}.cke_toolbar_end:after{content:"";position:absolute;height:18px;width:0;border-right:1px solid #bcbcbc;margin-top:4px;top:1px;right:2px}.cke_rtl .cke_toolbar_end:after{right:auto;left:2px}.cke_hc .cke_toolbar_end:after{top:2px;right:5px;border-color:#000}.cke_hc.cke_rtl .cke_toolbar_end:after{right:auto;left:5px}.cke_combo+.cke_toolbar_end:after,.cke_toolbar.cke_toolbar_last .cke_toolbar_end:after{content:none;border:0}.cke_combo+.cke_toolgroup+.cke_toolbar_end:after{right:0}.cke_rtl .cke_combo+.cke_toolgroup+.cke_toolbar_end:after{right:auto;left:0}.cke_button__about_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -0px !important;}.cke_button__bold_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -24px !important;}.cke_button__italic_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -48px !important;}.cke_button__strike_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -72px !important;}.cke_button__subscript_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -96px !important;}.cke_button__superscript_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -120px !important;}.cke_button__underline_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -144px !important;}.cke_button__bidiltr_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -168px !important;}.cke_button__bidirtl_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -192px !important;}.cke_button__blockquote_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -216px !important;}.cke_rtl .cke_button__copy_icon, .cke_mixed_dir_content .cke_rtl .cke_button__copy_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -240px !important;}.cke_ltr .cke_button__copy_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -264px !important;}.cke_rtl .cke_button__cut_icon, .cke_mixed_dir_content .cke_rtl .cke_button__cut_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -288px !important;}.cke_ltr .cke_button__cut_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -312px !important;}.cke_rtl .cke_button__paste_icon, .cke_mixed_dir_content .cke_rtl .cke_button__paste_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -336px !important;}.cke_ltr .cke_button__paste_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -360px !important;}.cke_button__bgcolor_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -384px !important;}.cke_button__textcolor_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -408px !important;}.cke_rtl .cke_button__templates_icon, .cke_mixed_dir_content .cke_rtl .cke_button__templates_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -432px !important;}.cke_ltr .cke_button__templates_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -456px !important;}.cke_button__copyformatting_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -480px !important;}.cke_button__creatediv_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -504px !important;}.cke_rtl .cke_button__find_icon, .cke_mixed_dir_content .cke_rtl .cke_button__find_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -528px !important;}.cke_ltr .cke_button__find_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -552px !important;}.cke_button__replace_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -576px !important;}.cke_button__flash_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -600px !important;}.cke_button__button_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -624px !important;}.cke_button__checkbox_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -648px !important;}.cke_button__form_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -672px !important;}.cke_button__hiddenfield_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -696px !important;}.cke_button__imagebutton_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -720px !important;}.cke_button__radio_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -744px !important;}.cke_rtl .cke_button__select_icon, .cke_mixed_dir_content .cke_rtl .cke_button__select_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -768px !important;}.cke_ltr .cke_button__select_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -792px !important;}.cke_rtl .cke_button__textarea_icon, .cke_mixed_dir_content .cke_rtl .cke_button__textarea_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -816px !important;}.cke_ltr .cke_button__textarea_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -840px !important;}.cke_rtl .cke_button__textfield_icon, .cke_mixed_dir_content .cke_rtl .cke_button__textfield_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -864px !important;}.cke_ltr .cke_button__textfield_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -888px !important;}.cke_button__horizontalrule_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -912px !important;}.cke_button__iframe_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -936px !important;}.cke_button__image_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -960px !important;}.cke_rtl .cke_button__indent_icon, .cke_mixed_dir_content .cke_rtl .cke_button__indent_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -984px !important;}.cke_ltr .cke_button__indent_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1008px !important;}.cke_rtl .cke_button__outdent_icon, .cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1032px !important;}.cke_ltr .cke_button__outdent_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1056px !important;}.cke_button__smiley_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1080px !important;}.cke_button__justifyblock_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1104px !important;}.cke_button__justifycenter_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1128px !important;}.cke_button__justifyleft_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1152px !important;}.cke_button__justifyright_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1176px !important;}.cke_button__language_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1200px !important;}.cke_rtl .cke_button__anchor_icon, .cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1224px !important;}.cke_ltr .cke_button__anchor_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1248px !important;}.cke_button__link_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1272px !important;}.cke_button__unlink_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1296px !important;}.cke_rtl .cke_button__bulletedlist_icon, .cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1320px !important;}.cke_ltr .cke_button__bulletedlist_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1344px !important;}.cke_rtl .cke_button__numberedlist_icon, .cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1368px !important;}.cke_ltr .cke_button__numberedlist_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1392px !important;}.cke_button__maximize_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1416px !important;}.cke_rtl .cke_button__newpage_icon, .cke_mixed_dir_content .cke_rtl .cke_button__newpage_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1440px !important;}.cke_ltr .cke_button__newpage_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1464px !important;}.cke_rtl .cke_button__pagebreak_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pagebreak_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1488px !important;}.cke_ltr .cke_button__pagebreak_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1512px !important;}.cke_rtl .cke_button__pastetext_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1536px !important;}.cke_ltr .cke_button__pastetext_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1560px !important;}.cke_rtl .cke_button__pastefromword_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1584px !important;}.cke_ltr .cke_button__pastefromword_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1608px !important;}.cke_rtl .cke_button__preview_icon, .cke_mixed_dir_content .cke_rtl .cke_button__preview_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1632px !important;}.cke_ltr .cke_button__preview_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1656px !important;}.cke_button__print_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1680px !important;}.cke_button__removeformat_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1704px !important;}.cke_button__save_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1728px !important;}.cke_button__selectall_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1752px !important;}.cke_rtl .cke_button__showblocks_icon, .cke_mixed_dir_content .cke_rtl .cke_button__showblocks_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1776px !important;}.cke_ltr .cke_button__showblocks_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1800px !important;}.cke_rtl .cke_button__source_icon, .cke_mixed_dir_content .cke_rtl .cke_button__source_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1824px !important;}.cke_ltr .cke_button__source_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1848px !important;}.cke_button__specialchar_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1872px !important;}.cke_button__scayt_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1896px !important;}.cke_button__table_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1920px !important;}.cke_rtl .cke_button__redo_icon, .cke_mixed_dir_content .cke_rtl .cke_button__redo_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1944px !important;}.cke_ltr .cke_button__redo_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1968px !important;}.cke_rtl .cke_button__undo_icon, .cke_mixed_dir_content .cke_rtl .cke_button__undo_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1992px !important;}.cke_ltr .cke_button__undo_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -2016px !important;}.cke_button__spellchecker_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -2040px !important;}.cke_hidpi .cke_button__about_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -0px !important;background-size: 16px !important;}.cke_hidpi .cke_button__bold_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -24px !important;background-size: 16px !important;}.cke_hidpi .cke_button__italic_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -48px !important;background-size: 16px !important;}.cke_hidpi .cke_button__strike_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -72px !important;background-size: 16px !important;}.cke_hidpi .cke_button__subscript_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -96px !important;background-size: 16px !important;}.cke_hidpi .cke_button__superscript_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -120px !important;background-size: 16px !important;}.cke_hidpi .cke_button__underline_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -144px !important;background-size: 16px !important;}.cke_hidpi .cke_button__bidiltr_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -168px !important;background-size: 16px !important;}.cke_hidpi .cke_button__bidirtl_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -192px !important;background-size: 16px !important;}.cke_hidpi .cke_button__blockquote_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -216px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__copy_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__copy_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -240px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__copy_icon,.cke_ltr.cke_hidpi .cke_button__copy_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -264px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__cut_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__cut_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -288px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__cut_icon,.cke_ltr.cke_hidpi .cke_button__cut_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -312px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__paste_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__paste_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -336px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__paste_icon,.cke_ltr.cke_hidpi .cke_button__paste_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -360px !important;background-size: 16px !important;}.cke_hidpi .cke_button__bgcolor_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -384px !important;background-size: 16px !important;}.cke_hidpi .cke_button__textcolor_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -408px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__templates_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__templates_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -432px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__templates_icon,.cke_ltr.cke_hidpi .cke_button__templates_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -456px !important;background-size: 16px !important;}.cke_hidpi .cke_button__copyformatting_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -480px !important;background-size: 16px !important;}.cke_hidpi .cke_button__creatediv_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -504px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__find_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__find_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -528px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__find_icon,.cke_ltr.cke_hidpi .cke_button__find_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -552px !important;background-size: 16px !important;}.cke_hidpi .cke_button__replace_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -576px !important;background-size: 16px !important;}.cke_hidpi .cke_button__flash_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -600px !important;background-size: 16px !important;}.cke_hidpi .cke_button__button_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -624px !important;background-size: 16px !important;}.cke_hidpi .cke_button__checkbox_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -648px !important;background-size: 16px !important;}.cke_hidpi .cke_button__form_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -672px !important;background-size: 16px !important;}.cke_hidpi .cke_button__hiddenfield_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -696px !important;background-size: 16px !important;}.cke_hidpi .cke_button__imagebutton_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -720px !important;background-size: 16px !important;}.cke_hidpi .cke_button__radio_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -744px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__select_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__select_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -768px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__select_icon,.cke_ltr.cke_hidpi .cke_button__select_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -792px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__textarea_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__textarea_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -816px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__textarea_icon,.cke_ltr.cke_hidpi .cke_button__textarea_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -840px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__textfield_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__textfield_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -864px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__textfield_icon,.cke_ltr.cke_hidpi .cke_button__textfield_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -888px !important;background-size: 16px !important;}.cke_hidpi .cke_button__horizontalrule_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -912px !important;background-size: 16px !important;}.cke_hidpi .cke_button__iframe_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -936px !important;background-size: 16px !important;}.cke_hidpi .cke_button__image_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -960px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__indent_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__indent_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -984px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__indent_icon,.cke_ltr.cke_hidpi .cke_button__indent_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1008px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__outdent_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1032px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__outdent_icon,.cke_ltr.cke_hidpi .cke_button__outdent_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1056px !important;background-size: 16px !important;}.cke_hidpi .cke_button__smiley_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1080px !important;background-size: 16px !important;}.cke_hidpi .cke_button__justifyblock_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1104px !important;background-size: 16px !important;}.cke_hidpi .cke_button__justifycenter_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1128px !important;background-size: 16px !important;}.cke_hidpi .cke_button__justifyleft_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1152px !important;background-size: 16px !important;}.cke_hidpi .cke_button__justifyright_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1176px !important;background-size: 16px !important;}.cke_hidpi .cke_button__language_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1200px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__anchor_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1224px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__anchor_icon,.cke_ltr.cke_hidpi .cke_button__anchor_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1248px !important;background-size: 16px !important;}.cke_hidpi .cke_button__link_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1272px !important;background-size: 16px !important;}.cke_hidpi .cke_button__unlink_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1296px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__bulletedlist_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1320px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__bulletedlist_icon,.cke_ltr.cke_hidpi .cke_button__bulletedlist_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1344px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__numberedlist_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1368px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__numberedlist_icon,.cke_ltr.cke_hidpi .cke_button__numberedlist_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1392px !important;background-size: 16px !important;}.cke_hidpi .cke_button__maximize_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1416px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__newpage_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__newpage_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1440px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__newpage_icon,.cke_ltr.cke_hidpi .cke_button__newpage_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1464px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pagebreak_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pagebreak_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1488px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pagebreak_icon,.cke_ltr.cke_hidpi .cke_button__pagebreak_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1512px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pastetext_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1536px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pastetext_icon,.cke_ltr.cke_hidpi .cke_button__pastetext_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1560px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pastefromword_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1584px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pastefromword_icon,.cke_ltr.cke_hidpi .cke_button__pastefromword_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1608px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__preview_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__preview_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1632px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__preview_icon,.cke_ltr.cke_hidpi .cke_button__preview_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1656px !important;background-size: 16px !important;}.cke_hidpi .cke_button__print_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1680px !important;background-size: 16px !important;}.cke_hidpi .cke_button__removeformat_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1704px !important;background-size: 16px !important;}.cke_hidpi .cke_button__save_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1728px !important;background-size: 16px !important;}.cke_hidpi .cke_button__selectall_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1752px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__showblocks_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__showblocks_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1776px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__showblocks_icon,.cke_ltr.cke_hidpi .cke_button__showblocks_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1800px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__source_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__source_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1824px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__source_icon,.cke_ltr.cke_hidpi .cke_button__source_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1848px !important;background-size: 16px !important;}.cke_hidpi .cke_button__specialchar_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1872px !important;background-size: 16px !important;}.cke_hidpi .cke_button__scayt_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1896px !important;background-size: 16px !important;}.cke_hidpi .cke_button__table_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1920px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__redo_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__redo_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1944px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__redo_icon,.cke_ltr.cke_hidpi .cke_button__redo_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1968px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__undo_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__undo_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1992px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__undo_icon,.cke_ltr.cke_hidpi .cke_button__undo_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -2016px !important;background-size: 16px !important;}.cke_hidpi .cke_button__spellchecker_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -2040px !important;background-size: 16px !important;} \ No newline at end of file diff --git a/libraries/ckeditor/skins/moono-lisa/editor_iequirks.css b/libraries/ckeditor/skins/moono-lisa/editor_iequirks.css new file mode 100644 index 0000000..cc793a2 --- /dev/null +++ b/libraries/ckeditor/skins/moono-lisa/editor_iequirks.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +.cke_reset{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;position:static;transition:none}.cke_reset_all,.cke_reset_all *,.cke_reset_all a,.cke_reset_all textarea{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;position:static;transition:none;border-collapse:collapse;font:normal normal normal 12px Arial,Helvetica,Tahoma,Verdana,Sans-Serif;color:#000;text-align:left;white-space:nowrap;cursor:auto;float:none}.cke_reset_all .cke_rtl *{text-align:right}.cke_reset_all iframe{vertical-align:inherit}.cke_reset_all textarea{white-space:pre-wrap}.cke_reset_all textarea,.cke_reset_all input[type="text"],.cke_reset_all input[type="password"]{cursor:text}.cke_reset_all textarea[disabled],.cke_reset_all input[type="text"][disabled],.cke_reset_all input[type="password"][disabled]{cursor:default}.cke_reset_all fieldset{padding:10px;border:2px groove #e0dfe3}.cke_reset_all select{box-sizing:border-box}.cke_reset_all table{table-layout:auto}.cke_chrome{display:block;border:1px solid #d1d1d1;padding:0}.cke_inner{display:block;background:#fff;padding:0;-webkit-touch-callout:none}.cke_float{border:0}.cke_float .cke_inner{padding-bottom:0}.cke_top,.cke_contents,.cke_bottom{display:block;overflow:hidden}.cke_top{border-bottom:1px solid #d1d1d1;background:#f8f8f8;padding:6px 8px 2px;white-space:normal}.cke_float .cke_top{border:1px solid #d1d1d1}.cke_bottom{padding:6px 8px 2px;position:relative;border-top:1px solid #d1d1d1;background:#f8f8f8}.cke_browser_ios .cke_contents{overflow-y:auto;-webkit-overflow-scrolling:touch}.cke_resizer{width:0;height:0;overflow:hidden;border-width:10px 10px 0 0;border-color:transparent #bcbcbc transparent transparent;border-style:dashed solid dashed dashed;font-size:0;vertical-align:bottom;margin-top:6px;margin-bottom:2px}.cke_hc .cke_resizer{font-size:15px;width:auto;height:auto;border-width:0}.cke_resizer_ltr{cursor:se-resize;float:right;margin-right:-4px}.cke_resizer_rtl{border-width:10px 0 0 10px;border-color:transparent transparent transparent #bcbcbc;border-style:dashed dashed dashed solid;cursor:sw-resize;float:left;margin-left:-4px;right:auto}.cke_wysiwyg_div{display:block;height:100%;overflow:auto;padding:0 8px;outline-style:none;box-sizing:border-box}.cke_panel{visibility:visible;width:120px;height:100px;overflow:hidden;background-color:#fff;border:1px solid #d1d1d1}.cke_menu_panel{padding:0;margin:0}.cke_combopanel{width:150px;height:170px}.cke_panel_frame{width:100%;height:100%;font-size:12px;overflow:auto;overflow-x:hidden}.cke_panel_container{overflow-y:auto;overflow-x:hidden}.cke_panel_block:focus{outline:0}.cke_panel_list{margin:0;padding:0;list-style-type:none;white-space:nowrap}.cke_panel_listItem{margin:0;padding:0}.cke_panel_listItem a{padding:6px 7px;display:block;color:inherit!important;text-decoration:none;overflow:hidden;text-overflow:ellipsis}.cke_hc .cke_panel_listItem a{border-style:none}.cke_panel_listItem.cke_selected a,.cke_panel_listItem a:hover,.cke_panel_listItem a:focus,.cke_panel_listItem a:active{background-color:#e9e9e9}.cke_panel_listItem a:focus{outline:1px dotted #000}.cke_hc .cke_panel_listItem a:hover,.cke_hc .cke_panel_listItem a:focus,.cke_hc .cke_panel_listItem a:active{border:2px solid;padding:4px 5px}.cke_panel_listItem p,.cke_panel_listItem h1,.cke_panel_listItem h2,.cke_panel_listItem h3,.cke_panel_listItem h4,.cke_panel_listItem h5,.cke_panel_listItem h6,.cke_panel_listItem pre{margin-top:0;margin-bottom:0}.cke_panel_grouptitle{cursor:default;font-size:11px;font-weight:bold;white-space:nowrap;margin:0;padding:6px 6px 7px 6px;color:#484848;border-bottom:1px solid #d1d1d1;background:#f8f8f8}.cke_colorblock{padding:10px;font-size:11px;font-family:'Microsoft Sans Serif',Tahoma,Arial,Verdana,Sans-Serif}.cke_colorblock,.cke_colorblock a{text-decoration:none;color:#000}a.cke_colorbox{padding:2px;float:left;width:20px;height:20px}.cke_rtl a.cke_colorbox{float:right}a:hover.cke_colorbox,a:focus.cke_colorbox,a:active.cke_colorbox{outline:0;padding:0;border:2px solid #139ff7}a:hover.cke_colorbox{border-color:#bcbcbc}span.cke_colorbox{width:20px;height:20px;float:left}.cke_rtl span.cke_colorbox{float:right}a.cke_colorauto,a.cke_colormore{border:#fff 1px solid;padding:3px;display:block;cursor:pointer}a.cke_colorauto{padding:0;border:1px solid transparent;margin-bottom:6px;height:26px;line-height:26px}a.cke_colormore{margin-top:10px;height:20px;line-height:19px}a:hover.cke_colorauto,a:hover.cke_colormore,a:focus.cke_colorauto,a:focus.cke_colormore,a:active.cke_colorauto,a:active.cke_colormore{outline:0;border:#139ff7 1px solid;background-color:#f8f8f8}a:hover.cke_colorauto,a:hover.cke_colormore{border-color:#bcbcbc}.cke_colorauto span.cke_colorbox{width:18px;height:18px;border:1px solid #808080;margin-left:1px;margin-top:3px}.cke_rtl .cke_colorauto span.cke_colorbox{margin-left:0;margin-right:1px}span.cke_colorbox[style*="#ffffff"],span.cke_colorbox[style*="#FFFFFF"],span.cke_colorbox[style="background-color:#fff"],span.cke_colorbox[style="background-color:#FFF"],span.cke_colorbox[style*="rgb(255,255,255)"],span.cke_colorbox[style*="rgb(255, 255, 255)"]{border:1px solid #808080;width:18px;height:18px}.cke_toolbar{float:left}.cke_rtl .cke_toolbar{float:right}.cke_toolgroup{border:0;float:left;margin:1px 2px 6px 0;padding-right:3px}.cke_rtl .cke_toolgroup{float:right;margin:1px 0 6px 2px;padding-left:3px;padding-right:0}.cke_hc .cke_toolgroup{margin-right:5px;margin-bottom:5px}.cke_hc.cke_rtl .cke_toolgroup{margin-right:0;margin-left:5px}a.cke_button{display:inline-block;height:18px;padding:4px 6px;outline:0;cursor:default;float:left;border:0;position:relative}.cke_rtl a.cke_button{float:right}.cke_hc a.cke_button{border:1px solid black;padding:3px 5px;margin:0 3px 5px 0}.cke_hc.cke_rtl a.cke_button{margin:0 0 5px 3px}a.cke_button_on{background:#fff;border:1px #bcbcbc solid;padding:3px 5px}a.cke_button_off:hover,a.cke_button_off:focus,a.cke_button_off:active{background:#e5e5e5;border:1px #bcbcbc solid;padding:3px 5px}.cke_hc a.cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active{background:#e5e5e5;border:3px solid #000;padding:1px 3px}a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{border:0;padding:4px 6px;background-color:transparent}a.cke_button_disabled:focus{border:1px #bcbcbc solid;padding:3px 5px}.cke_hc a.cke_button_disabled:hover,.cke_hc a.cke_button_disabled:focus,.cke_hc a.cke_button_disabled:active{border:1px solid #acacac;padding:3px 5px;margin:0 3px 5px 0}.cke_hc a.cke_button_disabled:focus{border:3px solid #000;padding:1px 3px}.cke_hc.cke_rtl a.cke_button_disabled:hover,.cke_hc.cke_rtl a.cke_button_disabled:focus,.cke_hc.cke_rtl a.cke_button_disabled:active{margin:0 0 5px 3px}a.cke_button_disabled .cke_button_icon,a.cke_button_disabled .cke_button_arrow{opacity:.3}.cke_hc a.cke_button_disabled{border-color:#acacac}.cke_hc a.cke_button_disabled .cke_button_icon,.cke_hc a.cke_button_disabled .cke_button_label{opacity:.5}.cke_toolgroup a.cke_button:last-child:after,.cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after{content:"";position:absolute;height:18px;width:0;border-right:1px solid #bcbcbc;margin-top:4px;top:0;right:-3px}.cke_rtl .cke_toolgroup a.cke_button:last-child:after,.cke_rtl .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after{border-right:0;right:auto;border-left:1px solid #bcbcbc;top:0;left:-3px}.cke_hc .cke_toolgroup a.cke_button:last-child:after,.cke_hc .cke_toolgroup a.cke_button.cke_button_disabled:last-child:after,.cke_hc .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after{border-color:#000;top:0;right:-7px}.cke_hc.cke_rtl .cke_toolgroup a.cke_button:last-child:after,.cke_hc.cke_rtl .cke_toolgroup a.cke_button.cke_button_disabled:last-child:after,.cke_hc.cke_rtl .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after{top:0;right:auto;left:-7px}.cke_toolgroup a.cke_button:hover:last-child:after,.cke_toolgroup a.cke_button.cke_button_on:last-child:after{top:-1px;right:-4px}.cke_rtl .cke_toolgroup a.cke_button:hover:last-child:after,.cke_rtl .cke_toolgroup a.cke_button.cke_button_on:last-child:after{top:-1px;right:auto;left:-4px}.cke_hc .cke_toolgroup a.cke_button:hover:last-child:after,.cke_hc .cke_toolgroup a.cke_button.cke_button_on:last-child:after{top:-2px;right:-9px}.cke_hc.cke_rtl .cke_toolgroup a.cke_button:hover:last-child:after,.cke_hc.cke_rtl .cke_toolgroup a.cke_button.cke_button_on:last-child:after{top:-2px;right:auto;left:-9px}.cke_toolbar.cke_toolbar_last .cke_toolgroup a.cke_button:last-child:after{content:none;border:0;width:0;height:0}.cke_button_icon{cursor:inherit;background-repeat:no-repeat;margin-top:1px;width:16px;height:16px;float:left;display:inline-block}.cke_rtl .cke_button_icon{float:right}.cke_hc .cke_button_icon{display:none}.cke_button_label{display:none;padding-left:3px;margin-top:1px;line-height:17px;vertical-align:middle;float:left;cursor:default;color:#484848}.cke_rtl .cke_button_label{padding-right:3px;padding-left:0;float:right}.cke_hc .cke_button_label{padding:0;display:inline-block;font-size:12px}.cke_button_arrow{display:inline-block;margin:8px 0 0 1px;width:0;height:0;cursor:default;vertical-align:top;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #484848}.cke_rtl .cke_button_arrow{margin-right:5px;margin-left:0}.cke_hc .cke_button_arrow{font-size:10px;margin:3px 0 0 3px;width:auto;border:0}.cke_toolbar_separator{float:left;background-color:#bcbcbc;margin:4px 2px 0 2px;height:18px;width:1px}.cke_rtl .cke_toolbar_separator{float:right}.cke_hc .cke_toolbar_separator{background-color:#000;margin-left:2px;margin-right:5px;margin-bottom:9px}.cke_hc.cke_rtl .cke_toolbar_separator{margin-left:5px;margin-right:2px}.cke_toolbar_break{display:block;clear:left}.cke_rtl .cke_toolbar_break{clear:right}a.cke_toolbox_collapser{width:12px;height:11px;float:right;margin:11px 0 0;font-size:0;cursor:default;text-align:center;border:1px solid #bcbcbc}.cke_rtl .cke_toolbox_collapser{float:left}.cke_toolbox_collapser:hover{background:#e5e5e5}.cke_toolbox_collapser.cke_toolbox_collapser_min{margin:0 2px 4px}.cke_toolbox_collapser .cke_arrow{display:inline-block;height:0;width:0;font-size:0;margin-top:1px;border:3px solid transparent;border-bottom-color:#484848}.cke_toolbox_collapser.cke_toolbox_collapser_min .cke_arrow{margin-top:4px;border-bottom-color:transparent;border-top-color:#484848}.cke_hc .cke_toolbox_collapser .cke_arrow{font-size:8px;width:auto;border:0;margin-top:0}.cke_menuitem span{cursor:default}.cke_menubutton{display:block}.cke_hc .cke_menubutton{padding:2px}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#e9e9e9;display:block;outline:1px dotted}.cke_menubutton:hover{outline:0}.cke_hc .cke_menubutton:hover,.cke_hc .cke_menubutton:focus,.cke_hc .cke_menubutton:active{border:2px solid;padding:0}.cke_menubutton_disabled:hover,.cke_menubutton_disabled:focus,.cke_menubutton_disabled:active{background-color:transparent;outline:0}.cke_menubutton_inner{display:table-row}.cke_menubutton_icon,.cke_menubutton_label,.cke_menuarrow{display:table-cell}.cke_menubutton_icon{background-color:#f8f8f8;padding:6px 4px}.cke_hc .cke_menubutton_icon{height:16px;width:0;padding:4px 0}.cke_menubutton:hover .cke_menubutton_icon,.cke_menubutton:focus .cke_menubutton_icon,.cke_menubutton:active .cke_menubutton_icon{background-color:#e9e9e9}.cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon{background-color:#f8f8f8;outline:0}.cke_menuitem .cke_menubutton_on{background-color:#e9e9e9;border:1px solid #dedede;outline:0}.cke_menubutton_on .cke_menubutton_icon{padding-right:3px;background-color:#e9e9e9}.cke_menubutton_label{padding:0 5px;background-color:transparent;width:100%;vertical-align:middle}.cke_menubutton_shortcut{color:#979797}.cke_menubutton_disabled .cke_menubutton_label{opacity:.3;filter:alpha(opacity=30)}.cke_panel_frame .cke_menubutton_label{display:none}.cke_menuseparator{background-color:#d1d1d1;height:1px}.cke_menuarrow{background:transparent url(images/arrow.png) no-repeat 0 10px;padding:0 5px}.cke_rtl .cke_menuarrow{background-position:5px -13px;background-repeat:no-repeat}.cke_hc .cke_menuarrow{background-image:none}.cke_menuarrow span{display:none}.cke_hc .cke_menuarrow span{vertical-align:middle;display:inline}.cke_combo{display:inline-block;float:left;position:relative;margin-bottom:5px}.cke_rtl .cke_combo{float:right}.cke_hc .cke_combo{margin-top:1px;margin-bottom:10px}.cke_combo:after{content:"";position:absolute;height:18px;width:0;border-right:1px solid #bcbcbc;margin-top:5px;top:0;right:0}.cke_rtl .cke_combo:after{border-right:0;border-left:1px solid #bcbcbc;right:auto;left:0}.cke_hc .cke_combo:after{border-color:#000}a.cke_combo_button{cursor:default;display:inline-block;float:left;margin:0;padding:1px}.cke_rtl a.cke_combo_button{float:right}.cke_hc a.cke_combo_button{padding:4px}.cke_combo_on a.cke_combo_button,.cke_combo_off a.cke_combo_button:hover,.cke_combo_off a.cke_combo_button:focus,.cke_combo_off a.cke_combo_button:active{background:#e5e5e5;border:1px solid #bcbcbc;padding:0 0 0 1px;margin-left:-1px}.cke_combo_off a.cke_combo_button:focus{outline:0}.cke_combo_on a.cke_combo_button,.cke_combo_off a.cke_combo_button:active{background:#fff}.cke_rtl .cke_combo_on a.cke_combo_button,.cke_rtl .cke_combo_off a.cke_combo_button:hover,.cke_rtl .cke_combo_off a.cke_combo_button:focus,.cke_rtl .cke_combo_off a.cke_combo_button:active{padding:0 1px 0 0;margin-left:0;margin-right:-1px}.cke_hc .cke_combo_on a.cke_combo_button,.cke_hc .cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_combo_off a.cke_combo_button:active{border:3px solid #000;padding:1px 1px 1px 2px}.cke_hc.cke_rtl .cke_combo_on a.cke_combo_button,.cke_hc.cke_rtl .cke_combo_off a.cke_combo_button:hover,.cke_hc.cke_rtl .cke_combo_off a.cke_combo_button:focus,.cke_hc.cke_rtl .cke_combo_off a.cke_combo_button:active{padding:1px 2px 1px 1px}.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:0 0 0 3px;margin-left:-3px}.cke_rtl .cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_rtl .cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_rtl .cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_rtl .cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:0 3px 0 0;margin-left:0;margin-right:-3px}.cke_hc .cke_toolbar>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_hc .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:1px 1px 1px 7px;margin-left:-6px}.cke_hc.cke_rtl .cke_toolbar>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_hc.cke_rtl .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_hc.cke_rtl .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_hc.cke_rtl .cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:1px 7px 1px 1px;margin-left:0;margin-right:-6px}.cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active,.cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:0;margin:0}.cke_hc .cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_hc .cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_toolbox .cke_toolbar:first-child>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active,.cke_hc .cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_on a.cke_combo_button,.cke_hc .cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_toolbar_break+.cke_toolbar>.cke_toolbar_start+.cke_combo_off a.cke_combo_button:active{padding:1px;margin:0}.cke_toolbar .cke_combo+.cke_toolbar_end,.cke_toolbar .cke_combo+.cke_toolgroup{margin-right:0;margin-left:2px}.cke_rtl .cke_toolbar .cke_combo+.cke_toolbar_end,.cke_rtl .cke_toolbar .cke_combo+.cke_toolgroup{margin-left:0;margin-right:2px}.cke_hc .cke_toolbar .cke_combo+.cke_toolbar_end,.cke_hc .cke_toolbar .cke_combo+.cke_toolgroup{margin-left:5px}.cke_hc.cke_rtl .cke_toolbar .cke_combo+.cke_toolbar_end,.cke_hc.cke_rtl .cke_toolbar .cke_combo+.cke_toolgroup{margin-left:0;margin-right:5px}.cke_toolbar.cke_toolbar_last .cke_combo:nth-last-child(-n+2):after{content:none;border:0;width:0;height:0}.cke_combo_text{line-height:26px;padding-left:10px;text-overflow:ellipsis;overflow:hidden;float:left;cursor:default;color:#484848;width:60px}.cke_rtl .cke_combo_text{float:right;text-align:right;padding-left:0;padding-right:10px}.cke_hc .cke_combo_text{line-height:18px;font-size:12px}.cke_combo_open{cursor:default;display:inline-block;font-size:0;height:19px;line-height:17px;margin:1px 10px 1px;width:5px}.cke_hc .cke_combo_open{height:12px}.cke_combo_arrow{cursor:default;margin:11px 0 0;float:left;height:0;width:0;font-size:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #484848}.cke_hc .cke_combo_arrow{font-size:10px;width:auto;border:0;margin-top:3px}.cke_combo_label{display:none;float:left;line-height:26px;vertical-align:top;margin-right:5px}.cke_rtl .cke_combo_label{float:right;margin-left:5px;margin-right:0}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{opacity:.3}.cke_path{float:left;margin:-2px 0 2px}a.cke_path_item,span.cke_path_empty{display:inline-block;float:left;padding:3px 4px;margin-right:2px;cursor:default;text-decoration:none;outline:0;border:0;color:#484848;font-weight:bold;font-size:11px}.cke_rtl .cke_path,.cke_rtl .cke_path_item,.cke_rtl .cke_path_empty{float:right}a.cke_path_item:hover,a.cke_path_item:focus,a.cke_path_item:active{background-color:#e5e5e5}.cke_hc a.cke_path_item:hover,.cke_hc a.cke_path_item:focus,.cke_hc a.cke_path_item:active{border:2px solid;padding:1px 2px}.cke_button__source_label,.cke_button__sourcedialog_label{display:inline}.cke_combopanel__fontsize{width:135px}textarea.cke_source{font-family:'Courier New',Monospace;font-size:small;background-color:#fff;white-space:pre-wrap;border:0;padding:0;margin:0;display:block}.cke_wysiwyg_frame,.cke_wysiwyg_div{background-color:#fff}.cke_notifications_area{pointer-events:none}.cke_notification{pointer-events:auto;position:relative;margin:10px;width:300px;color:white;text-align:center;opacity:.95;filter:alpha(opacity = 95);-webkit-animation:fadeIn .7s;animation:fadeIn .7s}.cke_notification_message a{color:#12306f}@-webkit-keyframes fadeIn{from{opacity:.4}to{opacity:.95}}@keyframes fadeIn{from{opacity:.4}to{opacity:.95}}.cke_notification_success{background:#72b572;border:1px solid #63a563}.cke_notification_warning{background:#c83939;border:1px solid #902b2b}.cke_notification_info{background:#2e9ad0;border:1px solid #0f74a8}.cke_notification_info span.cke_notification_progress{background-color:#0f74a8;display:block;padding:0;margin:0;height:100%;overflow:hidden;position:absolute;z-index:1}.cke_notification_message{position:relative;margin:4px 23px 3px;font-family:Arial,Helvetica,sans-serif;font-size:12px;line-height:18px;z-index:4;text-overflow:ellipsis;overflow:hidden}.cke_notification_close{background-image:url(images/close.png);background-repeat:no-repeat;background-position:50%;position:absolute;cursor:pointer;text-align:center;height:20px;width:20px;top:1px;right:1px;padding:0;margin:0;z-index:5;opacity:.6;filter:alpha(opacity = 60)}.cke_notification_close:hover{opacity:1;filter:alpha(opacity = 100)}.cke_notification_close span{display:none}.cke_notification_warning a.cke_notification_close{opacity:.8;filter:alpha(opacity = 80)}.cke_notification_warning a.cke_notification_close:hover{opacity:1;filter:alpha(opacity = 100)}.cke_chrome{visibility:inherit}.cke_voice_label{display:none}legend.cke_voice_label{display:none}a.cke_button_disabled,a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{filter:alpha(opacity = 30)}.cke_button_disabled .cke_button_icon{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#00ffffff,endColorstr=#00ffffff)}.cke_button_off:hover,.cke_button_off:focus,.cke_button_off:active{filter:alpha(opacity = 100)}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{filter:alpha(opacity = 30)}.cke_toolbox_collapser{border:1px solid #a6a6a6}.cke_toolbox_collapser .cke_arrow{margin-top:1px}.cke_hc .cke_top,.cke_hc .cke_bottom,.cke_hc .cke_combo_button,.cke_hc a.cke_combo_button:hover,.cke_hc a.cke_combo_button:focus,.cke_hc .cke_toolgroup,.cke_hc .cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active,.cke_hc .cke_toolbox_collapser,.cke_hc .cke_toolbox_collapser:hover,.cke_hc .cke_panel_grouptitle{filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.cke_top,.cke_contents,.cke_bottom{width:100%}.cke_button_arrow{font-size:0}.cke_rtl .cke_toolgroup,.cke_rtl .cke_toolbar_separator,.cke_rtl .cke_button,.cke_rtl .cke_button *,.cke_rtl .cke_combo,.cke_rtl .cke_combo *,.cke_rtl .cke_path_item,.cke_rtl .cke_path_item *,.cke_rtl .cke_path_empty{float:none}.cke_rtl .cke_toolgroup,.cke_rtl .cke_toolbar_separator,.cke_rtl .cke_combo_button,.cke_rtl .cke_combo_button *,.cke_rtl .cke_button,.cke_rtl .cke_button_icon{display:inline-block;vertical-align:top}.cke_rtl .cke_button_icon{float:none}.cke_resizer{width:10px}.cke_source{white-space:normal}.cke_bottom{position:static}.cke_colorbox{font-size:0}.cke_button__about_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -0px !important;}.cke_button__bold_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -24px !important;}.cke_button__italic_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -48px !important;}.cke_button__strike_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -72px !important;}.cke_button__subscript_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -96px !important;}.cke_button__superscript_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -120px !important;}.cke_button__underline_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -144px !important;}.cke_button__bidiltr_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -168px !important;}.cke_button__bidirtl_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -192px !important;}.cke_button__blockquote_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -216px !important;}.cke_rtl .cke_button__copy_icon, .cke_mixed_dir_content .cke_rtl .cke_button__copy_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -240px !important;}.cke_ltr .cke_button__copy_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -264px !important;}.cke_rtl .cke_button__cut_icon, .cke_mixed_dir_content .cke_rtl .cke_button__cut_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -288px !important;}.cke_ltr .cke_button__cut_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -312px !important;}.cke_rtl .cke_button__paste_icon, .cke_mixed_dir_content .cke_rtl .cke_button__paste_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -336px !important;}.cke_ltr .cke_button__paste_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -360px !important;}.cke_button__bgcolor_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -384px !important;}.cke_button__textcolor_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -408px !important;}.cke_rtl .cke_button__templates_icon, .cke_mixed_dir_content .cke_rtl .cke_button__templates_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -432px !important;}.cke_ltr .cke_button__templates_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -456px !important;}.cke_button__copyformatting_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -480px !important;}.cke_button__creatediv_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -504px !important;}.cke_rtl .cke_button__find_icon, .cke_mixed_dir_content .cke_rtl .cke_button__find_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -528px !important;}.cke_ltr .cke_button__find_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -552px !important;}.cke_button__replace_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -576px !important;}.cke_button__flash_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -600px !important;}.cke_button__button_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -624px !important;}.cke_button__checkbox_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -648px !important;}.cke_button__form_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -672px !important;}.cke_button__hiddenfield_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -696px !important;}.cke_button__imagebutton_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -720px !important;}.cke_button__radio_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -744px !important;}.cke_rtl .cke_button__select_icon, .cke_mixed_dir_content .cke_rtl .cke_button__select_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -768px !important;}.cke_ltr .cke_button__select_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -792px !important;}.cke_rtl .cke_button__textarea_icon, .cke_mixed_dir_content .cke_rtl .cke_button__textarea_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -816px !important;}.cke_ltr .cke_button__textarea_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -840px !important;}.cke_rtl .cke_button__textfield_icon, .cke_mixed_dir_content .cke_rtl .cke_button__textfield_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -864px !important;}.cke_ltr .cke_button__textfield_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -888px !important;}.cke_button__horizontalrule_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -912px !important;}.cke_button__iframe_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -936px !important;}.cke_button__image_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -960px !important;}.cke_rtl .cke_button__indent_icon, .cke_mixed_dir_content .cke_rtl .cke_button__indent_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -984px !important;}.cke_ltr .cke_button__indent_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1008px !important;}.cke_rtl .cke_button__outdent_icon, .cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1032px !important;}.cke_ltr .cke_button__outdent_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1056px !important;}.cke_button__smiley_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1080px !important;}.cke_button__justifyblock_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1104px !important;}.cke_button__justifycenter_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1128px !important;}.cke_button__justifyleft_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1152px !important;}.cke_button__justifyright_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1176px !important;}.cke_button__language_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1200px !important;}.cke_rtl .cke_button__anchor_icon, .cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1224px !important;}.cke_ltr .cke_button__anchor_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1248px !important;}.cke_button__link_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1272px !important;}.cke_button__unlink_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1296px !important;}.cke_rtl .cke_button__bulletedlist_icon, .cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1320px !important;}.cke_ltr .cke_button__bulletedlist_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1344px !important;}.cke_rtl .cke_button__numberedlist_icon, .cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1368px !important;}.cke_ltr .cke_button__numberedlist_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1392px !important;}.cke_button__maximize_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1416px !important;}.cke_rtl .cke_button__newpage_icon, .cke_mixed_dir_content .cke_rtl .cke_button__newpage_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1440px !important;}.cke_ltr .cke_button__newpage_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1464px !important;}.cke_rtl .cke_button__pagebreak_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pagebreak_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1488px !important;}.cke_ltr .cke_button__pagebreak_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1512px !important;}.cke_rtl .cke_button__pastetext_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1536px !important;}.cke_ltr .cke_button__pastetext_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1560px !important;}.cke_rtl .cke_button__pastefromword_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1584px !important;}.cke_ltr .cke_button__pastefromword_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1608px !important;}.cke_rtl .cke_button__preview_icon, .cke_mixed_dir_content .cke_rtl .cke_button__preview_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1632px !important;}.cke_ltr .cke_button__preview_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1656px !important;}.cke_button__print_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1680px !important;}.cke_button__removeformat_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1704px !important;}.cke_button__save_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1728px !important;}.cke_button__selectall_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1752px !important;}.cke_rtl .cke_button__showblocks_icon, .cke_mixed_dir_content .cke_rtl .cke_button__showblocks_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1776px !important;}.cke_ltr .cke_button__showblocks_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1800px !important;}.cke_rtl .cke_button__source_icon, .cke_mixed_dir_content .cke_rtl .cke_button__source_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1824px !important;}.cke_ltr .cke_button__source_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1848px !important;}.cke_button__specialchar_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1872px !important;}.cke_button__scayt_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1896px !important;}.cke_button__table_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1920px !important;}.cke_rtl .cke_button__redo_icon, .cke_mixed_dir_content .cke_rtl .cke_button__redo_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1944px !important;}.cke_ltr .cke_button__redo_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1968px !important;}.cke_rtl .cke_button__undo_icon, .cke_mixed_dir_content .cke_rtl .cke_button__undo_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -1992px !important;}.cke_ltr .cke_button__undo_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -2016px !important;}.cke_button__spellchecker_icon {background: url(icons.png?t=dee99e2) no-repeat 0 -2040px !important;}.cke_hidpi .cke_button__about_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -0px !important;background-size: 16px !important;}.cke_hidpi .cke_button__bold_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -24px !important;background-size: 16px !important;}.cke_hidpi .cke_button__italic_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -48px !important;background-size: 16px !important;}.cke_hidpi .cke_button__strike_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -72px !important;background-size: 16px !important;}.cke_hidpi .cke_button__subscript_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -96px !important;background-size: 16px !important;}.cke_hidpi .cke_button__superscript_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -120px !important;background-size: 16px !important;}.cke_hidpi .cke_button__underline_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -144px !important;background-size: 16px !important;}.cke_hidpi .cke_button__bidiltr_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -168px !important;background-size: 16px !important;}.cke_hidpi .cke_button__bidirtl_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -192px !important;background-size: 16px !important;}.cke_hidpi .cke_button__blockquote_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -216px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__copy_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__copy_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -240px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__copy_icon,.cke_ltr.cke_hidpi .cke_button__copy_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -264px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__cut_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__cut_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -288px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__cut_icon,.cke_ltr.cke_hidpi .cke_button__cut_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -312px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__paste_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__paste_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -336px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__paste_icon,.cke_ltr.cke_hidpi .cke_button__paste_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -360px !important;background-size: 16px !important;}.cke_hidpi .cke_button__bgcolor_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -384px !important;background-size: 16px !important;}.cke_hidpi .cke_button__textcolor_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -408px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__templates_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__templates_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -432px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__templates_icon,.cke_ltr.cke_hidpi .cke_button__templates_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -456px !important;background-size: 16px !important;}.cke_hidpi .cke_button__copyformatting_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -480px !important;background-size: 16px !important;}.cke_hidpi .cke_button__creatediv_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -504px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__find_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__find_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -528px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__find_icon,.cke_ltr.cke_hidpi .cke_button__find_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -552px !important;background-size: 16px !important;}.cke_hidpi .cke_button__replace_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -576px !important;background-size: 16px !important;}.cke_hidpi .cke_button__flash_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -600px !important;background-size: 16px !important;}.cke_hidpi .cke_button__button_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -624px !important;background-size: 16px !important;}.cke_hidpi .cke_button__checkbox_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -648px !important;background-size: 16px !important;}.cke_hidpi .cke_button__form_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -672px !important;background-size: 16px !important;}.cke_hidpi .cke_button__hiddenfield_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -696px !important;background-size: 16px !important;}.cke_hidpi .cke_button__imagebutton_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -720px !important;background-size: 16px !important;}.cke_hidpi .cke_button__radio_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -744px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__select_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__select_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -768px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__select_icon,.cke_ltr.cke_hidpi .cke_button__select_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -792px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__textarea_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__textarea_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -816px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__textarea_icon,.cke_ltr.cke_hidpi .cke_button__textarea_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -840px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__textfield_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__textfield_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -864px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__textfield_icon,.cke_ltr.cke_hidpi .cke_button__textfield_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -888px !important;background-size: 16px !important;}.cke_hidpi .cke_button__horizontalrule_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -912px !important;background-size: 16px !important;}.cke_hidpi .cke_button__iframe_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -936px !important;background-size: 16px !important;}.cke_hidpi .cke_button__image_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -960px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__indent_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__indent_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -984px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__indent_icon,.cke_ltr.cke_hidpi .cke_button__indent_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1008px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__outdent_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1032px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__outdent_icon,.cke_ltr.cke_hidpi .cke_button__outdent_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1056px !important;background-size: 16px !important;}.cke_hidpi .cke_button__smiley_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1080px !important;background-size: 16px !important;}.cke_hidpi .cke_button__justifyblock_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1104px !important;background-size: 16px !important;}.cke_hidpi .cke_button__justifycenter_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1128px !important;background-size: 16px !important;}.cke_hidpi .cke_button__justifyleft_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1152px !important;background-size: 16px !important;}.cke_hidpi .cke_button__justifyright_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1176px !important;background-size: 16px !important;}.cke_hidpi .cke_button__language_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1200px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__anchor_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1224px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__anchor_icon,.cke_ltr.cke_hidpi .cke_button__anchor_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1248px !important;background-size: 16px !important;}.cke_hidpi .cke_button__link_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1272px !important;background-size: 16px !important;}.cke_hidpi .cke_button__unlink_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1296px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__bulletedlist_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1320px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__bulletedlist_icon,.cke_ltr.cke_hidpi .cke_button__bulletedlist_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1344px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__numberedlist_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1368px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__numberedlist_icon,.cke_ltr.cke_hidpi .cke_button__numberedlist_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1392px !important;background-size: 16px !important;}.cke_hidpi .cke_button__maximize_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1416px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__newpage_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__newpage_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1440px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__newpage_icon,.cke_ltr.cke_hidpi .cke_button__newpage_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1464px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pagebreak_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pagebreak_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1488px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pagebreak_icon,.cke_ltr.cke_hidpi .cke_button__pagebreak_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1512px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pastetext_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1536px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pastetext_icon,.cke_ltr.cke_hidpi .cke_button__pastetext_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1560px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pastefromword_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1584px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pastefromword_icon,.cke_ltr.cke_hidpi .cke_button__pastefromword_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1608px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__preview_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__preview_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1632px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__preview_icon,.cke_ltr.cke_hidpi .cke_button__preview_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1656px !important;background-size: 16px !important;}.cke_hidpi .cke_button__print_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1680px !important;background-size: 16px !important;}.cke_hidpi .cke_button__removeformat_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1704px !important;background-size: 16px !important;}.cke_hidpi .cke_button__save_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1728px !important;background-size: 16px !important;}.cke_hidpi .cke_button__selectall_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1752px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__showblocks_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__showblocks_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1776px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__showblocks_icon,.cke_ltr.cke_hidpi .cke_button__showblocks_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1800px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__source_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__source_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1824px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__source_icon,.cke_ltr.cke_hidpi .cke_button__source_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1848px !important;background-size: 16px !important;}.cke_hidpi .cke_button__specialchar_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1872px !important;background-size: 16px !important;}.cke_hidpi .cke_button__scayt_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1896px !important;background-size: 16px !important;}.cke_hidpi .cke_button__table_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1920px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__redo_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__redo_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1944px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__redo_icon,.cke_ltr.cke_hidpi .cke_button__redo_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1968px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__undo_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__undo_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -1992px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__undo_icon,.cke_ltr.cke_hidpi .cke_button__undo_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -2016px !important;background-size: 16px !important;}.cke_hidpi .cke_button__spellchecker_icon {background: url(icons_hidpi.png?t=dee99e2) no-repeat 0 -2040px !important;background-size: 16px !important;} \ No newline at end of file diff --git a/libraries/ckeditor/skins/moono-lisa/icons.png b/libraries/ckeditor/skins/moono-lisa/icons.png new file mode 100644 index 0000000..958eedc Binary files /dev/null and b/libraries/ckeditor/skins/moono-lisa/icons.png differ diff --git a/libraries/ckeditor/skins/moono-lisa/icons_hidpi.png b/libraries/ckeditor/skins/moono-lisa/icons_hidpi.png new file mode 100644 index 0000000..7b06991 Binary files /dev/null and b/libraries/ckeditor/skins/moono-lisa/icons_hidpi.png differ diff --git a/libraries/ckeditor/skins/moono-lisa/images/arrow.png b/libraries/ckeditor/skins/moono-lisa/images/arrow.png new file mode 100644 index 0000000..d72b5f3 Binary files /dev/null and b/libraries/ckeditor/skins/moono-lisa/images/arrow.png differ diff --git a/libraries/ckeditor/skins/moono-lisa/images/close.png b/libraries/ckeditor/skins/moono-lisa/images/close.png new file mode 100644 index 0000000..40caa6d Binary files /dev/null and b/libraries/ckeditor/skins/moono-lisa/images/close.png differ diff --git a/libraries/ckeditor/skins/moono-lisa/images/hidpi/close.png b/libraries/ckeditor/skins/moono-lisa/images/hidpi/close.png new file mode 100644 index 0000000..fa00f4f Binary files /dev/null and b/libraries/ckeditor/skins/moono-lisa/images/hidpi/close.png differ diff --git a/libraries/ckeditor/skins/moono-lisa/images/hidpi/lock-open.png b/libraries/ckeditor/skins/moono-lisa/images/hidpi/lock-open.png new file mode 100644 index 0000000..c899789 Binary files /dev/null and b/libraries/ckeditor/skins/moono-lisa/images/hidpi/lock-open.png differ diff --git a/libraries/ckeditor/skins/moono-lisa/images/hidpi/lock.png b/libraries/ckeditor/skins/moono-lisa/images/hidpi/lock.png new file mode 100644 index 0000000..25ad0f4 Binary files /dev/null and b/libraries/ckeditor/skins/moono-lisa/images/hidpi/lock.png differ diff --git a/libraries/ckeditor/skins/moono-lisa/images/hidpi/refresh.png b/libraries/ckeditor/skins/moono-lisa/images/hidpi/refresh.png new file mode 100644 index 0000000..117a2d4 Binary files /dev/null and b/libraries/ckeditor/skins/moono-lisa/images/hidpi/refresh.png differ diff --git a/libraries/ckeditor/skins/moono-lisa/images/lock-open.png b/libraries/ckeditor/skins/moono-lisa/images/lock-open.png new file mode 100644 index 0000000..42df5f4 Binary files /dev/null and b/libraries/ckeditor/skins/moono-lisa/images/lock-open.png differ diff --git a/libraries/ckeditor/skins/moono-lisa/images/lock.png b/libraries/ckeditor/skins/moono-lisa/images/lock.png new file mode 100644 index 0000000..bde6772 Binary files /dev/null and b/libraries/ckeditor/skins/moono-lisa/images/lock.png differ diff --git a/libraries/ckeditor/skins/moono-lisa/images/refresh.png b/libraries/ckeditor/skins/moono-lisa/images/refresh.png new file mode 100644 index 0000000..e363764 Binary files /dev/null and b/libraries/ckeditor/skins/moono-lisa/images/refresh.png differ diff --git a/libraries/ckeditor/skins/moono-lisa/images/spinner.gif b/libraries/ckeditor/skins/moono-lisa/images/spinner.gif new file mode 100644 index 0000000..d898d41 Binary files /dev/null and b/libraries/ckeditor/skins/moono-lisa/images/spinner.gif differ diff --git a/libraries/ckeditor/skins/moono-lisa/readme.md b/libraries/ckeditor/skins/moono-lisa/readme.md new file mode 100644 index 0000000..7ed4c78 --- /dev/null +++ b/libraries/ckeditor/skins/moono-lisa/readme.md @@ -0,0 +1,46 @@ +"Moono-lisa" Skin +================= + +This skin has been made a **default skin** starting from CKEditor 4.6.0 and is maintained by the core developers. + +For more information about skins, please check the [CKEditor Skin SDK](http://docs.cksource.com/CKEditor_4.x/Skin_SDK) +documentation. + +Features +------------------- +"Moono-lisa" is a monochromatic skin, which offers a modern, flat and minimalistic look which blends very well in modern design. +It comes with the following features: + +- Chameleon feature with brightness. +- High-contrast compatibility. +- Graphics source provided in SVG. + +Directory Structure +------------------- + +CSS parts: +- **editor.css**: the main CSS file. It's simply loading several other files, for easier maintenance, +- **mainui.css**: the file contains styles of entire editor outline structures, +- **toolbar.css**: the file contains styles of the editor toolbar space (top), +- **richcombo.css**: the file contains styles of the rich combo ui elements on toolbar, +- **panel.css**: the file contains styles of the rich combo drop-down, it's not loaded +until the first panel open up, +- **elementspath.css**: the file contains styles of the editor elements path bar (bottom), +- **menu.css**: the file contains styles of all editor menus including context menu and button drop-down, +it's not loaded until the first menu open up, +- **dialog.css**: the CSS files for the dialog UI, it's not loaded until the first dialog open, +- **reset.css**: the file defines the basis of style resets among all editor UI spaces, +- **preset.css**: the file defines the default styles of some UI elements reflecting the skin preference, +- **editor_XYZ.css** and **dialog_XYZ.css**: browser specific CSS hacks. + +Other parts: +- **skin.js**: the only JavaScript part of the skin that registers the skin, its browser specific files and its icons and defines the Chameleon feature, +- **images/**: contains a fill general used images, +- **dev/**: contains SVG and PNG source of the skin icons. + +License +------- + +Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + +For licensing, see LICENSE.md or [http://ckeditor.com/license](http://ckeditor.com/license) diff --git a/libraries/ckeditor/styles.js b/libraries/ckeditor/styles.js new file mode 100644 index 0000000..d809226 --- /dev/null +++ b/libraries/ckeditor/styles.js @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ + +// This file contains style definitions that can be used by CKEditor plugins. +// +// The most common use for it is the "stylescombo" plugin which shows the Styles drop-down +// list containing all styles in the editor toolbar. Other plugins, like +// the "div" plugin, use a subset of the styles for their features. +// +// If you do not have plugins that depend on this file in your editor build, you can simply +// ignore it. Otherwise it is strongly recommended to customize this file to match your +// website requirements and design properly. +// +// For more information refer to: http://docs.ckeditor.com/#!/guide/dev_styles-section-style-rules + +CKEDITOR.stylesSet.add( 'default', [ + /* Block styles */ + + // These styles are already available in the "Format" drop-down list ("format" plugin), + // so they are not needed here by default. You may enable them to avoid + // placing the "Format" combo in the toolbar, maintaining the same features. + /* + { name: 'Paragraph', element: 'p' }, + { name: 'Heading 1', element: 'h1' }, + { name: 'Heading 2', element: 'h2' }, + { name: 'Heading 3', element: 'h3' }, + { name: 'Heading 4', element: 'h4' }, + { name: 'Heading 5', element: 'h5' }, + { name: 'Heading 6', element: 'h6' }, + { name: 'Preformatted Text',element: 'pre' }, + { name: 'Address', element: 'address' }, + */ + + { name: 'Italic Title', element: 'h2', styles: { 'font-style': 'italic' } }, + { name: 'Subtitle', element: 'h3', styles: { 'color': '#aaa', 'font-style': 'italic' } }, + { + name: 'Special Container', + element: 'div', + styles: { + padding: '5px 10px', + background: '#eee', + border: '1px solid #ccc' + } + }, + + /* Inline styles */ + + // These are core styles available as toolbar buttons. You may opt enabling + // some of them in the Styles drop-down list, removing them from the toolbar. + // (This requires the "stylescombo" plugin.) + /* + { name: 'Strong', element: 'strong', overrides: 'b' }, + { name: 'Emphasis', element: 'em' , overrides: 'i' }, + { name: 'Underline', element: 'u' }, + { name: 'Strikethrough', element: 'strike' }, + { name: 'Subscript', element: 'sub' }, + { name: 'Superscript', element: 'sup' }, + */ + + { name: 'Marker', element: 'span', attributes: { 'class': 'marker' } }, + + { name: 'Big', element: 'big' }, + { name: 'Small', element: 'small' }, + { name: 'Typewriter', element: 'tt' }, + + { name: 'Computer Code', element: 'code' }, + { name: 'Keyboard Phrase', element: 'kbd' }, + { name: 'Sample Text', element: 'samp' }, + { name: 'Variable', element: 'var' }, + + { name: 'Deleted Text', element: 'del' }, + { name: 'Inserted Text', element: 'ins' }, + + { name: 'Cited Work', element: 'cite' }, + { name: 'Inline Quotation', element: 'q' }, + + { name: 'Language: RTL', element: 'span', attributes: { 'dir': 'rtl' } }, + { name: 'Language: LTR', element: 'span', attributes: { 'dir': 'ltr' } }, + + /* Object styles */ + + { + name: 'Styled Image (left)', + element: 'img', + attributes: { 'class': 'left' } + }, + + { + name: 'Styled Image (right)', + element: 'img', + attributes: { 'class': 'right' } + }, + + { + name: 'Compact Table', + element: 'table', + attributes: { + cellpadding: '5', + cellspacing: '0', + border: '1', + bordercolor: '#ccc' + }, + styles: { + 'border-collapse': 'collapse' + } + }, + + { name: 'Borderless Table', element: 'table', styles: { 'border-style': 'hidden', 'background-color': '#E6E6FA' } }, + { name: 'Square Bulleted List', element: 'ul', styles: { 'list-style-type': 'square' } }, + + /* Widget styles */ + + { name: 'Clean Image', type: 'widget', widget: 'image', attributes: { 'class': 'image-clean' } }, + { name: 'Grayscale Image', type: 'widget', widget: 'image', attributes: { 'class': 'image-grayscale' } }, + + { name: 'Featured Snippet', type: 'widget', widget: 'codeSnippet', attributes: { 'class': 'code-featured' } }, + + { name: 'Featured Formula', type: 'widget', widget: 'mathjax', attributes: { 'class': 'math-featured' } }, + + { name: '240p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-240p' }, group: 'size' }, + { name: '360p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-360p' }, group: 'size' }, + { name: '480p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-480p' }, group: 'size' }, + { name: '720p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-720p' }, group: 'size' }, + { name: '1080p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-1080p' }, group: 'size' }, + + // Adding space after the style name is an intended workaround. For now, there + // is no option to create two styles with the same name for different widget types. See http://dev.ckeditor.com/ticket/16664. + { name: '240p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-240p' }, group: 'size' }, + { name: '360p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-360p' }, group: 'size' }, + { name: '480p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-480p' }, group: 'size' }, + { name: '720p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-720p' }, group: 'size' }, + { name: '1080p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-1080p' }, group: 'size' } + +] ); + diff --git a/libraries/context-menu.js b/libraries/context-menu.js new file mode 100644 index 0000000..4e821ba --- /dev/null +++ b/libraries/context-menu.js @@ -0,0 +1,84 @@ +/** + * @author Chris Board - Boardies IT Solutons + * @description Creates a 3-dot context menu on tables,

    tags and heading tags (e.g. h1, h2 etc). + * @copyright (c) Boardies IT Solutions - December 2017 + */ + +$(document).mouseup(function (e) { + var div = $(".context-menu-container"); + if (!div.is(e.target) && div.has(e.target).length === 0) + { + div.hide(); + } +}); + +function ContextMenu(contextContainerID, menuItemClickCallback) +{ + this.contextMenuContainer = $('.context-menu[data-container-id="'+contextContainerID+'"]'); + + this.contextMenuContainer.click(function(e){ + + var self = this; + var parent = $(this); + + //var menuPos = $(this).offset(); + + //Show hide the context menu + var contextMenuID = "#" + $(this).attr("data-container-id"); + var contextMenu = $(contextMenuID); + + + //Use e.clientX get the cursor position and subtract the context menu width so that it appears on the left of + //the cursor, minus another 15 take the extra padding into account so the menu doesn't appear + //directly under the cursor + var menuPos = {left: e.clientX - contextMenu.width() - 15, top: contextMenu.offset().top + e.clientY}; + + if (!isElementInViewport(contextMenu)) { + alert("View not visible"); + var rightEdgePos = contextMenu.width() + contextMenu.offset().left; + var screenWidth = $(window).width(); + + + var leftShiftOver = menuPos.left - (screenWidth - rightEdgePos); + var showPos = menuPos.left - leftShiftOver - 10; //Subtract an extra 10 so it has some margin space + + contextMenu.css({top: '5px', right: "15px", position: 'absolute'}); + } + else + { + contextMenu.css({top: '5px', right: "15px", position: 'absolute'}); + } + + contextMenu.find("ul > li").click(function(){ + menuItemClickCallback($(this), parent); + contextMenu.hide(); + + //Remove the click event otherwise a new one keep getting created, so an additional call event will be called + //each time the menu opens and closes + contextMenu.find("ul > li").unbind("click"); + }); + contextMenu.show(); + + }); + + this.destroy = function() { + this.contextMenuContainer.unbind("click"); + }; +} + +function isElementInViewport (el) { + + //special bonus for those using jQuery + if (typeof jQuery === "function" && el instanceof jQuery) { + el = el[0]; + } + + var rect = el.getBoundingClientRect(); + + return ( + rect.top >= 0 && + rect.left >= 0 && + rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && /*or $(window).height() */ + rect.right <= (window.innerWidth || document.documentElement.clientWidth) /*or $(window).width() */ + ); +} \ No newline at end of file diff --git a/libraries/countdown/jquery-wrapper.js b/libraries/countdown/jquery-wrapper.js new file mode 100644 index 0000000..d55e55a --- /dev/null +++ b/libraries/countdown/jquery-wrapper.js @@ -0,0 +1,18 @@ +var Countdown = require('./countdown.js'); +var NAME = 'countdown'; +var DATA_ATTR = 'date'; + +jQuery.fn.countdown = function(options) { + return $.each(this, function(i, el) { + var $el = $(el); + if (!$el.data(NAME)) { + // allow setting the date via the data-date attribute + if ($el.data(DATA_ATTR)) { + options.date = $el.data(DATA_ATTR); + } + $el.data(NAME, new Countdown(el, options)); + } + }); +}; + +module.exports = Countdown; diff --git a/libraries/countdown/jquery.countdown.js b/libraries/countdown/jquery.countdown.js new file mode 100644 index 0000000..4087c8f --- /dev/null +++ b/libraries/countdown/jquery.countdown.js @@ -0,0 +1,215 @@ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;"undefined"!=typeof window?n=window:"undefined"!=typeof global?n=global:"undefined"!=typeof self&&(n=self),n.Countdown=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= (365.25 * 86400)) { + dateData.years = Math.floor(diff / (365.25 * 86400)); + diff -= dateData.years * 365.25 * 86400; + } + + if (diff >= 86400) { + dateData.days = Math.floor(diff / 86400); + diff -= dateData.days * 86400; + } + + if (diff >= 3600) { + dateData.hours = Math.floor(diff / 3600); + diff -= dateData.hours * 3600; + } + + if (diff >= 60) { + dateData.min = Math.floor(diff / 60); + diff -= dateData.min * 60; + } + + dateData.sec = Math.round(diff); + + dateData.millisec = diff % 1 * 1000; + + return dateData; + }.bind(this); + + /** + * Add leading zeros to a number + * @param {Number} num Input number + * @param {Number} length Length of the desired output + * @return {String} String of the desired length with leading zeros + */ + this.leadingZeros = function(num, length) { + length = length || 2; + num = String(num); + if (num.length > length) { + return num; + } + return (Array(length + 1).join('0') + num).substr(-length); + }; + + /** + * Update the end date of the countdown + * @param {Mixed} newDate Date object or a String/Number that can be passed to the Date constructor + * @return {Countdown} Countdown instance + */ + this.update = function(newDate) { + if (typeof newDate !== 'object') { + newDate = new Date(newDate); + } + this.options.date = newDate; + this.render(); + return this; + }.bind(this); + + /** + * Stop the countdown refresh / rerender + * @return {Countdown} Countdown instance + */ + this.stop = function() { + if (this.interval) { + clearInterval(this.interval); + this.interval = false; + } + return this; + }.bind(this); + + /** + * Render the countdown + * @return {Countdown} Countdown instance + */ + this.render = function() { + this.options.render(this.getDiffDate()); + return this; + }.bind(this); + + /** + * Start the countdown + * @return {Countdown} Countdown instance + */ + this.start = function() { + // don't start if the countdown is already started + if (this.interval) { return; } + + this.render(); + + if (this.options.refresh) { + this.interval = setInterval(this.render, this.options.refresh); + } + + return this; + }.bind(this); + + /** + * Update the offset + * @param {Number} offset New offset in ms + * @return {Countdown} Countdown instance + */ + this.updateOffset = function(offset) { + this.options.offset = offset; + return this; + }.bind(this); + + + // initial start of the countdown or initial render + this.start(); +}; + +module.exports = Countdown; + +},{}],2:[function(require,module,exports){ +var Countdown = require('./countdown.js'); +var NAME = 'countdown'; +var DATA_ATTR = 'date'; + +jQuery.fn.countdown = function(options) { + return $.each(this, function(i, el) { + var $el = $(el); + if (!$el.data(NAME)) { + // allow setting the date via the data-date attribute + if ($el.data(DATA_ATTR)) { + options.date = $el.data(DATA_ATTR); + } + $el.data(NAME, new Countdown(el, options)); + } + }); +}; + +module.exports = Countdown; + +},{"./countdown.js":1}]},{},[2])(2) +}); \ No newline at end of file diff --git a/libraries/datepicker/css/datepicker.css b/libraries/datepicker/css/datepicker.css new file mode 100644 index 0000000..a803fda --- /dev/null +++ b/libraries/datepicker/css/datepicker.css @@ -0,0 +1,622 @@ +.datepicker--cell-day.-other-month-, .datepicker--cell-year.-other-decade- { + color: #dedede; } + .datepicker--cell-day.-other-month-:hover, .datepicker--cell-year.-other-decade-:hover { + color: #c5c5c5; } + .-disabled-.-focus-.datepicker--cell-day.-other-month-, .-disabled-.-focus-.datepicker--cell-year.-other-decade- { + color: #dedede; } + .-selected-.datepicker--cell-day.-other-month-, .-selected-.datepicker--cell-year.-other-decade- { + color: #fff; + background: #a2ddf6; } + .-selected-.-focus-.datepicker--cell-day.-other-month-, .-selected-.-focus-.datepicker--cell-year.-other-decade- { + background: #8ad5f4; } + .-in-range-.datepicker--cell-day.-other-month-, .-in-range-.datepicker--cell-year.-other-decade- { + background-color: rgba(92, 196, 239, 0.1); + color: #cccccc; } + .-in-range-.-focus-.datepicker--cell-day.-other-month-, .-in-range-.-focus-.datepicker--cell-year.-other-decade- { + background-color: rgba(92, 196, 239, 0.2); } + .datepicker--cell-day.-other-month-:empty, .datepicker--cell-year.-other-decade-:empty { + background: none; + border: none; } + +/* ------------------------------------------------- + Datepicker cells + ------------------------------------------------- */ +.datepicker--cells { + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; } + +.datepicker--cell { + border-radius: 4px; + box-sizing: border-box; + cursor: pointer; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + position: relative; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + height: 32px; + z-index: 1; } + .datepicker--cell.-focus- { + background: #f0f0f0; } + .datepicker--cell.-current- { + color: #4EB5E6; } + .datepicker--cell.-current-.-focus- { + color: #4a4a4a; } + .datepicker--cell.-current-.-in-range- { + color: #4EB5E6; } + .datepicker--cell.-in-range- { + background: rgba(92, 196, 239, 0.1); + color: #4a4a4a; + border-radius: 0; } + .datepicker--cell.-in-range-.-focus- { + background-color: rgba(92, 196, 239, 0.2); } + .datepicker--cell.-disabled- { + cursor: default; + color: #aeaeae; } + .datepicker--cell.-disabled-.-focus- { + color: #aeaeae; } + .datepicker--cell.-disabled-.-in-range- { + color: #a1a1a1; } + .datepicker--cell.-disabled-.-current-.-focus- { + color: #aeaeae; } + .datepicker--cell.-range-from- { + border: 1px solid rgba(92, 196, 239, 0.5); + background-color: rgba(92, 196, 239, 0.1); + border-radius: 4px 0 0 4px; } + .datepicker--cell.-range-to- { + border: 1px solid rgba(92, 196, 239, 0.5); + background-color: rgba(92, 196, 239, 0.1); + border-radius: 0 4px 4px 0; } + .datepicker--cell.-range-from-.-range-to- { + border-radius: 4px; } + .datepicker--cell.-selected- { + color: #fff; + border: none; + background: #5cc4ef; } + .datepicker--cell.-selected-.-current- { + color: #fff; + background: #5cc4ef; } + .datepicker--cell.-selected-.-focus- { + background: #45bced; } + .datepicker--cell:empty { + cursor: default; } + +.datepicker--days-names { + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + margin: 8px 0 3px; } + +.datepicker--day-name { + color: #FF9A19; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + text-align: center; + text-transform: uppercase; + font-size: .8em; } + +.datepicker--cell-day { + width: 14.28571%; } + +.datepicker--cells-months { + height: 170px; } + +.datepicker--cell-month { + width: 33.33%; + height: 25%; } + +.datepicker--years { + height: 170px; } + +.datepicker--cells-years { + height: 170px; } + +.datepicker--cell-year { + width: 25%; + height: 33.33%; } + +.datepicker--cell-day.-other-month-, .datepicker--cell-year.-other-decade- { + color: #dedede; } + .datepicker--cell-day.-other-month-:hover, .datepicker--cell-year.-other-decade-:hover { + color: #c5c5c5; } + .-disabled-.-focus-.datepicker--cell-day.-other-month-, .-disabled-.-focus-.datepicker--cell-year.-other-decade- { + color: #dedede; } + .-selected-.datepicker--cell-day.-other-month-, .-selected-.datepicker--cell-year.-other-decade- { + color: #fff; + background: #a2ddf6; } + .-selected-.-focus-.datepicker--cell-day.-other-month-, .-selected-.-focus-.datepicker--cell-year.-other-decade- { + background: #8ad5f4; } + .-in-range-.datepicker--cell-day.-other-month-, .-in-range-.datepicker--cell-year.-other-decade- { + background-color: rgba(92, 196, 239, 0.1); + color: #cccccc; } + .-in-range-.-focus-.datepicker--cell-day.-other-month-, .-in-range-.-focus-.datepicker--cell-year.-other-decade- { + background-color: rgba(92, 196, 239, 0.2); } + .datepicker--cell-day.-other-month-:empty, .datepicker--cell-year.-other-decade-:empty { + background: none; + border: none; } + +/* ------------------------------------------------- + Datepicker + ------------------------------------------------- */ +.datepickers-container { + position: absolute; + left: 0; + top: 0; } + @media print { + .datepickers-container { + display: none; } } + +.datepicker { + background: #fff; + border: 1px solid #dbdbdb; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); + border-radius: 4px; + box-sizing: content-box; + font-family: Tahoma, sans-serif; + font-size: 14px; + color: #4a4a4a; + width: 250px; + position: absolute; + left: -100000px; + opacity: 0; + transition: opacity 0.3s ease, left 0s 0.3s, -webkit-transform 0.3s ease; + transition: opacity 0.3s ease, transform 0.3s ease, left 0s 0.3s; + transition: opacity 0.3s ease, transform 0.3s ease, left 0s 0.3s, -webkit-transform 0.3s ease; + z-index: 100; } + .datepicker.-from-top- { + -webkit-transform: translateY(-8px); + transform: translateY(-8px); } + .datepicker.-from-right- { + -webkit-transform: translateX(8px); + transform: translateX(8px); } + .datepicker.-from-bottom- { + -webkit-transform: translateY(8px); + transform: translateY(8px); } + .datepicker.-from-left- { + -webkit-transform: translateX(-8px); + transform: translateX(-8px); } + .datepicker.active { + opacity: 1; + -webkit-transform: translate(0); + transform: translate(0); + transition: opacity 0.3s ease, left 0s 0s, -webkit-transform 0.3s ease; + transition: opacity 0.3s ease, transform 0.3s ease, left 0s 0s; + transition: opacity 0.3s ease, transform 0.3s ease, left 0s 0s, -webkit-transform 0.3s ease; } + +.datepicker-inline .datepicker { + border-color: #d7d7d7; + box-shadow: none; + position: static; + left: auto; + right: auto; + opacity: 1; + -webkit-transform: none; + transform: none; } + +.datepicker-inline .datepicker--pointer { + display: none; } + +.datepicker--content { + box-sizing: content-box; + padding: 4px; } + .-only-timepicker- .datepicker--content { + display: none; } + +.datepicker--pointer { + position: absolute; + background: #fff; + border-top: 1px solid #dbdbdb; + border-right: 1px solid #dbdbdb; + width: 10px; + height: 10px; + z-index: -1; } + .-top-left- .datepicker--pointer, .-top-center- .datepicker--pointer, .-top-right- .datepicker--pointer { + top: calc(100% - 4px); + -webkit-transform: rotate(135deg); + transform: rotate(135deg); } + .-right-top- .datepicker--pointer, .-right-center- .datepicker--pointer, .-right-bottom- .datepicker--pointer { + right: calc(100% - 4px); + -webkit-transform: rotate(225deg); + transform: rotate(225deg); } + .-bottom-left- .datepicker--pointer, .-bottom-center- .datepicker--pointer, .-bottom-right- .datepicker--pointer { + bottom: calc(100% - 4px); + -webkit-transform: rotate(315deg); + transform: rotate(315deg); } + .-left-top- .datepicker--pointer, .-left-center- .datepicker--pointer, .-left-bottom- .datepicker--pointer { + left: calc(100% - 4px); + -webkit-transform: rotate(45deg); + transform: rotate(45deg); } + .-top-left- .datepicker--pointer, .-bottom-left- .datepicker--pointer { + left: 10px; } + .-top-right- .datepicker--pointer, .-bottom-right- .datepicker--pointer { + right: 10px; } + .-top-center- .datepicker--pointer, .-bottom-center- .datepicker--pointer { + left: calc(50% - 10px / 2); } + .-left-top- .datepicker--pointer, .-right-top- .datepicker--pointer { + top: 10px; } + .-left-bottom- .datepicker--pointer, .-right-bottom- .datepicker--pointer { + bottom: 10px; } + .-left-center- .datepicker--pointer, .-right-center- .datepicker--pointer { + top: calc(50% - 10px / 2); } + +.datepicker--body { + display: none; } + .datepicker--body.active { + display: block; } + +.datepicker--cell-day.-other-month-, .datepicker--cell-year.-other-decade- { + color: #dedede; } + .datepicker--cell-day.-other-month-:hover, .datepicker--cell-year.-other-decade-:hover { + color: #c5c5c5; } + .-disabled-.-focus-.datepicker--cell-day.-other-month-, .-disabled-.-focus-.datepicker--cell-year.-other-decade- { + color: #dedede; } + .-selected-.datepicker--cell-day.-other-month-, .-selected-.datepicker--cell-year.-other-decade- { + color: #fff; + background: #a2ddf6; } + .-selected-.-focus-.datepicker--cell-day.-other-month-, .-selected-.-focus-.datepicker--cell-year.-other-decade- { + background: #8ad5f4; } + .-in-range-.datepicker--cell-day.-other-month-, .-in-range-.datepicker--cell-year.-other-decade- { + background-color: rgba(92, 196, 239, 0.1); + color: #cccccc; } + .-in-range-.-focus-.datepicker--cell-day.-other-month-, .-in-range-.-focus-.datepicker--cell-year.-other-decade- { + background-color: rgba(92, 196, 239, 0.2); } + .datepicker--cell-day.-other-month-:empty, .datepicker--cell-year.-other-decade-:empty { + background: none; + border: none; } + +/* ------------------------------------------------- + Navigation + ------------------------------------------------- */ +.datepicker--nav { + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; + border-bottom: 1px solid #efefef; + min-height: 32px; + padding: 4px; } + .-only-timepicker- .datepicker--nav { + display: none; } + +.datepicker--nav-title, +.datepicker--nav-action { + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + cursor: pointer; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; } + +.datepicker--nav-action { + width: 32px; + border-radius: 4px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } + .datepicker--nav-action:hover { + background: #f0f0f0; } + .datepicker--nav-action.-disabled- { + visibility: hidden; } + .datepicker--nav-action svg { + width: 32px; + height: 32px; } + .datepicker--nav-action path { + fill: none; + stroke: #9c9c9c; + stroke-width: 2px; } + +.datepicker--nav-title { + border-radius: 4px; + padding: 0 8px; } + .datepicker--nav-title i { + font-style: normal; + color: #9c9c9c; + margin-left: 5px; } + .datepicker--nav-title:hover { + background: #f0f0f0; } + .datepicker--nav-title.-disabled- { + cursor: default; + background: none; } + +.datepicker--buttons { + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + padding: 4px; + border-top: 1px solid #efefef; } + +.datepicker--button { + color: #4EB5E6; + cursor: pointer; + border-radius: 4px; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + display: -webkit-inline-flex; + display: -ms-inline-flexbox; + display: inline-flex; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + height: 32px; } + .datepicker--button:hover { + color: #4a4a4a; + background: #f0f0f0; } + +.datepicker--cell-day.-other-month-, .datepicker--cell-year.-other-decade- { + color: #dedede; } + .datepicker--cell-day.-other-month-:hover, .datepicker--cell-year.-other-decade-:hover { + color: #c5c5c5; } + .-disabled-.-focus-.datepicker--cell-day.-other-month-, .-disabled-.-focus-.datepicker--cell-year.-other-decade- { + color: #dedede; } + .-selected-.datepicker--cell-day.-other-month-, .-selected-.datepicker--cell-year.-other-decade- { + color: #fff; + background: #a2ddf6; } + .-selected-.-focus-.datepicker--cell-day.-other-month-, .-selected-.-focus-.datepicker--cell-year.-other-decade- { + background: #8ad5f4; } + .-in-range-.datepicker--cell-day.-other-month-, .-in-range-.datepicker--cell-year.-other-decade- { + background-color: rgba(92, 196, 239, 0.1); + color: #cccccc; } + .-in-range-.-focus-.datepicker--cell-day.-other-month-, .-in-range-.-focus-.datepicker--cell-year.-other-decade- { + background-color: rgba(92, 196, 239, 0.2); } + .datepicker--cell-day.-other-month-:empty, .datepicker--cell-year.-other-decade-:empty { + background: none; + border: none; } + +/* ------------------------------------------------- + Timepicker + ------------------------------------------------- */ +.datepicker--time { + border-top: 1px solid #efefef; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + padding: 4px; + position: relative; } + .datepicker--time.-am-pm- .datepicker--time-sliders { + -webkit-flex: 0 1 138px; + -ms-flex: 0 1 138px; + flex: 0 1 138px; + max-width: 138px; } + .-only-timepicker- .datepicker--time { + border-top: none; } + +.datepicker--time-sliders { + -webkit-flex: 0 1 153px; + -ms-flex: 0 1 153px; + flex: 0 1 153px; + margin-right: 10px; + max-width: 153px; } + +.datepicker--time-label { + display: none; + font-size: 12px; } + +.datepicker--time-current { + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + font-size: 14px; + text-align: center; + margin: 0 0 0 10px; } + +.datepicker--time-current-colon { + margin: 0 2px 3px; + line-height: 1; } + +.datepicker--time-current-hours, +.datepicker--time-current-minutes { + line-height: 1; + font-size: 19px; + font-family: "Century Gothic", CenturyGothic, AppleGothic, sans-serif; + position: relative; + z-index: 1; } + .datepicker--time-current-hours:after, + .datepicker--time-current-minutes:after { + content: ''; + background: #f0f0f0; + border-radius: 4px; + position: absolute; + left: -2px; + top: -3px; + right: -2px; + bottom: -2px; + z-index: -1; + opacity: 0; } + .datepicker--time-current-hours.-focus-:after, + .datepicker--time-current-minutes.-focus-:after { + opacity: 1; } + +.datepicker--time-current-ampm { + text-transform: uppercase; + -webkit-align-self: flex-end; + -ms-flex-item-align: end; + align-self: flex-end; + color: #9c9c9c; + margin-left: 6px; + font-size: 11px; + margin-bottom: 1px; } + +.datepicker--time-row { + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + font-size: 11px; + height: 17px; + background: linear-gradient(to right, #dedede, #dedede) left 50%/100% 1px no-repeat; } + .datepicker--time-row:first-child { + margin-bottom: 4px; } + .datepicker--time-row input[type='range'] { + background: none; + cursor: pointer; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + height: 100%; + padding: 0; + margin: 0; + -webkit-appearance: none; } + .datepicker--time-row input[type='range']::-webkit-slider-thumb { + -webkit-appearance: none; } + .datepicker--time-row input[type='range']::-ms-tooltip { + display: none; } + .datepicker--time-row input[type='range']:hover::-webkit-slider-thumb { + border-color: #b8b8b8; } + .datepicker--time-row input[type='range']:hover::-moz-range-thumb { + border-color: #b8b8b8; } + .datepicker--time-row input[type='range']:hover::-ms-thumb { + border-color: #b8b8b8; } + .datepicker--time-row input[type='range']:focus { + outline: none; } + .datepicker--time-row input[type='range']:focus::-webkit-slider-thumb { + background: #5cc4ef; + border-color: #5cc4ef; } + .datepicker--time-row input[type='range']:focus::-moz-range-thumb { + background: #5cc4ef; + border-color: #5cc4ef; } + .datepicker--time-row input[type='range']:focus::-ms-thumb { + background: #5cc4ef; + border-color: #5cc4ef; } + .datepicker--time-row input[type='range']::-webkit-slider-thumb { + box-sizing: border-box; + height: 12px; + width: 12px; + border-radius: 3px; + border: 1px solid #dedede; + background: #fff; + cursor: pointer; + transition: background .2s; } + .datepicker--time-row input[type='range']::-moz-range-thumb { + box-sizing: border-box; + height: 12px; + width: 12px; + border-radius: 3px; + border: 1px solid #dedede; + background: #fff; + cursor: pointer; + transition: background .2s; } + .datepicker--time-row input[type='range']::-ms-thumb { + box-sizing: border-box; + height: 12px; + width: 12px; + border-radius: 3px; + border: 1px solid #dedede; + background: #fff; + cursor: pointer; + transition: background .2s; } + .datepicker--time-row input[type='range']::-webkit-slider-thumb { + margin-top: -6px; } + .datepicker--time-row input[type='range']::-webkit-slider-runnable-track { + border: none; + height: 1px; + cursor: pointer; + color: transparent; + background: transparent; } + .datepicker--time-row input[type='range']::-moz-range-track { + border: none; + height: 1px; + cursor: pointer; + color: transparent; + background: transparent; } + .datepicker--time-row input[type='range']::-ms-track { + border: none; + height: 1px; + cursor: pointer; + color: transparent; + background: transparent; } + .datepicker--time-row input[type='range']::-ms-fill-lower { + background: transparent; } + .datepicker--time-row input[type='range']::-ms-fill-upper { + background: transparent; } + .datepicker--time-row span { + padding: 0 12px; } + +.datepicker--time-icon { + color: #9c9c9c; + border: 1px solid; + border-radius: 50%; + font-size: 16px; + position: relative; + margin: 0 5px -1px 0; + width: 1em; + height: 1em; } + .datepicker--time-icon:after, .datepicker--time-icon:before { + content: ''; + background: currentColor; + position: absolute; } + .datepicker--time-icon:after { + height: .4em; + width: 1px; + left: calc(50% - 1px); + top: calc(50% + 1px); + -webkit-transform: translateY(-100%); + transform: translateY(-100%); } + .datepicker--time-icon:before { + width: .4em; + height: 1px; + top: calc(50% + 1px); + left: calc(50% - 1px); } + +.datepicker--cell-day.-other-month-, .datepicker--cell-year.-other-decade- { + color: #dedede; } + .datepicker--cell-day.-other-month-:hover, .datepicker--cell-year.-other-decade-:hover { + color: #c5c5c5; } + .-disabled-.-focus-.datepicker--cell-day.-other-month-, .-disabled-.-focus-.datepicker--cell-year.-other-decade- { + color: #dedede; } + .-selected-.datepicker--cell-day.-other-month-, .-selected-.datepicker--cell-year.-other-decade- { + color: #fff; + background: #a2ddf6; } + .-selected-.-focus-.datepicker--cell-day.-other-month-, .-selected-.-focus-.datepicker--cell-year.-other-decade- { + background: #8ad5f4; } + .-in-range-.datepicker--cell-day.-other-month-, .-in-range-.datepicker--cell-year.-other-decade- { + background-color: rgba(92, 196, 239, 0.1); + color: #cccccc; } + .-in-range-.-focus-.datepicker--cell-day.-other-month-, .-in-range-.-focus-.datepicker--cell-year.-other-decade- { + background-color: rgba(92, 196, 239, 0.2); } + .datepicker--cell-day.-other-month-:empty, .datepicker--cell-year.-other-decade-:empty { + background: none; + border: none; } diff --git a/libraries/datepicker/css/datepicker.min.css b/libraries/datepicker/css/datepicker.min.css new file mode 100644 index 0000000..bc3cd6c --- /dev/null +++ b/libraries/datepicker/css/datepicker.min.css @@ -0,0 +1 @@ +.datepicker--cells{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.datepicker--cell{border-radius:4px;box-sizing:border-box;cursor:pointer;display:-webkit-flex;display:-ms-flexbox;display:flex;position:relative;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;height:32px;z-index:1}.datepicker--cell.-focus-{background:#f0f0f0}.datepicker--cell.-current-{color:#4EB5E6}.datepicker--cell.-current-.-focus-{color:#4a4a4a}.datepicker--cell.-current-.-in-range-{color:#4EB5E6}.datepicker--cell.-in-range-{background:rgba(92,196,239,.1);color:#4a4a4a;border-radius:0}.datepicker--cell.-in-range-.-focus-{background-color:rgba(92,196,239,.2)}.datepicker--cell.-disabled-{cursor:default;color:#aeaeae}.datepicker--cell.-disabled-.-focus-{color:#aeaeae}.datepicker--cell.-disabled-.-in-range-{color:#a1a1a1}.datepicker--cell.-disabled-.-current-.-focus-{color:#aeaeae}.datepicker--cell.-range-from-{border:1px solid rgba(92,196,239,.5);background-color:rgba(92,196,239,.1);border-radius:4px 0 0 4px}.datepicker--cell.-range-to-{border:1px solid rgba(92,196,239,.5);background-color:rgba(92,196,239,.1);border-radius:0 4px 4px 0}.datepicker--cell.-selected-,.datepicker--cell.-selected-.-current-{color:#fff;background:#5cc4ef}.datepicker--cell.-range-from-.-range-to-{border-radius:4px}.datepicker--cell.-selected-{border:none}.datepicker--cell.-selected-.-focus-{background:#45bced}.datepicker--cell:empty{cursor:default}.datepicker--days-names{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;margin:8px 0 3px}.datepicker--day-name{color:#FF9A19;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-flex:1;-ms-flex:1;flex:1;text-align:center;text-transform:uppercase;font-size:.8em}.-only-timepicker- .datepicker--content,.datepicker--body,.datepicker-inline .datepicker--pointer{display:none}.datepicker--cell-day{width:14.28571%}.datepicker--cells-months{height:170px}.datepicker--cell-month{width:33.33%;height:25%}.datepicker--cells-years,.datepicker--years{height:170px}.datepicker--cell-year{width:25%;height:33.33%}.datepickers-container{position:absolute;left:0;top:0}@media print{.datepickers-container{display:none}}.datepicker{background:#fff;border:1px solid #dbdbdb;box-shadow:0 4px 12px rgba(0,0,0,.15);border-radius:4px;box-sizing:content-box;font-family:Tahoma,sans-serif;font-size:14px;color:#4a4a4a;width:250px;position:absolute;left:-100000px;opacity:0;transition:opacity .3s ease,left 0s .3s,-webkit-transform .3s ease;transition:opacity .3s ease,transform .3s ease,left 0s .3s;transition:opacity .3s ease,transform .3s ease,left 0s .3s,-webkit-transform .3s ease;z-index:100}.datepicker.-from-top-{-webkit-transform:translateY(-8px);transform:translateY(-8px)}.datepicker.-from-right-{-webkit-transform:translateX(8px);transform:translateX(8px)}.datepicker.-from-bottom-{-webkit-transform:translateY(8px);transform:translateY(8px)}.datepicker.-from-left-{-webkit-transform:translateX(-8px);transform:translateX(-8px)}.datepicker.active{opacity:1;-webkit-transform:translate(0);transform:translate(0);transition:opacity .3s ease,left 0s 0s,-webkit-transform .3s ease;transition:opacity .3s ease,transform .3s ease,left 0s 0s;transition:opacity .3s ease,transform .3s ease,left 0s 0s,-webkit-transform .3s ease}.datepicker-inline .datepicker{border-color:#d7d7d7;box-shadow:none;position:static;left:auto;right:auto;opacity:1;-webkit-transform:none;transform:none}.datepicker--content{box-sizing:content-box;padding:4px}.datepicker--pointer{position:absolute;background:#fff;border-top:1px solid #dbdbdb;border-right:1px solid #dbdbdb;width:10px;height:10px;z-index:-1}.datepicker--nav-action:hover,.datepicker--nav-title:hover{background:#f0f0f0}.-top-center- .datepicker--pointer,.-top-left- .datepicker--pointer,.-top-right- .datepicker--pointer{top:calc(100% - 4px);-webkit-transform:rotate(135deg);transform:rotate(135deg)}.-right-bottom- .datepicker--pointer,.-right-center- .datepicker--pointer,.-right-top- .datepicker--pointer{right:calc(100% - 4px);-webkit-transform:rotate(225deg);transform:rotate(225deg)}.-bottom-center- .datepicker--pointer,.-bottom-left- .datepicker--pointer,.-bottom-right- .datepicker--pointer{bottom:calc(100% - 4px);-webkit-transform:rotate(315deg);transform:rotate(315deg)}.-left-bottom- .datepicker--pointer,.-left-center- .datepicker--pointer,.-left-top- .datepicker--pointer{left:calc(100% - 4px);-webkit-transform:rotate(45deg);transform:rotate(45deg)}.-bottom-left- .datepicker--pointer,.-top-left- .datepicker--pointer{left:10px}.-bottom-right- .datepicker--pointer,.-top-right- .datepicker--pointer{right:10px}.-bottom-center- .datepicker--pointer,.-top-center- .datepicker--pointer{left:calc(50% - 10px / 2)}.-left-top- .datepicker--pointer,.-right-top- .datepicker--pointer{top:10px}.-left-bottom- .datepicker--pointer,.-right-bottom- .datepicker--pointer{bottom:10px}.-left-center- .datepicker--pointer,.-right-center- .datepicker--pointer{top:calc(50% - 10px / 2)}.datepicker--body.active{display:block}.datepicker--nav{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;border-bottom:1px solid #efefef;min-height:32px;padding:4px}.-only-timepicker- .datepicker--nav{display:none}.datepicker--nav-action,.datepicker--nav-title{display:-webkit-flex;display:-ms-flexbox;display:flex;cursor:pointer;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.datepicker--nav-action{width:32px;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.datepicker--nav-action.-disabled-{visibility:hidden}.datepicker--nav-action svg{width:32px;height:32px}.datepicker--nav-action path{fill:none;stroke:#9c9c9c;stroke-width:2px}.datepicker--nav-title{border-radius:4px;padding:0 8px}.datepicker--buttons,.datepicker--time{border-top:1px solid #efefef;padding:4px}.datepicker--nav-title i{font-style:normal;color:#9c9c9c;margin-left:5px}.datepicker--nav-title.-disabled-{cursor:default;background:0 0}.datepicker--buttons{display:-webkit-flex;display:-ms-flexbox;display:flex}.datepicker--button{color:#4EB5E6;cursor:pointer;border-radius:4px;-webkit-flex:1;-ms-flex:1;flex:1;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:32px}.datepicker--button:hover{color:#4a4a4a;background:#f0f0f0}.datepicker--time{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;position:relative}.datepicker--time.-am-pm- .datepicker--time-sliders{-webkit-flex:0 1 138px;-ms-flex:0 1 138px;flex:0 1 138px;max-width:138px}.-only-timepicker- .datepicker--time{border-top:none}.datepicker--time-sliders{-webkit-flex:0 1 153px;-ms-flex:0 1 153px;flex:0 1 153px;margin-right:10px;max-width:153px}.datepicker--time-label{display:none;font-size:12px}.datepicker--time-current{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-flex:1;-ms-flex:1;flex:1;font-size:14px;text-align:center;margin:0 0 0 10px}.datepicker--time-current-colon{margin:0 2px 3px;line-height:1}.datepicker--time-current-hours,.datepicker--time-current-minutes{line-height:1;font-size:19px;font-family:"Century Gothic",CenturyGothic,AppleGothic,sans-serif;position:relative;z-index:1}.datepicker--time-current-hours:after,.datepicker--time-current-minutes:after{content:'';background:#f0f0f0;border-radius:4px;position:absolute;left:-2px;top:-3px;right:-2px;bottom:-2px;z-index:-1;opacity:0}.datepicker--time-current-hours.-focus-:after,.datepicker--time-current-minutes.-focus-:after{opacity:1}.datepicker--time-current-ampm{text-transform:uppercase;-webkit-align-self:flex-end;-ms-flex-item-align:end;align-self:flex-end;color:#9c9c9c;margin-left:6px;font-size:11px;margin-bottom:1px}.datepicker--time-row{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;font-size:11px;height:17px;background:linear-gradient(to right,#dedede,#dedede) left 50%/100% 1px no-repeat}.datepicker--time-row:first-child{margin-bottom:4px}.datepicker--time-row input[type=range]{background:0 0;cursor:pointer;-webkit-flex:1;-ms-flex:1;flex:1;height:100%;padding:0;margin:0;-webkit-appearance:none}.datepicker--time-row input[type=range]::-ms-tooltip{display:none}.datepicker--time-row input[type=range]:hover::-webkit-slider-thumb{border-color:#b8b8b8}.datepicker--time-row input[type=range]:hover::-moz-range-thumb{border-color:#b8b8b8}.datepicker--time-row input[type=range]:hover::-ms-thumb{border-color:#b8b8b8}.datepicker--time-row input[type=range]:focus{outline:0}.datepicker--time-row input[type=range]:focus::-webkit-slider-thumb{background:#5cc4ef;border-color:#5cc4ef}.datepicker--time-row input[type=range]:focus::-moz-range-thumb{background:#5cc4ef;border-color:#5cc4ef}.datepicker--time-row input[type=range]:focus::-ms-thumb{background:#5cc4ef;border-color:#5cc4ef}.datepicker--time-row input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid #dedede;background:#fff;cursor:pointer;transition:background .2s;margin-top:-6px}.datepicker--time-row input[type=range]::-moz-range-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid #dedede;background:#fff;cursor:pointer;transition:background .2s}.datepicker--time-row input[type=range]::-ms-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid #dedede;background:#fff;cursor:pointer;transition:background .2s}.datepicker--time-row input[type=range]::-webkit-slider-runnable-track{border:none;height:1px;cursor:pointer;color:transparent;background:0 0}.datepicker--time-row input[type=range]::-moz-range-track{border:none;height:1px;cursor:pointer;color:transparent;background:0 0}.datepicker--time-row input[type=range]::-ms-track{border:none;height:1px;cursor:pointer;color:transparent;background:0 0}.datepicker--time-row input[type=range]::-ms-fill-lower{background:0 0}.datepicker--time-row input[type=range]::-ms-fill-upper{background:0 0}.datepicker--time-row span{padding:0 12px}.datepicker--time-icon{color:#9c9c9c;border:1px solid;border-radius:50%;font-size:16px;position:relative;margin:0 5px -1px 0;width:1em;height:1em}.datepicker--time-icon:after,.datepicker--time-icon:before{content:'';background:currentColor;position:absolute}.datepicker--time-icon:after{height:.4em;width:1px;left:calc(50% - 1px);top:calc(50% + 1px);-webkit-transform:translateY(-100%);transform:translateY(-100%)}.datepicker--time-icon:before{width:.4em;height:1px;top:calc(50% + 1px);left:calc(50% - 1px)}.datepicker--cell-day.-other-month-,.datepicker--cell-year.-other-decade-{color:#dedede}.datepicker--cell-day.-other-month-:hover,.datepicker--cell-year.-other-decade-:hover{color:#c5c5c5}.-disabled-.-focus-.datepicker--cell-day.-other-month-,.-disabled-.-focus-.datepicker--cell-year.-other-decade-{color:#dedede}.-selected-.datepicker--cell-day.-other-month-,.-selected-.datepicker--cell-year.-other-decade-{color:#fff;background:#a2ddf6}.-selected-.-focus-.datepicker--cell-day.-other-month-,.-selected-.-focus-.datepicker--cell-year.-other-decade-{background:#8ad5f4}.-in-range-.datepicker--cell-day.-other-month-,.-in-range-.datepicker--cell-year.-other-decade-{background-color:rgba(92,196,239,.1);color:#ccc}.-in-range-.-focus-.datepicker--cell-day.-other-month-,.-in-range-.-focus-.datepicker--cell-year.-other-decade-{background-color:rgba(92,196,239,.2)}.datepicker--cell-day.-other-month-:empty,.datepicker--cell-year.-other-decade-:empty{background:0 0;border:none} \ No newline at end of file diff --git a/libraries/datepicker/js/datepicker.js b/libraries/datepicker/js/datepicker.js new file mode 100644 index 0000000..ad69b4f --- /dev/null +++ b/libraries/datepicker/js/datepicker.js @@ -0,0 +1,2236 @@ +;(function (window, $, undefined) { ;(function () { + var VERSION = '2.2.3', + pluginName = 'datepicker', + autoInitSelector = '.datepicker-here', + $body, $datepickersContainer, + containerBuilt = false, + baseTemplate = '' + + '

    ' + + '' + + '' + + '
    ' + + '
    ', + defaults = { + classes: '', + inline: false, + language: 'ru', + startDate: new Date(), + firstDay: '', + weekends: [6, 0], + dateFormat: '', + altField: '', + altFieldDateFormat: '@', + toggleSelected: true, + keyboardNav: true, + + position: 'bottom left', + offset: 12, + + view: 'days', + minView: 'days', + + showOtherMonths: true, + selectOtherMonths: true, + moveToOtherMonthsOnSelect: true, + + showOtherYears: true, + selectOtherYears: true, + moveToOtherYearsOnSelect: true, + + minDate: '', + maxDate: '', + disableNavWhenOutOfRange: true, + + multipleDates: false, // Boolean or Number + multipleDatesSeparator: ',', + range: false, + + todayButton: false, + clearButton: false, + + showEvent: 'focus', + autoClose: false, + + // navigation + monthsField: 'monthsShort', + prevHtml: '', + nextHtml: '', + navTitles: { + days: 'MM, yyyy', + months: 'yyyy', + years: 'yyyy1 - yyyy2' + }, + + // timepicker + timepicker: false, + onlyTimepicker: false, + dateTimeSeparator: ' ', + timeFormat: '', + minHours: 0, + maxHours: 24, + minMinutes: 0, + maxMinutes: 59, + hoursStep: 1, + minutesStep: 1, + + // events + onSelect: '', + onShow: '', + onHide: '', + onChangeMonth: '', + onChangeYear: '', + onChangeDecade: '', + onChangeView: '', + onRenderCell: '' + }, + hotKeys = { + 'ctrlRight': [17, 39], + 'ctrlUp': [17, 38], + 'ctrlLeft': [17, 37], + 'ctrlDown': [17, 40], + 'shiftRight': [16, 39], + 'shiftUp': [16, 38], + 'shiftLeft': [16, 37], + 'shiftDown': [16, 40], + 'altUp': [18, 38], + 'altRight': [18, 39], + 'altLeft': [18, 37], + 'altDown': [18, 40], + 'ctrlShiftUp': [16, 17, 38] + }, + datepicker; + + var Datepicker = function (el, options) { + this.el = el; + this.$el = $(el); + + this.opts = $.extend(true, {}, defaults, options, this.$el.data()); + + if ($body == undefined) { + $body = $('body'); + } + + if (!this.opts.startDate) { + this.opts.startDate = new Date(); + } + + if (this.el.nodeName == 'INPUT') { + this.elIsInput = true; + } + + if (this.opts.altField) { + this.$altField = typeof this.opts.altField == 'string' ? $(this.opts.altField) : this.opts.altField; + } + + this.inited = false; + this.visible = false; + this.silent = false; // Need to prevent unnecessary rendering + + this.currentDate = this.opts.startDate; + this.currentView = this.opts.view; + this._createShortCuts(); + this.selectedDates = []; + this.views = {}; + this.keys = []; + this.minRange = ''; + this.maxRange = ''; + this._prevOnSelectValue = ''; + + this.init() + }; + + datepicker = Datepicker; + + datepicker.prototype = { + VERSION: VERSION, + viewIndexes: ['days', 'months', 'years'], + + init: function () { + if (!containerBuilt && !this.opts.inline && this.elIsInput) { + this._buildDatepickersContainer(); + } + this._buildBaseHtml(); + this._defineLocale(this.opts.language); + this._syncWithMinMaxDates(); + + if (this.elIsInput) { + if (!this.opts.inline) { + // Set extra classes for proper transitions + this._setPositionClasses(this.opts.position); + this._bindEvents() + } + if (this.opts.keyboardNav && !this.opts.onlyTimepicker) { + this._bindKeyboardEvents(); + } + this.$datepicker.on('mousedown', this._onMouseDownDatepicker.bind(this)); + this.$datepicker.on('mouseup', this._onMouseUpDatepicker.bind(this)); + } + + if (this.opts.classes) { + this.$datepicker.addClass(this.opts.classes) + } + + if (this.opts.timepicker) { + this.timepicker = new $.fn.datepicker.Timepicker(this, this.opts); + this._bindTimepickerEvents(); + } + + if (this.opts.onlyTimepicker) { + this.$datepicker.addClass('-only-timepicker-'); + } + + this.views[this.currentView] = new $.fn.datepicker.Body(this, this.currentView, this.opts); + this.views[this.currentView].show(); + this.nav = new $.fn.datepicker.Navigation(this, this.opts); + this.view = this.currentView; + + this.$el.on('clickCell.adp', this._onClickCell.bind(this)); + this.$datepicker.on('mouseenter', '.datepicker--cell', this._onMouseEnterCell.bind(this)); + this.$datepicker.on('mouseleave', '.datepicker--cell', this._onMouseLeaveCell.bind(this)); + + this.inited = true; + }, + + _createShortCuts: function () { + this.minDate = this.opts.minDate ? this.opts.minDate : new Date(-8639999913600000); + this.maxDate = this.opts.maxDate ? this.opts.maxDate : new Date(8639999913600000); + }, + + _bindEvents : function () { + this.$el.on(this.opts.showEvent + '.adp', this._onShowEvent.bind(this)); + this.$el.on('mouseup.adp', this._onMouseUpEl.bind(this)); + this.$el.on('blur.adp', this._onBlur.bind(this)); + this.$el.on('keyup.adp', this._onKeyUpGeneral.bind(this)); + $(window).on('resize.adp', this._onResize.bind(this)); + $('body').on('mouseup.adp', this._onMouseUpBody.bind(this)); + }, + + _bindKeyboardEvents: function () { + this.$el.on('keydown.adp', this._onKeyDown.bind(this)); + this.$el.on('keyup.adp', this._onKeyUp.bind(this)); + this.$el.on('hotKey.adp', this._onHotKey.bind(this)); + }, + + _bindTimepickerEvents: function () { + this.$el.on('timeChange.adp', this._onTimeChange.bind(this)); + }, + + isWeekend: function (day) { + return this.opts.weekends.indexOf(day) !== -1; + }, + + _defineLocale: function (lang) { + if (typeof lang == 'string') { + this.loc = $.fn.datepicker.language[lang]; + if (!this.loc) { + console.warn('Can\'t find language "' + lang + '" in Datepicker.language, will use "ru" instead'); + this.loc = $.extend(true, {}, $.fn.datepicker.language.ru) + } + + this.loc = $.extend(true, {}, $.fn.datepicker.language.ru, $.fn.datepicker.language[lang]) + } else { + this.loc = $.extend(true, {}, $.fn.datepicker.language.ru, lang) + } + + if (this.opts.dateFormat) { + this.loc.dateFormat = this.opts.dateFormat + } + + if (this.opts.timeFormat) { + this.loc.timeFormat = this.opts.timeFormat + } + + if (this.opts.firstDay !== '') { + this.loc.firstDay = this.opts.firstDay + } + + if (this.opts.timepicker) { + this.loc.dateFormat = [this.loc.dateFormat, this.loc.timeFormat].join(this.opts.dateTimeSeparator); + } + + if (this.opts.onlyTimepicker) { + this.loc.dateFormat = this.loc.timeFormat; + } + + var boundary = this._getWordBoundaryRegExp; + if (this.loc.timeFormat.match(boundary('aa')) || + this.loc.timeFormat.match(boundary('AA')) + ) { + this.ampm = true; + } + }, + + _buildDatepickersContainer: function () { + containerBuilt = true; + $body.append('
    '); + $datepickersContainer = $('#datepickers-container'); + }, + + _buildBaseHtml: function () { + var $appendTarget, + $inline = $('
    '); + + if(this.el.nodeName == 'INPUT') { + if (!this.opts.inline) { + $appendTarget = $datepickersContainer; + } else { + $appendTarget = $inline.insertAfter(this.$el) + } + } else { + $appendTarget = $inline.appendTo(this.$el) + } + + this.$datepicker = $(baseTemplate).appendTo($appendTarget); + this.$content = $('.datepicker--content', this.$datepicker); + this.$nav = $('.datepicker--nav', this.$datepicker); + }, + + _triggerOnChange: function () { + if (!this.selectedDates.length) { + // Prevent from triggering multiple onSelect callback with same argument (empty string) in IE10-11 + if (this._prevOnSelectValue === '') return; + this._prevOnSelectValue = ''; + return this.opts.onSelect('', '', this); + } + + var selectedDates = this.selectedDates, + parsedSelected = datepicker.getParsedDate(selectedDates[0]), + formattedDates, + _this = this, + dates = new Date( + parsedSelected.year, + parsedSelected.month, + parsedSelected.date, + parsedSelected.hours, + parsedSelected.minutes + ); + + formattedDates = selectedDates.map(function (date) { + return _this.formatDate(_this.loc.dateFormat, date) + }).join(this.opts.multipleDatesSeparator); + + // Create new dates array, to separate it from original selectedDates + if (this.opts.multipleDates || this.opts.range) { + dates = selectedDates.map(function(date) { + var parsedDate = datepicker.getParsedDate(date); + return new Date( + parsedDate.year, + parsedDate.month, + parsedDate.date, + parsedDate.hours, + parsedDate.minutes + ); + }) + } + + this._prevOnSelectValue = formattedDates; + this.opts.onSelect(formattedDates, dates, this); + }, + + next: function () { + var d = this.parsedDate, + o = this.opts; + switch (this.view) { + case 'days': + this.date = new Date(d.year, d.month + 1, 1); + if (o.onChangeMonth) o.onChangeMonth(this.parsedDate.month, this.parsedDate.year); + break; + case 'months': + this.date = new Date(d.year + 1, d.month, 1); + if (o.onChangeYear) o.onChangeYear(this.parsedDate.year); + break; + case 'years': + this.date = new Date(d.year + 10, 0, 1); + if (o.onChangeDecade) o.onChangeDecade(this.curDecade); + break; + } + }, + + prev: function () { + var d = this.parsedDate, + o = this.opts; + switch (this.view) { + case 'days': + this.date = new Date(d.year, d.month - 1, 1); + if (o.onChangeMonth) o.onChangeMonth(this.parsedDate.month, this.parsedDate.year); + break; + case 'months': + this.date = new Date(d.year - 1, d.month, 1); + if (o.onChangeYear) o.onChangeYear(this.parsedDate.year); + break; + case 'years': + this.date = new Date(d.year - 10, 0, 1); + if (o.onChangeDecade) o.onChangeDecade(this.curDecade); + break; + } + }, + + formatDate: function (string, date) { + date = date || this.date; + var result = string, + boundary = this._getWordBoundaryRegExp, + locale = this.loc, + leadingZero = datepicker.getLeadingZeroNum, + decade = datepicker.getDecade(date), + d = datepicker.getParsedDate(date), + fullHours = d.fullHours, + hours = d.hours, + ampm = string.match(boundary('aa')) || string.match(boundary('AA')), + dayPeriod = 'am', + replacer = this._replacer, + validHours; + + if (this.opts.timepicker && this.timepicker && ampm) { + validHours = this.timepicker._getValidHoursFromDate(date, ampm); + fullHours = leadingZero(validHours.hours); + hours = validHours.hours; + dayPeriod = validHours.dayPeriod; + } + + switch (true) { + case /@/.test(result): + result = result.replace(/@/, date.getTime()); + case /aa/.test(result): + result = replacer(result, boundary('aa'), dayPeriod); + case /AA/.test(result): + result = replacer(result, boundary('AA'), dayPeriod.toUpperCase()); + case /dd/.test(result): + result = replacer(result, boundary('dd'), d.fullDate); + case /d/.test(result): + result = replacer(result, boundary('d'), d.date); + case /DD/.test(result): + result = replacer(result, boundary('DD'), locale.days[d.day]); + case /D/.test(result): + result = replacer(result, boundary('D'), locale.daysShort[d.day]); + case /mm/.test(result): + result = replacer(result, boundary('mm'), d.fullMonth); + case /m/.test(result): + result = replacer(result, boundary('m'), d.month + 1); + case /MM/.test(result): + result = replacer(result, boundary('MM'), this.loc.months[d.month]); + case /M/.test(result): + result = replacer(result, boundary('M'), locale.monthsShort[d.month]); + case /ii/.test(result): + result = replacer(result, boundary('ii'), d.fullMinutes); + case /i/.test(result): + result = replacer(result, boundary('i'), d.minutes); + case /hh/.test(result): + result = replacer(result, boundary('hh'), fullHours); + case /h/.test(result): + result = replacer(result, boundary('h'), hours); + case /yyyy/.test(result): + result = replacer(result, boundary('yyyy'), d.year); + case /yyyy1/.test(result): + result = replacer(result, boundary('yyyy1'), decade[0]); + case /yyyy2/.test(result): + result = replacer(result, boundary('yyyy2'), decade[1]); + case /yy/.test(result): + result = replacer(result, boundary('yy'), d.year.toString().slice(-2)); + } + + return result; + }, + + _replacer: function (str, reg, data) { + return str.replace(reg, function (match, p1,p2,p3) { + return p1 + data + p3; + }) + }, + + _getWordBoundaryRegExp: function (sign) { + var symbols = '\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;'; + + return new RegExp('(^|>|' + symbols + ')(' + sign + ')($|<|' + symbols + ')', 'g'); + }, + + + selectDate: function (date) { + var _this = this, + opts = _this.opts, + d = _this.parsedDate, + selectedDates = _this.selectedDates, + len = selectedDates.length, + newDate = ''; + + if (Array.isArray(date)) { + date.forEach(function (d) { + _this.selectDate(d) + }); + return; + } + + if (!(date instanceof Date)) return; + + this.lastSelectedDate = date; + + // Set new time values from Date + if (this.timepicker) { + this.timepicker._setTime(date); + } + + // On this step timepicker will set valid values in it's instance + _this._trigger('selectDate', date); + + // Set correct time values after timepicker's validation + // Prevent from setting hours or minutes which values are lesser then `min` value or + // greater then `max` value + if (this.timepicker) { + date.setHours(this.timepicker.hours); + date.setMinutes(this.timepicker.minutes) + } + + if (_this.view == 'days') { + if (date.getMonth() != d.month && opts.moveToOtherMonthsOnSelect) { + newDate = new Date(date.getFullYear(), date.getMonth(), 1); + } + } + + if (_this.view == 'years') { + if (date.getFullYear() != d.year && opts.moveToOtherYearsOnSelect) { + newDate = new Date(date.getFullYear(), 0, 1); + } + } + + if (newDate) { + _this.silent = true; + _this.date = newDate; + _this.silent = false; + _this.nav._render() + } + + if (opts.multipleDates && !opts.range) { // Set priority to range functionality + if (len === opts.multipleDates) return; + if (!_this._isSelected(date)) { + _this.selectedDates.push(date); + } + } else if (opts.range) { + if (len == 2) { + _this.selectedDates = [date]; + _this.minRange = date; + _this.maxRange = ''; + } else if (len == 1) { + _this.selectedDates.push(date); + if (!_this.maxRange){ + _this.maxRange = date; + } else { + _this.minRange = date; + } + // Swap dates if they were selected via dp.selectDate() and second date was smaller then first + if (datepicker.bigger(_this.maxRange, _this.minRange)) { + _this.maxRange = _this.minRange; + _this.minRange = date; + } + _this.selectedDates = [_this.minRange, _this.maxRange] + + } else { + _this.selectedDates = [date]; + _this.minRange = date; + } + } else { + _this.selectedDates = [date]; + } + + _this._setInputValue(); + + if (opts.onSelect) { + _this._triggerOnChange(); + } + + if (opts.autoClose && !this.timepickerIsActive) { + if (!opts.multipleDates && !opts.range) { + _this.hide(); + } else if (opts.range && _this.selectedDates.length == 2) { + _this.hide(); + } + } + + _this.views[this.currentView]._render() + }, + + removeDate: function (date) { + var selected = this.selectedDates, + _this = this; + + if (!(date instanceof Date)) return; + + return selected.some(function (curDate, i) { + if (datepicker.isSame(curDate, date)) { + selected.splice(i, 1); + + if (!_this.selectedDates.length) { + _this.minRange = ''; + _this.maxRange = ''; + _this.lastSelectedDate = ''; + } else { + _this.lastSelectedDate = _this.selectedDates[_this.selectedDates.length - 1]; + } + + _this.views[_this.currentView]._render(); + _this._setInputValue(); + + if (_this.opts.onSelect) { + _this._triggerOnChange(); + } + + return true + } + }) + }, + + today: function () { + this.silent = true; + this.view = this.opts.minView; + this.silent = false; + this.date = new Date(); + + if (this.opts.todayButton instanceof Date) { + this.selectDate(this.opts.todayButton) + } + }, + + clear: function () { + this.selectedDates = []; + this.minRange = ''; + this.maxRange = ''; + this.views[this.currentView]._render(); + this._setInputValue(); + if (this.opts.onSelect) { + this._triggerOnChange() + } + }, + + /** + * Updates datepicker options + * @param {String|Object} param - parameter's name to update. If object then it will extend current options + * @param {String|Number|Object} [value] - new param value + */ + update: function (param, value) { + var len = arguments.length, + lastSelectedDate = this.lastSelectedDate; + + if (len == 2) { + this.opts[param] = value; + } else if (len == 1 && typeof param == 'object') { + this.opts = $.extend(true, this.opts, param) + } + + this._createShortCuts(); + this._syncWithMinMaxDates(); + this._defineLocale(this.opts.language); + this.nav._addButtonsIfNeed(); + if (!this.opts.onlyTimepicker) this.nav._render(); + this.views[this.currentView]._render(); + + if (this.elIsInput && !this.opts.inline) { + this._setPositionClasses(this.opts.position); + if (this.visible) { + this.setPosition(this.opts.position) + } + } + + if (this.opts.classes) { + this.$datepicker.addClass(this.opts.classes) + } + + if (this.opts.onlyTimepicker) { + this.$datepicker.addClass('-only-timepicker-'); + } + + if (this.opts.timepicker) { + if (lastSelectedDate) this.timepicker._handleDate(lastSelectedDate); + this.timepicker._updateRanges(); + this.timepicker._updateCurrentTime(); + // Change hours and minutes if it's values have been changed through min/max hours/minutes + if (lastSelectedDate) { + lastSelectedDate.setHours(this.timepicker.hours); + lastSelectedDate.setMinutes(this.timepicker.minutes); + } + } + + this._setInputValue(); + + return this; + }, + + _syncWithMinMaxDates: function () { + var curTime = this.date.getTime(); + this.silent = true; + if (this.minTime > curTime) { + this.date = this.minDate; + } + + if (this.maxTime < curTime) { + this.date = this.maxDate; + } + this.silent = false; + }, + + _isSelected: function (checkDate, cellType) { + var res = false; + this.selectedDates.some(function (date) { + if (datepicker.isSame(date, checkDate, cellType)) { + res = date; + return true; + } + }); + return res; + }, + + _setInputValue: function () { + var _this = this, + opts = _this.opts, + format = _this.loc.dateFormat, + altFormat = opts.altFieldDateFormat, + value = _this.selectedDates.map(function (date) { + return _this.formatDate(format, date) + }), + altValues; + + if (opts.altField && _this.$altField.length) { + altValues = this.selectedDates.map(function (date) { + return _this.formatDate(altFormat, date) + }); + altValues = altValues.join(this.opts.multipleDatesSeparator); + this.$altField.val(altValues); + } + + value = value.join(this.opts.multipleDatesSeparator); + + this.$el.val(value) + }, + + /** + * Check if date is between minDate and maxDate + * @param date {object} - date object + * @param type {string} - cell type + * @returns {boolean} + * @private + */ + _isInRange: function (date, type) { + var time = date.getTime(), + d = datepicker.getParsedDate(date), + min = datepicker.getParsedDate(this.minDate), + max = datepicker.getParsedDate(this.maxDate), + dMinTime = new Date(d.year, d.month, min.date).getTime(), + dMaxTime = new Date(d.year, d.month, max.date).getTime(), + types = { + day: time >= this.minTime && time <= this.maxTime, + month: dMinTime >= this.minTime && dMaxTime <= this.maxTime, + year: d.year >= min.year && d.year <= max.year + }; + return type ? types[type] : types.day + }, + + _getDimensions: function ($el) { + var offset = $el.offset(); + + return { + width: $el.outerWidth(), + height: $el.outerHeight(), + left: offset.left, + top: offset.top + } + }, + + _getDateFromCell: function (cell) { + var curDate = this.parsedDate, + year = cell.data('year') || curDate.year, + month = cell.data('month') == undefined ? curDate.month : cell.data('month'), + date = cell.data('date') || 1; + + return new Date(year, month, date); + }, + + _setPositionClasses: function (pos) { + pos = pos.split(' '); + var main = pos[0], + sec = pos[1], + classes = 'datepicker -' + main + '-' + sec + '- -from-' + main + '-'; + + if (this.visible) classes += ' active'; + + this.$datepicker + .removeAttr('class') + .addClass(classes); + }, + + setPosition: function (position) { + position = position || this.opts.position; + + var dims = this._getDimensions(this.$el), + selfDims = this._getDimensions(this.$datepicker), + pos = position.split(' '), + top, left, + offset = this.opts.offset, + main = pos[0], + secondary = pos[1]; + + switch (main) { + case 'top': + top = dims.top - selfDims.height - offset; + break; + case 'right': + left = dims.left + dims.width + offset; + break; + case 'bottom': + top = dims.top + dims.height + offset; + break; + case 'left': + left = dims.left - selfDims.width - offset; + break; + } + + switch(secondary) { + case 'top': + top = dims.top; + break; + case 'right': + left = dims.left + dims.width - selfDims.width; + break; + case 'bottom': + top = dims.top + dims.height - selfDims.height; + break; + case 'left': + left = dims.left; + break; + case 'center': + if (/left|right/.test(main)) { + top = dims.top + dims.height/2 - selfDims.height/2; + } else { + left = dims.left + dims.width/2 - selfDims.width/2; + } + } + + this.$datepicker + .css({ + left: left, + top: top + }) + }, + + show: function () { + var onShow = this.opts.onShow; + + this.setPosition(this.opts.position); + this.$datepicker.addClass('active'); + this.visible = true; + + if (onShow) { + this._bindVisionEvents(onShow) + } + }, + + hide: function () { + var onHide = this.opts.onHide; + + this.$datepicker + .removeClass('active') + .css({ + left: '-100000px' + }); + + this.focused = ''; + this.keys = []; + + this.inFocus = false; + this.visible = false; + this.$el.blur(); + + if (onHide) { + this._bindVisionEvents(onHide) + } + }, + + down: function (date) { + this._changeView(date, 'down'); + }, + + up: function (date) { + this._changeView(date, 'up'); + }, + + _bindVisionEvents: function (event) { + this.$datepicker.off('transitionend.dp'); + event(this, false); + this.$datepicker.one('transitionend.dp', event.bind(this, this, true)) + }, + + _changeView: function (date, dir) { + date = date || this.focused || this.date; + + var nextView = dir == 'up' ? this.viewIndex + 1 : this.viewIndex - 1; + if (nextView > 2) nextView = 2; + if (nextView < 0) nextView = 0; + + this.silent = true; + this.date = new Date(date.getFullYear(), date.getMonth(), 1); + this.silent = false; + this.view = this.viewIndexes[nextView]; + + }, + + _handleHotKey: function (key) { + var date = datepicker.getParsedDate(this._getFocusedDate()), + focusedParsed, + o = this.opts, + newDate, + totalDaysInNextMonth, + monthChanged = false, + yearChanged = false, + decadeChanged = false, + y = date.year, + m = date.month, + d = date.date; + + switch (key) { + case 'ctrlRight': + case 'ctrlUp': + m += 1; + monthChanged = true; + break; + case 'ctrlLeft': + case 'ctrlDown': + m -= 1; + monthChanged = true; + break; + case 'shiftRight': + case 'shiftUp': + yearChanged = true; + y += 1; + break; + case 'shiftLeft': + case 'shiftDown': + yearChanged = true; + y -= 1; + break; + case 'altRight': + case 'altUp': + decadeChanged = true; + y += 10; + break; + case 'altLeft': + case 'altDown': + decadeChanged = true; + y -= 10; + break; + case 'ctrlShiftUp': + this.up(); + break; + } + + totalDaysInNextMonth = datepicker.getDaysCount(new Date(y,m)); + newDate = new Date(y,m,d); + + // If next month has less days than current, set date to total days in that month + if (totalDaysInNextMonth < d) d = totalDaysInNextMonth; + + // Check if newDate is in valid range + if (newDate.getTime() < this.minTime) { + newDate = this.minDate; + } else if (newDate.getTime() > this.maxTime) { + newDate = this.maxDate; + } + + this.focused = newDate; + + focusedParsed = datepicker.getParsedDate(newDate); + if (monthChanged && o.onChangeMonth) { + o.onChangeMonth(focusedParsed.month, focusedParsed.year) + } + if (yearChanged && o.onChangeYear) { + o.onChangeYear(focusedParsed.year) + } + if (decadeChanged && o.onChangeDecade) { + o.onChangeDecade(this.curDecade) + } + }, + + _registerKey: function (key) { + var exists = this.keys.some(function (curKey) { + return curKey == key; + }); + + if (!exists) { + this.keys.push(key) + } + }, + + _unRegisterKey: function (key) { + var index = this.keys.indexOf(key); + + this.keys.splice(index, 1); + }, + + _isHotKeyPressed: function () { + var currentHotKey, + found = false, + _this = this, + pressedKeys = this.keys.sort(); + + for (var hotKey in hotKeys) { + currentHotKey = hotKeys[hotKey]; + if (pressedKeys.length != currentHotKey.length) continue; + + if (currentHotKey.every(function (key, i) { return key == pressedKeys[i]})) { + _this._trigger('hotKey', hotKey); + found = true; + } + } + + return found; + }, + + _trigger: function (event, args) { + this.$el.trigger(event, args) + }, + + _focusNextCell: function (keyCode, type) { + type = type || this.cellType; + + var date = datepicker.getParsedDate(this._getFocusedDate()), + y = date.year, + m = date.month, + d = date.date; + + if (this._isHotKeyPressed()){ + return; + } + + switch(keyCode) { + case 37: // left + type == 'day' ? (d -= 1) : ''; + type == 'month' ? (m -= 1) : ''; + type == 'year' ? (y -= 1) : ''; + break; + case 38: // up + type == 'day' ? (d -= 7) : ''; + type == 'month' ? (m -= 3) : ''; + type == 'year' ? (y -= 4) : ''; + break; + case 39: // right + type == 'day' ? (d += 1) : ''; + type == 'month' ? (m += 1) : ''; + type == 'year' ? (y += 1) : ''; + break; + case 40: // down + type == 'day' ? (d += 7) : ''; + type == 'month' ? (m += 3) : ''; + type == 'year' ? (y += 4) : ''; + break; + } + + var nd = new Date(y,m,d); + if (nd.getTime() < this.minTime) { + nd = this.minDate; + } else if (nd.getTime() > this.maxTime) { + nd = this.maxDate; + } + + this.focused = nd; + + }, + + _getFocusedDate: function () { + var focused = this.focused || this.selectedDates[this.selectedDates.length - 1], + d = this.parsedDate; + + if (!focused) { + switch (this.view) { + case 'days': + focused = new Date(d.year, d.month, new Date().getDate()); + break; + case 'months': + focused = new Date(d.year, d.month, 1); + break; + case 'years': + focused = new Date(d.year, 0, 1); + break; + } + } + + return focused; + }, + + _getCell: function (date, type) { + type = type || this.cellType; + + var d = datepicker.getParsedDate(date), + selector = '.datepicker--cell[data-year="' + d.year + '"]', + $cell; + + switch (type) { + case 'month': + selector = '[data-month="' + d.month + '"]'; + break; + case 'day': + selector += '[data-month="' + d.month + '"][data-date="' + d.date + '"]'; + break; + } + $cell = this.views[this.currentView].$el.find(selector); + + return $cell.length ? $cell : $(''); + }, + + destroy: function () { + var _this = this; + _this.$el + .off('.adp') + .data('datepicker', ''); + + _this.selectedDates = []; + _this.focused = ''; + _this.views = {}; + _this.keys = []; + _this.minRange = ''; + _this.maxRange = ''; + + if (_this.opts.inline || !_this.elIsInput) { + _this.$datepicker.closest('.datepicker-inline').remove(); + } else { + _this.$datepicker.remove(); + } + }, + + _handleAlreadySelectedDates: function (alreadySelected, selectedDate) { + if (this.opts.range) { + if (!this.opts.toggleSelected) { + // Add possibility to select same date when range is true + if (this.selectedDates.length != 2) { + this._trigger('clickCell', selectedDate); + } + } else { + this.removeDate(selectedDate); + } + } else if (this.opts.toggleSelected){ + this.removeDate(selectedDate); + } + + // Change last selected date to be able to change time when clicking on this cell + if (!this.opts.toggleSelected) { + this.lastSelectedDate = alreadySelected; + if (this.opts.timepicker) { + this.timepicker._setTime(alreadySelected); + this.timepicker.update(); + } + } + }, + + _onShowEvent: function (e) { + if (!this.visible) { + this.show(); + } + }, + + _onBlur: function () { + if (!this.inFocus && this.visible) { + this.hide(); + } + }, + + _onMouseDownDatepicker: function (e) { + this.inFocus = true; + }, + + _onMouseUpDatepicker: function (e) { + this.inFocus = false; + e.originalEvent.inFocus = true; + if (!e.originalEvent.timepickerFocus) this.$el.focus(); + }, + + _onKeyUpGeneral: function (e) { + var val = this.$el.val(); + + if (!val) { + this.clear(); + } + }, + + _onResize: function () { + if (this.visible) { + this.setPosition(); + } + }, + + _onMouseUpBody: function (e) { + if (e.originalEvent.inFocus) return; + + if (this.visible && !this.inFocus) { + this.hide(); + } + }, + + _onMouseUpEl: function (e) { + e.originalEvent.inFocus = true; + setTimeout(this._onKeyUpGeneral.bind(this),4); + }, + + _onKeyDown: function (e) { + var code = e.which; + this._registerKey(code); + + // Arrows + if (code >= 37 && code <= 40) { + e.preventDefault(); + this._focusNextCell(code); + } + + // Enter + if (code == 13) { + if (this.focused) { + if (this._getCell(this.focused).hasClass('-disabled-')) return; + if (this.view != this.opts.minView) { + this.down() + } else { + var alreadySelected = this._isSelected(this.focused, this.cellType); + + if (!alreadySelected) { + if (this.timepicker) { + this.focused.setHours(this.timepicker.hours); + this.focused.setMinutes(this.timepicker.minutes); + } + this.selectDate(this.focused); + return; + } + this._handleAlreadySelectedDates(alreadySelected, this.focused) + } + } + } + + // Esc + if (code == 27) { + this.hide(); + } + }, + + _onKeyUp: function (e) { + var code = e.which; + this._unRegisterKey(code); + }, + + _onHotKey: function (e, hotKey) { + this._handleHotKey(hotKey); + }, + + _onMouseEnterCell: function (e) { + var $cell = $(e.target).closest('.datepicker--cell'), + date = this._getDateFromCell($cell); + + // Prevent from unnecessary rendering and setting new currentDate + this.silent = true; + + if (this.focused) { + this.focused = '' + } + + $cell.addClass('-focus-'); + + this.focused = date; + this.silent = false; + + if (this.opts.range && this.selectedDates.length == 1) { + this.minRange = this.selectedDates[0]; + this.maxRange = ''; + if (datepicker.less(this.minRange, this.focused)) { + this.maxRange = this.minRange; + this.minRange = ''; + } + this.views[this.currentView]._update(); + } + }, + + _onMouseLeaveCell: function (e) { + var $cell = $(e.target).closest('.datepicker--cell'); + + $cell.removeClass('-focus-'); + + this.silent = true; + this.focused = ''; + this.silent = false; + }, + + _onTimeChange: function (e, h, m) { + var date = new Date(), + selectedDates = this.selectedDates, + selected = false; + + if (selectedDates.length) { + selected = true; + date = this.lastSelectedDate; + } + + date.setHours(h); + date.setMinutes(m); + + if (!selected && !this._getCell(date).hasClass('-disabled-')) { + this.selectDate(date); + } else { + this._setInputValue(); + if (this.opts.onSelect) { + this._triggerOnChange(); + } + } + }, + + _onClickCell: function (e, date) { + if (this.timepicker) { + date.setHours(this.timepicker.hours); + date.setMinutes(this.timepicker.minutes); + } + this.selectDate(date); + }, + + set focused(val) { + if (!val && this.focused) { + var $cell = this._getCell(this.focused); + + if ($cell.length) { + $cell.removeClass('-focus-') + } + } + this._focused = val; + if (this.opts.range && this.selectedDates.length == 1) { + this.minRange = this.selectedDates[0]; + this.maxRange = ''; + if (datepicker.less(this.minRange, this._focused)) { + this.maxRange = this.minRange; + this.minRange = ''; + } + } + if (this.silent) return; + this.date = val; + }, + + get focused() { + return this._focused; + }, + + get parsedDate() { + return datepicker.getParsedDate(this.date); + }, + + set date (val) { + if (!(val instanceof Date)) return; + + this.currentDate = val; + + if (this.inited && !this.silent) { + this.views[this.view]._render(); + this.nav._render(); + if (this.visible && this.elIsInput) { + this.setPosition(); + } + } + return val; + }, + + get date () { + return this.currentDate + }, + + set view (val) { + this.viewIndex = this.viewIndexes.indexOf(val); + + if (this.viewIndex < 0) { + return; + } + + this.prevView = this.currentView; + this.currentView = val; + + if (this.inited) { + if (!this.views[val]) { + this.views[val] = new $.fn.datepicker.Body(this, val, this.opts) + } else { + this.views[val]._render(); + } + + this.views[this.prevView].hide(); + this.views[val].show(); + this.nav._render(); + + if (this.opts.onChangeView) { + this.opts.onChangeView(val) + } + if (this.elIsInput && this.visible) this.setPosition(); + } + + return val + }, + + get view() { + return this.currentView; + }, + + get cellType() { + return this.view.substring(0, this.view.length - 1) + }, + + get minTime() { + var min = datepicker.getParsedDate(this.minDate); + return new Date(min.year, min.month, min.date).getTime() + }, + + get maxTime() { + var max = datepicker.getParsedDate(this.maxDate); + return new Date(max.year, max.month, max.date).getTime() + }, + + get curDecade() { + return datepicker.getDecade(this.date) + } + }; + + // Utils + // ------------------------------------------------- + + datepicker.getDaysCount = function (date) { + return new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate(); + }; + + datepicker.getParsedDate = function (date) { + return { + year: date.getFullYear(), + month: date.getMonth(), + fullMonth: (date.getMonth() + 1) < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1, // One based + date: date.getDate(), + fullDate: date.getDate() < 10 ? '0' + date.getDate() : date.getDate(), + day: date.getDay(), + hours: date.getHours(), + fullHours: date.getHours() < 10 ? '0' + date.getHours() : date.getHours() , + minutes: date.getMinutes(), + fullMinutes: date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes() + } + }; + + datepicker.getDecade = function (date) { + var firstYear = Math.floor(date.getFullYear() / 10) * 10; + + return [firstYear, firstYear + 9]; + }; + + datepicker.template = function (str, data) { + return str.replace(/#\{([\w]+)\}/g, function (source, match) { + if (data[match] || data[match] === 0) { + return data[match] + } + }); + }; + + datepicker.isSame = function (date1, date2, type) { + if (!date1 || !date2) return false; + var d1 = datepicker.getParsedDate(date1), + d2 = datepicker.getParsedDate(date2), + _type = type ? type : 'day', + + conditions = { + day: d1.date == d2.date && d1.month == d2.month && d1.year == d2.year, + month: d1.month == d2.month && d1.year == d2.year, + year: d1.year == d2.year + }; + + return conditions[_type]; + }; + + datepicker.less = function (dateCompareTo, date, type) { + if (!dateCompareTo || !date) return false; + return date.getTime() < dateCompareTo.getTime(); + }; + + datepicker.bigger = function (dateCompareTo, date, type) { + if (!dateCompareTo || !date) return false; + return date.getTime() > dateCompareTo.getTime(); + }; + + datepicker.getLeadingZeroNum = function (num) { + return parseInt(num) < 10 ? '0' + num : num; + }; + + /** + * Returns copy of date with hours and minutes equals to 0 + * @param date {Date} + */ + datepicker.resetTime = function (date) { + if (typeof date != 'object') return; + date = datepicker.getParsedDate(date); + return new Date(date.year, date.month, date.date) + }; + + $.fn.datepicker = function ( options ) { + return this.each(function () { + if (!$.data(this, pluginName)) { + $.data(this, pluginName, + new Datepicker( this, options )); + } else { + var _this = $.data(this, pluginName); + + _this.opts = $.extend(true, _this.opts, options); + _this.update(); + } + }); + }; + + $.fn.datepicker.Constructor = Datepicker; + + $.fn.datepicker.language = { + ru: { + days: ['Воскресенье', 'Понедельник', 'Вторник', 'Среда', 'Четверг', 'Пятница', 'Суббота'], + daysShort: ['Вос','Пон','Вто','Сре','Чет','Пят','Суб'], + daysMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'], + months: ['Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'], + monthsShort: ['Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн', 'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'], + today: 'Сегодня', + clear: 'Очистить', + dateFormat: 'dd.mm.yyyy', + timeFormat: 'hh:ii', + firstDay: 1 + } + }; + + $(function () { + $(autoInitSelector).datepicker(); + }) + +})(); + +;(function () { + var templates = { + days:'' + + '
    ' + + '
    ' + + '
    ' + + '
    ', + months: '' + + '
    ' + + '
    ' + + '
    ', + years: '' + + '
    ' + + '
    ' + + '
    ' + }, + datepicker = $.fn.datepicker, + dp = datepicker.Constructor; + + datepicker.Body = function (d, type, opts) { + this.d = d; + this.type = type; + this.opts = opts; + this.$el = $(''); + + if (this.opts.onlyTimepicker) return; + this.init(); + }; + + datepicker.Body.prototype = { + init: function () { + this._buildBaseHtml(); + this._render(); + + this._bindEvents(); + }, + + _bindEvents: function () { + this.$el.on('click', '.datepicker--cell', $.proxy(this._onClickCell, this)); + }, + + _buildBaseHtml: function () { + this.$el = $(templates[this.type]).appendTo(this.d.$content); + this.$names = $('.datepicker--days-names', this.$el); + this.$cells = $('.datepicker--cells', this.$el); + }, + + _getDayNamesHtml: function (firstDay, curDay, html, i) { + curDay = curDay != undefined ? curDay : firstDay; + html = html ? html : ''; + i = i != undefined ? i : 0; + + if (i > 7) return html; + if (curDay == 7) return this._getDayNamesHtml(firstDay, 0, html, ++i); + + html += '
    ' + this.d.loc.daysMin[curDay] + '
    '; + + return this._getDayNamesHtml(firstDay, ++curDay, html, ++i); + }, + + _getCellContents: function (date, type) { + var classes = "datepicker--cell datepicker--cell-" + type, + currentDate = new Date(), + parent = this.d, + minRange = dp.resetTime(parent.minRange), + maxRange = dp.resetTime(parent.maxRange), + opts = parent.opts, + d = dp.getParsedDate(date), + render = {}, + html = d.date; + + switch (type) { + case 'day': + if (parent.isWeekend(d.day)) classes += " -weekend-"; + if (d.month != this.d.parsedDate.month) { + classes += " -other-month-"; + if (!opts.selectOtherMonths) { + classes += " -disabled-"; + } + if (!opts.showOtherMonths) html = ''; + } + break; + case 'month': + html = parent.loc[parent.opts.monthsField][d.month]; + break; + case 'year': + var decade = parent.curDecade; + html = d.year; + if (d.year < decade[0] || d.year > decade[1]) { + classes += ' -other-decade-'; + if (!opts.selectOtherYears) { + classes += " -disabled-"; + } + if (!opts.showOtherYears) html = ''; + } + break; + } + + if (opts.onRenderCell) { + render = opts.onRenderCell(date, type) || {}; + html = render.html ? render.html : html; + classes += render.classes ? ' ' + render.classes : ''; + } + + if (opts.range) { + if (dp.isSame(minRange, date, type)) classes += ' -range-from-'; + if (dp.isSame(maxRange, date, type)) classes += ' -range-to-'; + + if (parent.selectedDates.length == 1 && parent.focused) { + if ( + (dp.bigger(minRange, date) && dp.less(parent.focused, date)) || + (dp.less(maxRange, date) && dp.bigger(parent.focused, date))) + { + classes += ' -in-range-' + } + + if (dp.less(maxRange, date) && dp.isSame(parent.focused, date)) { + classes += ' -range-from-' + } + if (dp.bigger(minRange, date) && dp.isSame(parent.focused, date)) { + classes += ' -range-to-' + } + + } else if (parent.selectedDates.length == 2) { + if (dp.bigger(minRange, date) && dp.less(maxRange, date)) { + classes += ' -in-range-' + } + } + } + + + if (dp.isSame(currentDate, date, type)) classes += ' -current-'; + if (parent.focused && dp.isSame(date, parent.focused, type)) classes += ' -focus-'; + if (parent._isSelected(date, type)) classes += ' -selected-'; + if (!parent._isInRange(date, type) || render.disabled) classes += ' -disabled-'; + + return { + html: html, + classes: classes + } + }, + + /** + * Calculates days number to render. Generates days html and returns it. + * @param {object} date - Date object + * @returns {string} + * @private + */ + _getDaysHtml: function (date) { + var totalMonthDays = dp.getDaysCount(date), + firstMonthDay = new Date(date.getFullYear(), date.getMonth(), 1).getDay(), + lastMonthDay = new Date(date.getFullYear(), date.getMonth(), totalMonthDays).getDay(), + daysFromPevMonth = firstMonthDay - this.d.loc.firstDay, + daysFromNextMonth = 6 - lastMonthDay + this.d.loc.firstDay; + + daysFromPevMonth = daysFromPevMonth < 0 ? daysFromPevMonth + 7 : daysFromPevMonth; + daysFromNextMonth = daysFromNextMonth > 6 ? daysFromNextMonth - 7 : daysFromNextMonth; + + var startDayIndex = -daysFromPevMonth + 1, + m, y, + html = ''; + + for (var i = startDayIndex, max = totalMonthDays + daysFromNextMonth; i <= max; i++) { + y = date.getFullYear(); + m = date.getMonth(); + + html += this._getDayHtml(new Date(y, m, i)) + } + + return html; + }, + + _getDayHtml: function (date) { + var content = this._getCellContents(date, 'day'); + + return '
    ' + content.html + '
    '; + }, + + /** + * Generates months html + * @param {object} date - date instance + * @returns {string} + * @private + */ + _getMonthsHtml: function (date) { + var html = '', + d = dp.getParsedDate(date), + i = 0; + + while(i < 12) { + html += this._getMonthHtml(new Date(d.year, i)); + i++ + } + + return html; + }, + + _getMonthHtml: function (date) { + var content = this._getCellContents(date, 'month'); + + return '
    ' + content.html + '
    ' + }, + + _getYearsHtml: function (date) { + var d = dp.getParsedDate(date), + decade = dp.getDecade(date), + firstYear = decade[0] - 1, + html = '', + i = firstYear; + + for (i; i <= decade[1] + 1; i++) { + html += this._getYearHtml(new Date(i , 0)); + } + + return html; + }, + + _getYearHtml: function (date) { + var content = this._getCellContents(date, 'year'); + + return '
    ' + content.html + '
    ' + }, + + _renderTypes: { + days: function () { + var dayNames = this._getDayNamesHtml(this.d.loc.firstDay), + days = this._getDaysHtml(this.d.currentDate); + + this.$cells.html(days); + this.$names.html(dayNames) + }, + months: function () { + var html = this._getMonthsHtml(this.d.currentDate); + + this.$cells.html(html) + }, + years: function () { + var html = this._getYearsHtml(this.d.currentDate); + + this.$cells.html(html) + } + }, + + _render: function () { + if (this.opts.onlyTimepicker) return; + this._renderTypes[this.type].bind(this)(); + }, + + _update: function () { + var $cells = $('.datepicker--cell', this.$cells), + _this = this, + classes, + $cell, + date; + $cells.each(function (cell, i) { + $cell = $(this); + date = _this.d._getDateFromCell($(this)); + classes = _this._getCellContents(date, _this.d.cellType); + $cell.attr('class',classes.classes) + }); + }, + + show: function () { + if (this.opts.onlyTimepicker) return; + this.$el.addClass('active'); + this.acitve = true; + }, + + hide: function () { + this.$el.removeClass('active'); + this.active = false; + }, + + // Events + // ------------------------------------------------- + + _handleClick: function (el) { + var date = el.data('date') || 1, + month = el.data('month') || 0, + year = el.data('year') || this.d.parsedDate.year, + dp = this.d; + // Change view if min view does not reach yet + if (dp.view != this.opts.minView) { + dp.down(new Date(year, month, date)); + return; + } + // Select date if min view is reached + var selectedDate = new Date(year, month, date), + alreadySelected = this.d._isSelected(selectedDate, this.d.cellType); + + if (!alreadySelected) { + dp._trigger('clickCell', selectedDate); + return; + } + + dp._handleAlreadySelectedDates.bind(dp, alreadySelected, selectedDate)(); + + }, + + _onClickCell: function (e) { + var $el = $(e.target).closest('.datepicker--cell'); + + if ($el.hasClass('-disabled-')) return; + + this._handleClick.bind(this)($el); + } + }; +})(); + +;(function () { + var template = '' + + '
    #{prevHtml}
    ' + + '
    #{title}
    ' + + '
    #{nextHtml}
    ', + buttonsContainerTemplate = '
    ', + button = '#{label}', + datepicker = $.fn.datepicker, + dp = datepicker.Constructor; + + datepicker.Navigation = function (d, opts) { + this.d = d; + this.opts = opts; + + this.$buttonsContainer = ''; + + this.init(); + }; + + datepicker.Navigation.prototype = { + init: function () { + this._buildBaseHtml(); + this._bindEvents(); + }, + + _bindEvents: function () { + this.d.$nav.on('click', '.datepicker--nav-action', $.proxy(this._onClickNavButton, this)); + this.d.$nav.on('click', '.datepicker--nav-title', $.proxy(this._onClickNavTitle, this)); + this.d.$datepicker.on('click', '.datepicker--button', $.proxy(this._onClickNavButton, this)); + }, + + _buildBaseHtml: function () { + if (!this.opts.onlyTimepicker) { + this._render(); + } + this._addButtonsIfNeed(); + }, + + _addButtonsIfNeed: function () { + if (this.opts.todayButton) { + this._addButton('today') + } + if (this.opts.clearButton) { + this._addButton('clear') + } + }, + + _render: function () { + var title = this._getTitle(this.d.currentDate), + html = dp.template(template, $.extend({title: title}, this.opts)); + this.d.$nav.html(html); + if (this.d.view == 'years') { + $('.datepicker--nav-title', this.d.$nav).addClass('-disabled-'); + } + this.setNavStatus(); + }, + + _getTitle: function (date) { + return this.d.formatDate(this.opts.navTitles[this.d.view], date) + }, + + _addButton: function (type) { + if (!this.$buttonsContainer.length) { + this._addButtonsContainer(); + } + + var data = { + action: type, + label: this.d.loc[type] + }, + html = dp.template(button, data); + + if ($('[data-action=' + type + ']', this.$buttonsContainer).length) return; + this.$buttonsContainer.append(html); + }, + + _addButtonsContainer: function () { + this.d.$datepicker.append(buttonsContainerTemplate); + this.$buttonsContainer = $('.datepicker--buttons', this.d.$datepicker); + }, + + setNavStatus: function () { + if (!(this.opts.minDate || this.opts.maxDate) || !this.opts.disableNavWhenOutOfRange) return; + + var date = this.d.parsedDate, + m = date.month, + y = date.year, + d = date.date; + + switch (this.d.view) { + case 'days': + if (!this.d._isInRange(new Date(y, m-1, 1), 'month')) { + this._disableNav('prev') + } + if (!this.d._isInRange(new Date(y, m+1, 1), 'month')) { + this._disableNav('next') + } + break; + case 'months': + if (!this.d._isInRange(new Date(y-1, m, d), 'year')) { + this._disableNav('prev') + } + if (!this.d._isInRange(new Date(y+1, m, d), 'year')) { + this._disableNav('next') + } + break; + case 'years': + var decade = dp.getDecade(this.d.date); + if (!this.d._isInRange(new Date(decade[0] - 1, 0, 1), 'year')) { + this._disableNav('prev') + } + if (!this.d._isInRange(new Date(decade[1] + 1, 0, 1), 'year')) { + this._disableNav('next') + } + break; + } + }, + + _disableNav: function (nav) { + $('[data-action="' + nav + '"]', this.d.$nav).addClass('-disabled-') + }, + + _activateNav: function (nav) { + $('[data-action="' + nav + '"]', this.d.$nav).removeClass('-disabled-') + }, + + _onClickNavButton: function (e) { + var $el = $(e.target).closest('[data-action]'), + action = $el.data('action'); + + this.d[action](); + }, + + _onClickNavTitle: function (e) { + if ($(e.target).hasClass('-disabled-')) return; + + if (this.d.view == 'days') { + return this.d.view = 'months' + } + + this.d.view = 'years'; + } + } + +})(); + +;(function () { + var template = '
    ' + + '
    ' + + ' #{hourVisible}' + + ' :' + + ' #{minValue}' + + '
    ' + + '
    ' + + '
    ' + + ' ' + + '
    ' + + '
    ' + + ' ' + + '
    ' + + '
    ' + + '
    ', + datepicker = $.fn.datepicker, + dp = datepicker.Constructor; + + datepicker.Timepicker = function (inst, opts) { + this.d = inst; + this.opts = opts; + + this.init(); + }; + + datepicker.Timepicker.prototype = { + init: function () { + var input = 'input'; + this._setTime(this.d.date); + this._buildHTML(); + + if (navigator.userAgent.match(/trident/gi)) { + input = 'change'; + } + + this.d.$el.on('selectDate', this._onSelectDate.bind(this)); + this.$ranges.on(input, this._onChangeRange.bind(this)); + this.$ranges.on('mouseup', this._onMouseUpRange.bind(this)); + this.$ranges.on('mousemove focus ', this._onMouseEnterRange.bind(this)); + this.$ranges.on('mouseout blur', this._onMouseOutRange.bind(this)); + }, + + _setTime: function (date) { + var _date = dp.getParsedDate(date); + + this._handleDate(date); + this.hours = _date.hours < this.minHours ? this.minHours : _date.hours; + this.minutes = _date.minutes < this.minMinutes ? this.minMinutes : _date.minutes; + }, + + /** + * Sets minHours and minMinutes from date (usually it's a minDate) + * Also changes minMinutes if current hours are bigger then @date hours + * @param date {Date} + * @private + */ + _setMinTimeFromDate: function (date) { + this.minHours = date.getHours(); + this.minMinutes = date.getMinutes(); + + // If, for example, min hours are 10, and current hours are 12, + // update minMinutes to default value, to be able to choose whole range of values + if (this.d.lastSelectedDate) { + if (this.d.lastSelectedDate.getHours() > date.getHours()) { + this.minMinutes = this.opts.minMinutes; + } + } + }, + + _setMaxTimeFromDate: function (date) { + this.maxHours = date.getHours(); + this.maxMinutes = date.getMinutes(); + + if (this.d.lastSelectedDate) { + if (this.d.lastSelectedDate.getHours() < date.getHours()) { + this.maxMinutes = this.opts.maxMinutes; + } + } + }, + + _setDefaultMinMaxTime: function () { + var maxHours = 23, + maxMinutes = 59, + opts = this.opts; + + this.minHours = opts.minHours < 0 || opts.minHours > maxHours ? 0 : opts.minHours; + this.minMinutes = opts.minMinutes < 0 || opts.minMinutes > maxMinutes ? 0 : opts.minMinutes; + this.maxHours = opts.maxHours < 0 || opts.maxHours > maxHours ? maxHours : opts.maxHours; + this.maxMinutes = opts.maxMinutes < 0 || opts.maxMinutes > maxMinutes ? maxMinutes : opts.maxMinutes; + }, + + /** + * Looks for min/max hours/minutes and if current values + * are out of range sets valid values. + * @private + */ + _validateHoursMinutes: function (date) { + if (this.hours < this.minHours) { + this.hours = this.minHours; + } else if (this.hours > this.maxHours) { + this.hours = this.maxHours; + } + + if (this.minutes < this.minMinutes) { + this.minutes = this.minMinutes; + } else if (this.minutes > this.maxMinutes) { + this.minutes = this.maxMinutes; + } + }, + + _buildHTML: function () { + var lz = dp.getLeadingZeroNum, + data = { + hourMin: this.minHours, + hourMax: lz(this.maxHours), + hourStep: this.opts.hoursStep, + hourValue: this.hours, + hourVisible: lz(this.displayHours), + minMin: this.minMinutes, + minMax: lz(this.maxMinutes), + minStep: this.opts.minutesStep, + minValue: lz(this.minutes) + }, + _template = dp.template(template, data); + + this.$timepicker = $(_template).appendTo(this.d.$datepicker); + this.$ranges = $('[type="range"]', this.$timepicker); + this.$hours = $('[name="hours"]', this.$timepicker); + this.$minutes = $('[name="minutes"]', this.$timepicker); + this.$hoursText = $('.datepicker--time-current-hours', this.$timepicker); + this.$minutesText = $('.datepicker--time-current-minutes', this.$timepicker); + + if (this.d.ampm) { + this.$ampm = $('') + .appendTo($('.datepicker--time-current', this.$timepicker)) + .html(this.dayPeriod); + + this.$timepicker.addClass('-am-pm-'); + } + }, + + _updateCurrentTime: function () { + var h = dp.getLeadingZeroNum(this.displayHours), + m = dp.getLeadingZeroNum(this.minutes); + + this.$hoursText.html(h); + this.$minutesText.html(m); + + if (this.d.ampm) { + this.$ampm.html(this.dayPeriod); + } + }, + + _updateRanges: function () { + this.$hours.attr({ + min: this.minHours, + max: this.maxHours + }).val(this.hours); + + this.$minutes.attr({ + min: this.minMinutes, + max: this.maxMinutes + }).val(this.minutes) + }, + + /** + * Sets minHours, minMinutes etc. from date. If date is not passed, than sets + * values from options + * @param [date] {object} - Date object, to get values from + * @private + */ + _handleDate: function (date) { + this._setDefaultMinMaxTime(); + if (date) { + if (dp.isSame(date, this.d.opts.minDate)) { + this._setMinTimeFromDate(this.d.opts.minDate); + } else if (dp.isSame(date, this.d.opts.maxDate)) { + this._setMaxTimeFromDate(this.d.opts.maxDate); + } + } + + this._validateHoursMinutes(date); + }, + + update: function () { + this._updateRanges(); + this._updateCurrentTime(); + }, + + /** + * Calculates valid hour value to display in text input and datepicker's body. + * @param date {Date|Number} - date or hours + * @param [ampm] {Boolean} - 12 hours mode + * @returns {{hours: *, dayPeriod: string}} + * @private + */ + _getValidHoursFromDate: function (date, ampm) { + var d = date, + hours = date; + + if (date instanceof Date) { + d = dp.getParsedDate(date); + hours = d.hours; + } + + var _ampm = ampm || this.d.ampm, + dayPeriod = 'am'; + + if (_ampm) { + switch(true) { + case hours == 0: + hours = 12; + break; + case hours == 12: + dayPeriod = 'pm'; + break; + case hours > 11: + hours = hours - 12; + dayPeriod = 'pm'; + break; + default: + break; + } + } + + return { + hours: hours, + dayPeriod: dayPeriod + } + }, + + set hours (val) { + this._hours = val; + + var displayHours = this._getValidHoursFromDate(val); + + this.displayHours = displayHours.hours; + this.dayPeriod = displayHours.dayPeriod; + }, + + get hours() { + return this._hours; + }, + + // Events + // ------------------------------------------------- + + _onChangeRange: function (e) { + var $target = $(e.target), + name = $target.attr('name'); + + this.d.timepickerIsActive = true; + + this[name] = $target.val(); + this._updateCurrentTime(); + this.d._trigger('timeChange', [this.hours, this.minutes]); + + this._handleDate(this.d.lastSelectedDate); + this.update() + }, + + _onSelectDate: function (e, data) { + this._handleDate(data); + this.update(); + }, + + _onMouseEnterRange: function (e) { + var name = $(e.target).attr('name'); + $('.datepicker--time-current-' + name, this.$timepicker).addClass('-focus-'); + }, + + _onMouseOutRange: function (e) { + var name = $(e.target).attr('name'); + if (this.d.inFocus) return; // Prevent removing focus when mouse out of range slider + $('.datepicker--time-current-' + name, this.$timepicker).removeClass('-focus-'); + }, + + _onMouseUpRange: function (e) { + this.d.timepickerIsActive = false; + } + }; +})(); + })(window, jQuery); \ No newline at end of file diff --git a/libraries/datepicker/js/datepicker.min.js b/libraries/datepicker/js/datepicker.min.js new file mode 100644 index 0000000..31537f1 --- /dev/null +++ b/libraries/datepicker/js/datepicker.min.js @@ -0,0 +1,2 @@ +!function(t,e,i){!function(){var s,a,n,h="2.2.3",o="datepicker",r=".datepicker-here",c=!1,d='
    ',l={classes:"",inline:!1,language:"ru",startDate:new Date,firstDay:"",weekends:[6,0],dateFormat:"",altField:"",altFieldDateFormat:"@",toggleSelected:!0,keyboardNav:!0,position:"bottom left",offset:12,view:"days",minView:"days",showOtherMonths:!0,selectOtherMonths:!0,moveToOtherMonthsOnSelect:!0,showOtherYears:!0,selectOtherYears:!0,moveToOtherYearsOnSelect:!0,minDate:"",maxDate:"",disableNavWhenOutOfRange:!0,multipleDates:!1,multipleDatesSeparator:",",range:!1,todayButton:!1,clearButton:!1,showEvent:"focus",autoClose:!1,monthsField:"monthsShort",prevHtml:'',nextHtml:'',navTitles:{days:"MM, yyyy",months:"yyyy",years:"yyyy1 - yyyy2"},timepicker:!1,onlyTimepicker:!1,dateTimeSeparator:" ",timeFormat:"",minHours:0,maxHours:24,minMinutes:0,maxMinutes:59,hoursStep:1,minutesStep:1,onSelect:"",onShow:"",onHide:"",onChangeMonth:"",onChangeYear:"",onChangeDecade:"",onChangeView:"",onRenderCell:""},u={ctrlRight:[17,39],ctrlUp:[17,38],ctrlLeft:[17,37],ctrlDown:[17,40],shiftRight:[16,39],shiftUp:[16,38],shiftLeft:[16,37],shiftDown:[16,40],altUp:[18,38],altRight:[18,39],altLeft:[18,37],altDown:[18,40],ctrlShiftUp:[16,17,38]},m=function(t,a){this.el=t,this.$el=e(t),this.opts=e.extend(!0,{},l,a,this.$el.data()),s==i&&(s=e("body")),this.opts.startDate||(this.opts.startDate=new Date),"INPUT"==this.el.nodeName&&(this.elIsInput=!0),this.opts.altField&&(this.$altField="string"==typeof this.opts.altField?e(this.opts.altField):this.opts.altField),this.inited=!1,this.visible=!1,this.silent=!1,this.currentDate=this.opts.startDate,this.currentView=this.opts.view,this._createShortCuts(),this.selectedDates=[],this.views={},this.keys=[],this.minRange="",this.maxRange="",this._prevOnSelectValue="",this.init()};n=m,n.prototype={VERSION:h,viewIndexes:["days","months","years"],init:function(){c||this.opts.inline||!this.elIsInput||this._buildDatepickersContainer(),this._buildBaseHtml(),this._defineLocale(this.opts.language),this._syncWithMinMaxDates(),this.elIsInput&&(this.opts.inline||(this._setPositionClasses(this.opts.position),this._bindEvents()),this.opts.keyboardNav&&!this.opts.onlyTimepicker&&this._bindKeyboardEvents(),this.$datepicker.on("mousedown",this._onMouseDownDatepicker.bind(this)),this.$datepicker.on("mouseup",this._onMouseUpDatepicker.bind(this))),this.opts.classes&&this.$datepicker.addClass(this.opts.classes),this.opts.timepicker&&(this.timepicker=new e.fn.datepicker.Timepicker(this,this.opts),this._bindTimepickerEvents()),this.opts.onlyTimepicker&&this.$datepicker.addClass("-only-timepicker-"),this.views[this.currentView]=new e.fn.datepicker.Body(this,this.currentView,this.opts),this.views[this.currentView].show(),this.nav=new e.fn.datepicker.Navigation(this,this.opts),this.view=this.currentView,this.$el.on("clickCell.adp",this._onClickCell.bind(this)),this.$datepicker.on("mouseenter",".datepicker--cell",this._onMouseEnterCell.bind(this)),this.$datepicker.on("mouseleave",".datepicker--cell",this._onMouseLeaveCell.bind(this)),this.inited=!0},_createShortCuts:function(){this.minDate=this.opts.minDate?this.opts.minDate:new Date(-86399999136e5),this.maxDate=this.opts.maxDate?this.opts.maxDate:new Date(86399999136e5)},_bindEvents:function(){this.$el.on(this.opts.showEvent+".adp",this._onShowEvent.bind(this)),this.$el.on("mouseup.adp",this._onMouseUpEl.bind(this)),this.$el.on("blur.adp",this._onBlur.bind(this)),this.$el.on("keyup.adp",this._onKeyUpGeneral.bind(this)),e(t).on("resize.adp",this._onResize.bind(this)),e("body").on("mouseup.adp",this._onMouseUpBody.bind(this))},_bindKeyboardEvents:function(){this.$el.on("keydown.adp",this._onKeyDown.bind(this)),this.$el.on("keyup.adp",this._onKeyUp.bind(this)),this.$el.on("hotKey.adp",this._onHotKey.bind(this))},_bindTimepickerEvents:function(){this.$el.on("timeChange.adp",this._onTimeChange.bind(this))},isWeekend:function(t){return-1!==this.opts.weekends.indexOf(t)},_defineLocale:function(t){"string"==typeof t?(this.loc=e.fn.datepicker.language[t],this.loc||(console.warn("Can't find language \""+t+'" in Datepicker.language, will use "ru" instead'),this.loc=e.extend(!0,{},e.fn.datepicker.language.ru)),this.loc=e.extend(!0,{},e.fn.datepicker.language.ru,e.fn.datepicker.language[t])):this.loc=e.extend(!0,{},e.fn.datepicker.language.ru,t),this.opts.dateFormat&&(this.loc.dateFormat=this.opts.dateFormat),this.opts.timeFormat&&(this.loc.timeFormat=this.opts.timeFormat),""!==this.opts.firstDay&&(this.loc.firstDay=this.opts.firstDay),this.opts.timepicker&&(this.loc.dateFormat=[this.loc.dateFormat,this.loc.timeFormat].join(this.opts.dateTimeSeparator)),this.opts.onlyTimepicker&&(this.loc.dateFormat=this.loc.timeFormat);var i=this._getWordBoundaryRegExp;(this.loc.timeFormat.match(i("aa"))||this.loc.timeFormat.match(i("AA")))&&(this.ampm=!0)},_buildDatepickersContainer:function(){c=!0,s.append('
    '),a=e("#datepickers-container")},_buildBaseHtml:function(){var t,i=e('
    ');t="INPUT"==this.el.nodeName?this.opts.inline?i.insertAfter(this.$el):a:i.appendTo(this.$el),this.$datepicker=e(d).appendTo(t),this.$content=e(".datepicker--content",this.$datepicker),this.$nav=e(".datepicker--nav",this.$datepicker)},_triggerOnChange:function(){if(!this.selectedDates.length){if(""===this._prevOnSelectValue)return;return this._prevOnSelectValue="",this.opts.onSelect("","",this)}var t,e=this.selectedDates,i=n.getParsedDate(e[0]),s=this,a=new Date(i.year,i.month,i.date,i.hours,i.minutes);t=e.map(function(t){return s.formatDate(s.loc.dateFormat,t)}).join(this.opts.multipleDatesSeparator),(this.opts.multipleDates||this.opts.range)&&(a=e.map(function(t){var e=n.getParsedDate(t);return new Date(e.year,e.month,e.date,e.hours,e.minutes)})),this._prevOnSelectValue=t,this.opts.onSelect(t,a,this)},next:function(){var t=this.parsedDate,e=this.opts;switch(this.view){case"days":this.date=new Date(t.year,t.month+1,1),e.onChangeMonth&&e.onChangeMonth(this.parsedDate.month,this.parsedDate.year);break;case"months":this.date=new Date(t.year+1,t.month,1),e.onChangeYear&&e.onChangeYear(this.parsedDate.year);break;case"years":this.date=new Date(t.year+10,0,1),e.onChangeDecade&&e.onChangeDecade(this.curDecade)}},prev:function(){var t=this.parsedDate,e=this.opts;switch(this.view){case"days":this.date=new Date(t.year,t.month-1,1),e.onChangeMonth&&e.onChangeMonth(this.parsedDate.month,this.parsedDate.year);break;case"months":this.date=new Date(t.year-1,t.month,1),e.onChangeYear&&e.onChangeYear(this.parsedDate.year);break;case"years":this.date=new Date(t.year-10,0,1),e.onChangeDecade&&e.onChangeDecade(this.curDecade)}},formatDate:function(t,e){e=e||this.date;var i,s=t,a=this._getWordBoundaryRegExp,h=this.loc,o=n.getLeadingZeroNum,r=n.getDecade(e),c=n.getParsedDate(e),d=c.fullHours,l=c.hours,u=t.match(a("aa"))||t.match(a("AA")),m="am",p=this._replacer;switch(this.opts.timepicker&&this.timepicker&&u&&(i=this.timepicker._getValidHoursFromDate(e,u),d=o(i.hours),l=i.hours,m=i.dayPeriod),!0){case/@/.test(s):s=s.replace(/@/,e.getTime());case/aa/.test(s):s=p(s,a("aa"),m);case/AA/.test(s):s=p(s,a("AA"),m.toUpperCase());case/dd/.test(s):s=p(s,a("dd"),c.fullDate);case/d/.test(s):s=p(s,a("d"),c.date);case/DD/.test(s):s=p(s,a("DD"),h.days[c.day]);case/D/.test(s):s=p(s,a("D"),h.daysShort[c.day]);case/mm/.test(s):s=p(s,a("mm"),c.fullMonth);case/m/.test(s):s=p(s,a("m"),c.month+1);case/MM/.test(s):s=p(s,a("MM"),this.loc.months[c.month]);case/M/.test(s):s=p(s,a("M"),h.monthsShort[c.month]);case/ii/.test(s):s=p(s,a("ii"),c.fullMinutes);case/i/.test(s):s=p(s,a("i"),c.minutes);case/hh/.test(s):s=p(s,a("hh"),d);case/h/.test(s):s=p(s,a("h"),l);case/yyyy/.test(s):s=p(s,a("yyyy"),c.year);case/yyyy1/.test(s):s=p(s,a("yyyy1"),r[0]);case/yyyy2/.test(s):s=p(s,a("yyyy2"),r[1]);case/yy/.test(s):s=p(s,a("yy"),c.year.toString().slice(-2))}return s},_replacer:function(t,e,i){return t.replace(e,function(t,e,s,a){return e+i+a})},_getWordBoundaryRegExp:function(t){var e="\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;";return new RegExp("(^|>|"+e+")("+t+")($|<|"+e+")","g")},selectDate:function(t){var e=this,i=e.opts,s=e.parsedDate,a=e.selectedDates,h=a.length,o="";if(Array.isArray(t))return void t.forEach(function(t){e.selectDate(t)});if(t instanceof Date){if(this.lastSelectedDate=t,this.timepicker&&this.timepicker._setTime(t),e._trigger("selectDate",t),this.timepicker&&(t.setHours(this.timepicker.hours),t.setMinutes(this.timepicker.minutes)),"days"==e.view&&t.getMonth()!=s.month&&i.moveToOtherMonthsOnSelect&&(o=new Date(t.getFullYear(),t.getMonth(),1)),"years"==e.view&&t.getFullYear()!=s.year&&i.moveToOtherYearsOnSelect&&(o=new Date(t.getFullYear(),0,1)),o&&(e.silent=!0,e.date=o,e.silent=!1,e.nav._render()),i.multipleDates&&!i.range){if(h===i.multipleDates)return;e._isSelected(t)||e.selectedDates.push(t)}else i.range?2==h?(e.selectedDates=[t],e.minRange=t,e.maxRange=""):1==h?(e.selectedDates.push(t),e.maxRange?e.minRange=t:e.maxRange=t,n.bigger(e.maxRange,e.minRange)&&(e.maxRange=e.minRange,e.minRange=t),e.selectedDates=[e.minRange,e.maxRange]):(e.selectedDates=[t],e.minRange=t):e.selectedDates=[t];e._setInputValue(),i.onSelect&&e._triggerOnChange(),i.autoClose&&!this.timepickerIsActive&&(i.multipleDates||i.range?i.range&&2==e.selectedDates.length&&e.hide():e.hide()),e.views[this.currentView]._render()}},removeDate:function(t){var e=this.selectedDates,i=this;if(t instanceof Date)return e.some(function(s,a){return n.isSame(s,t)?(e.splice(a,1),i.selectedDates.length?i.lastSelectedDate=i.selectedDates[i.selectedDates.length-1]:(i.minRange="",i.maxRange="",i.lastSelectedDate=""),i.views[i.currentView]._render(),i._setInputValue(),i.opts.onSelect&&i._triggerOnChange(),!0):void 0})},today:function(){this.silent=!0,this.view=this.opts.minView,this.silent=!1,this.date=new Date,this.opts.todayButton instanceof Date&&this.selectDate(this.opts.todayButton)},clear:function(){this.selectedDates=[],this.minRange="",this.maxRange="",this.views[this.currentView]._render(),this._setInputValue(),this.opts.onSelect&&this._triggerOnChange()},update:function(t,i){var s=arguments.length,a=this.lastSelectedDate;return 2==s?this.opts[t]=i:1==s&&"object"==typeof t&&(this.opts=e.extend(!0,this.opts,t)),this._createShortCuts(),this._syncWithMinMaxDates(),this._defineLocale(this.opts.language),this.nav._addButtonsIfNeed(),this.opts.onlyTimepicker||this.nav._render(),this.views[this.currentView]._render(),this.elIsInput&&!this.opts.inline&&(this._setPositionClasses(this.opts.position),this.visible&&this.setPosition(this.opts.position)),this.opts.classes&&this.$datepicker.addClass(this.opts.classes),this.opts.onlyTimepicker&&this.$datepicker.addClass("-only-timepicker-"),this.opts.timepicker&&(a&&this.timepicker._handleDate(a),this.timepicker._updateRanges(),this.timepicker._updateCurrentTime(),a&&(a.setHours(this.timepicker.hours),a.setMinutes(this.timepicker.minutes))),this._setInputValue(),this},_syncWithMinMaxDates:function(){var t=this.date.getTime();this.silent=!0,this.minTime>t&&(this.date=this.minDate),this.maxTime=this.minTime&&i<=this.maxTime,month:o>=this.minTime&&r<=this.maxTime,year:s.year>=a.year&&s.year<=h.year};return e?c[e]:c.day},_getDimensions:function(t){var e=t.offset();return{width:t.outerWidth(),height:t.outerHeight(),left:e.left,top:e.top}},_getDateFromCell:function(t){var e=this.parsedDate,s=t.data("year")||e.year,a=t.data("month")==i?e.month:t.data("month"),n=t.data("date")||1;return new Date(s,a,n)},_setPositionClasses:function(t){t=t.split(" ");var e=t[0],i=t[1],s="datepicker -"+e+"-"+i+"- -from-"+e+"-";this.visible&&(s+=" active"),this.$datepicker.removeAttr("class").addClass(s)},setPosition:function(t){t=t||this.opts.position;var e,i,s=this._getDimensions(this.$el),a=this._getDimensions(this.$datepicker),n=t.split(" "),h=this.opts.offset,o=n[0],r=n[1];switch(o){case"top":e=s.top-a.height-h;break;case"right":i=s.left+s.width+h;break;case"bottom":e=s.top+s.height+h;break;case"left":i=s.left-a.width-h}switch(r){case"top":e=s.top;break;case"right":i=s.left+s.width-a.width;break;case"bottom":e=s.top+s.height-a.height;break;case"left":i=s.left;break;case"center":/left|right/.test(o)?e=s.top+s.height/2-a.height/2:i=s.left+s.width/2-a.width/2}this.$datepicker.css({left:i,top:e})},show:function(){var t=this.opts.onShow;this.setPosition(this.opts.position),this.$datepicker.addClass("active"),this.visible=!0,t&&this._bindVisionEvents(t)},hide:function(){var t=this.opts.onHide;this.$datepicker.removeClass("active").css({left:"-100000px"}),this.focused="",this.keys=[],this.inFocus=!1,this.visible=!1,this.$el.blur(),t&&this._bindVisionEvents(t)},down:function(t){this._changeView(t,"down")},up:function(t){this._changeView(t,"up")},_bindVisionEvents:function(t){this.$datepicker.off("transitionend.dp"),t(this,!1),this.$datepicker.one("transitionend.dp",t.bind(this,this,!0))},_changeView:function(t,e){t=t||this.focused||this.date;var i="up"==e?this.viewIndex+1:this.viewIndex-1;i>2&&(i=2),0>i&&(i=0),this.silent=!0,this.date=new Date(t.getFullYear(),t.getMonth(),1),this.silent=!1,this.view=this.viewIndexes[i]},_handleHotKey:function(t){var e,i,s,a=n.getParsedDate(this._getFocusedDate()),h=this.opts,o=!1,r=!1,c=!1,d=a.year,l=a.month,u=a.date;switch(t){case"ctrlRight":case"ctrlUp":l+=1,o=!0;break;case"ctrlLeft":case"ctrlDown":l-=1,o=!0;break;case"shiftRight":case"shiftUp":r=!0,d+=1;break;case"shiftLeft":case"shiftDown":r=!0,d-=1;break;case"altRight":case"altUp":c=!0,d+=10;break;case"altLeft":case"altDown":c=!0,d-=10;break;case"ctrlShiftUp":this.up()}s=n.getDaysCount(new Date(d,l)),i=new Date(d,l,u),u>s&&(u=s),i.getTime()this.maxTime&&(i=this.maxDate),this.focused=i,e=n.getParsedDate(i),o&&h.onChangeMonth&&h.onChangeMonth(e.month,e.year),r&&h.onChangeYear&&h.onChangeYear(e.year),c&&h.onChangeDecade&&h.onChangeDecade(this.curDecade)},_registerKey:function(t){var e=this.keys.some(function(e){return e==t});e||this.keys.push(t)},_unRegisterKey:function(t){var e=this.keys.indexOf(t);this.keys.splice(e,1)},_isHotKeyPressed:function(){var t,e=!1,i=this,s=this.keys.sort();for(var a in u)t=u[a],s.length==t.length&&t.every(function(t,e){return t==s[e]})&&(i._trigger("hotKey",a),e=!0);return e},_trigger:function(t,e){this.$el.trigger(t,e)},_focusNextCell:function(t,e){e=e||this.cellType;var i=n.getParsedDate(this._getFocusedDate()),s=i.year,a=i.month,h=i.date;if(!this._isHotKeyPressed()){switch(t){case 37:"day"==e?h-=1:"","month"==e?a-=1:"","year"==e?s-=1:"";break;case 38:"day"==e?h-=7:"","month"==e?a-=3:"","year"==e?s-=4:"";break;case 39:"day"==e?h+=1:"","month"==e?a+=1:"","year"==e?s+=1:"";break;case 40:"day"==e?h+=7:"","month"==e?a+=3:"","year"==e?s+=4:""}var o=new Date(s,a,h);o.getTime()this.maxTime&&(o=this.maxDate),this.focused=o}},_getFocusedDate:function(){var t=this.focused||this.selectedDates[this.selectedDates.length-1],e=this.parsedDate;if(!t)switch(this.view){case"days":t=new Date(e.year,e.month,(new Date).getDate());break;case"months":t=new Date(e.year,e.month,1);break;case"years":t=new Date(e.year,0,1)}return t},_getCell:function(t,i){i=i||this.cellType;var s,a=n.getParsedDate(t),h='.datepicker--cell[data-year="'+a.year+'"]';switch(i){case"month":h='[data-month="'+a.month+'"]';break;case"day":h+='[data-month="'+a.month+'"][data-date="'+a.date+'"]'}return s=this.views[this.currentView].$el.find(h),s.length?s:e("")},destroy:function(){var t=this;t.$el.off(".adp").data("datepicker",""),t.selectedDates=[],t.focused="",t.views={},t.keys=[],t.minRange="",t.maxRange="",t.opts.inline||!t.elIsInput?t.$datepicker.closest(".datepicker-inline").remove():t.$datepicker.remove()},_handleAlreadySelectedDates:function(t,e){this.opts.range?this.opts.toggleSelected?this.removeDate(e):2!=this.selectedDates.length&&this._trigger("clickCell",e):this.opts.toggleSelected&&this.removeDate(e),this.opts.toggleSelected||(this.lastSelectedDate=t,this.opts.timepicker&&(this.timepicker._setTime(t),this.timepicker.update()))},_onShowEvent:function(t){this.visible||this.show()},_onBlur:function(){!this.inFocus&&this.visible&&this.hide()},_onMouseDownDatepicker:function(t){this.inFocus=!0},_onMouseUpDatepicker:function(t){this.inFocus=!1,t.originalEvent.inFocus=!0,t.originalEvent.timepickerFocus||this.$el.focus()},_onKeyUpGeneral:function(t){var e=this.$el.val();e||this.clear()},_onResize:function(){this.visible&&this.setPosition()},_onMouseUpBody:function(t){t.originalEvent.inFocus||this.visible&&!this.inFocus&&this.hide()},_onMouseUpEl:function(t){t.originalEvent.inFocus=!0,setTimeout(this._onKeyUpGeneral.bind(this),4)},_onKeyDown:function(t){var e=t.which;if(this._registerKey(e),e>=37&&40>=e&&(t.preventDefault(),this._focusNextCell(e)),13==e&&this.focused){if(this._getCell(this.focused).hasClass("-disabled-"))return;if(this.view!=this.opts.minView)this.down();else{var i=this._isSelected(this.focused,this.cellType);if(!i)return this.timepicker&&(this.focused.setHours(this.timepicker.hours),this.focused.setMinutes(this.timepicker.minutes)),void this.selectDate(this.focused);this._handleAlreadySelectedDates(i,this.focused)}}27==e&&this.hide()},_onKeyUp:function(t){var e=t.which;this._unRegisterKey(e)},_onHotKey:function(t,e){this._handleHotKey(e)},_onMouseEnterCell:function(t){var i=e(t.target).closest(".datepicker--cell"),s=this._getDateFromCell(i);this.silent=!0,this.focused&&(this.focused=""),i.addClass("-focus-"),this.focused=s,this.silent=!1,this.opts.range&&1==this.selectedDates.length&&(this.minRange=this.selectedDates[0],this.maxRange="",n.less(this.minRange,this.focused)&&(this.maxRange=this.minRange,this.minRange=""),this.views[this.currentView]._update())},_onMouseLeaveCell:function(t){var i=e(t.target).closest(".datepicker--cell");i.removeClass("-focus-"),this.silent=!0,this.focused="",this.silent=!1},_onTimeChange:function(t,e,i){var s=new Date,a=this.selectedDates,n=!1;a.length&&(n=!0,s=this.lastSelectedDate),s.setHours(e),s.setMinutes(i),n||this._getCell(s).hasClass("-disabled-")?(this._setInputValue(),this.opts.onSelect&&this._triggerOnChange()):this.selectDate(s)},_onClickCell:function(t,e){this.timepicker&&(e.setHours(this.timepicker.hours),e.setMinutes(this.timepicker.minutes)),this.selectDate(e)},set focused(t){if(!t&&this.focused){var e=this._getCell(this.focused);e.length&&e.removeClass("-focus-")}this._focused=t,this.opts.range&&1==this.selectedDates.length&&(this.minRange=this.selectedDates[0],this.maxRange="",n.less(this.minRange,this._focused)&&(this.maxRange=this.minRange,this.minRange="")),this.silent||(this.date=t)},get focused(){return this._focused},get parsedDate(){return n.getParsedDate(this.date)},set date(t){return t instanceof Date?(this.currentDate=t,this.inited&&!this.silent&&(this.views[this.view]._render(),this.nav._render(),this.visible&&this.elIsInput&&this.setPosition()),t):void 0},get date(){return this.currentDate},set view(t){return this.viewIndex=this.viewIndexes.indexOf(t),this.viewIndex<0?void 0:(this.prevView=this.currentView,this.currentView=t,this.inited&&(this.views[t]?this.views[t]._render():this.views[t]=new e.fn.datepicker.Body(this,t,this.opts),this.views[this.prevView].hide(),this.views[t].show(),this.nav._render(),this.opts.onChangeView&&this.opts.onChangeView(t),this.elIsInput&&this.visible&&this.setPosition()),t)},get view(){return this.currentView},get cellType(){return this.view.substring(0,this.view.length-1)},get minTime(){var t=n.getParsedDate(this.minDate);return new Date(t.year,t.month,t.date).getTime()},get maxTime(){var t=n.getParsedDate(this.maxDate);return new Date(t.year,t.month,t.date).getTime()},get curDecade(){return n.getDecade(this.date)}},n.getDaysCount=function(t){return new Date(t.getFullYear(),t.getMonth()+1,0).getDate()},n.getParsedDate=function(t){return{year:t.getFullYear(),month:t.getMonth(),fullMonth:t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1,date:t.getDate(),fullDate:t.getDate()<10?"0"+t.getDate():t.getDate(),day:t.getDay(),hours:t.getHours(),fullHours:t.getHours()<10?"0"+t.getHours():t.getHours(),minutes:t.getMinutes(),fullMinutes:t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes()}},n.getDecade=function(t){var e=10*Math.floor(t.getFullYear()/10);return[e,e+9]},n.template=function(t,e){return t.replace(/#\{([\w]+)\}/g,function(t,i){return e[i]||0===e[i]?e[i]:void 0})},n.isSame=function(t,e,i){if(!t||!e)return!1;var s=n.getParsedDate(t),a=n.getParsedDate(e),h=i?i:"day",o={day:s.date==a.date&&s.month==a.month&&s.year==a.year,month:s.month==a.month&&s.year==a.year,year:s.year==a.year};return o[h]},n.less=function(t,e,i){return t&&e?e.getTime()t.getTime():!1},n.getLeadingZeroNum=function(t){return parseInt(t)<10?"0"+t:t},n.resetTime=function(t){return"object"==typeof t?(t=n.getParsedDate(t),new Date(t.year,t.month,t.date)):void 0},e.fn.datepicker=function(t){return this.each(function(){if(e.data(this,o)){var i=e.data(this,o);i.opts=e.extend(!0,i.opts,t),i.update()}else e.data(this,o,new m(this,t))})},e.fn.datepicker.Constructor=m,e.fn.datepicker.language={ru:{days:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"],daysShort:["Вос","Пон","Вто","Сре","Чет","Пят","Суб"],daysMin:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthsShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],today:"Сегодня",clear:"Очистить",dateFormat:"dd.mm.yyyy",timeFormat:"hh:ii",firstDay:1}},e(function(){e(r).datepicker()})}(),function(){var t={days:'
    ',months:'
    ',years:'
    '},s=e.fn.datepicker,a=s.Constructor;s.Body=function(t,i,s){this.d=t,this.type=i,this.opts=s,this.$el=e(""),this.opts.onlyTimepicker||this.init()},s.Body.prototype={init:function(){this._buildBaseHtml(),this._render(),this._bindEvents()},_bindEvents:function(){this.$el.on("click",".datepicker--cell",e.proxy(this._onClickCell,this))},_buildBaseHtml:function(){this.$el=e(t[this.type]).appendTo(this.d.$content),this.$names=e(".datepicker--days-names",this.$el),this.$cells=e(".datepicker--cells",this.$el)},_getDayNamesHtml:function(t,e,s,a){return e=e!=i?e:t,s=s?s:"",a=a!=i?a:0,a>7?s:7==e?this._getDayNamesHtml(t,0,s,++a):(s+='
    '+this.d.loc.daysMin[e]+"
    ",this._getDayNamesHtml(t,++e,s,++a))},_getCellContents:function(t,e){var i="datepicker--cell datepicker--cell-"+e,s=new Date,n=this.d,h=a.resetTime(n.minRange),o=a.resetTime(n.maxRange),r=n.opts,c=a.getParsedDate(t),d={},l=c.date;switch(e){case"day":n.isWeekend(c.day)&&(i+=" -weekend-"),c.month!=this.d.parsedDate.month&&(i+=" -other-month-",r.selectOtherMonths||(i+=" -disabled-"),r.showOtherMonths||(l=""));break;case"month":l=n.loc[n.opts.monthsField][c.month];break;case"year":var u=n.curDecade;l=c.year,(c.yearu[1])&&(i+=" -other-decade-",r.selectOtherYears||(i+=" -disabled-"),r.showOtherYears||(l=""))}return r.onRenderCell&&(d=r.onRenderCell(t,e)||{},l=d.html?d.html:l,i+=d.classes?" "+d.classes:""),r.range&&(a.isSame(h,t,e)&&(i+=" -range-from-"),a.isSame(o,t,e)&&(i+=" -range-to-"),1==n.selectedDates.length&&n.focused?((a.bigger(h,t)&&a.less(n.focused,t)||a.less(o,t)&&a.bigger(n.focused,t))&&(i+=" -in-range-"),a.less(o,t)&&a.isSame(n.focused,t)&&(i+=" -range-from-"),a.bigger(h,t)&&a.isSame(n.focused,t)&&(i+=" -range-to-")):2==n.selectedDates.length&&a.bigger(h,t)&&a.less(o,t)&&(i+=" -in-range-")),a.isSame(s,t,e)&&(i+=" -current-"),n.focused&&a.isSame(t,n.focused,e)&&(i+=" -focus-"),n._isSelected(t,e)&&(i+=" -selected-"),(!n._isInRange(t,e)||d.disabled)&&(i+=" -disabled-"),{html:l,classes:i}},_getDaysHtml:function(t){var e=a.getDaysCount(t),i=new Date(t.getFullYear(),t.getMonth(),1).getDay(),s=new Date(t.getFullYear(),t.getMonth(),e).getDay(),n=i-this.d.loc.firstDay,h=6-s+this.d.loc.firstDay;n=0>n?n+7:n,h=h>6?h-7:h;for(var o,r,c=-n+1,d="",l=c,u=e+h;u>=l;l++)r=t.getFullYear(),o=t.getMonth(),d+=this._getDayHtml(new Date(r,o,l));return d},_getDayHtml:function(t){var e=this._getCellContents(t,"day");return'
    '+e.html+"
    "},_getMonthsHtml:function(t){for(var e="",i=a.getParsedDate(t),s=0;12>s;)e+=this._getMonthHtml(new Date(i.year,s)),s++;return e},_getMonthHtml:function(t){var e=this._getCellContents(t,"month");return'
    '+e.html+"
    "},_getYearsHtml:function(t){var e=(a.getParsedDate(t),a.getDecade(t)),i=e[0]-1,s="",n=i;for(n;n<=e[1]+1;n++)s+=this._getYearHtml(new Date(n,0));return s},_getYearHtml:function(t){var e=this._getCellContents(t,"year");return'
    '+e.html+"
    "},_renderTypes:{days:function(){var t=this._getDayNamesHtml(this.d.loc.firstDay),e=this._getDaysHtml(this.d.currentDate);this.$cells.html(e),this.$names.html(t)},months:function(){var t=this._getMonthsHtml(this.d.currentDate);this.$cells.html(t)},years:function(){var t=this._getYearsHtml(this.d.currentDate);this.$cells.html(t)}},_render:function(){this.opts.onlyTimepicker||this._renderTypes[this.type].bind(this)()},_update:function(){var t,i,s,a=e(".datepicker--cell",this.$cells),n=this;a.each(function(a,h){i=e(this),s=n.d._getDateFromCell(e(this)),t=n._getCellContents(s,n.d.cellType),i.attr("class",t.classes)})},show:function(){this.opts.onlyTimepicker||(this.$el.addClass("active"),this.acitve=!0)},hide:function(){this.$el.removeClass("active"),this.active=!1},_handleClick:function(t){var e=t.data("date")||1,i=t.data("month")||0,s=t.data("year")||this.d.parsedDate.year,a=this.d;if(a.view!=this.opts.minView)return void a.down(new Date(s,i,e));var n=new Date(s,i,e),h=this.d._isSelected(n,this.d.cellType);return h?void a._handleAlreadySelectedDates.bind(a,h,n)():void a._trigger("clickCell",n)},_onClickCell:function(t){var i=e(t.target).closest(".datepicker--cell");i.hasClass("-disabled-")||this._handleClick.bind(this)(i)}}}(),function(){var t='
    #{prevHtml}
    #{title}
    #{nextHtml}
    ',i='
    ',s='#{label}',a=e.fn.datepicker,n=a.Constructor;a.Navigation=function(t,e){this.d=t,this.opts=e,this.$buttonsContainer="",this.init()},a.Navigation.prototype={init:function(){this._buildBaseHtml(),this._bindEvents()},_bindEvents:function(){this.d.$nav.on("click",".datepicker--nav-action",e.proxy(this._onClickNavButton,this)),this.d.$nav.on("click",".datepicker--nav-title",e.proxy(this._onClickNavTitle,this)),this.d.$datepicker.on("click",".datepicker--button",e.proxy(this._onClickNavButton,this))},_buildBaseHtml:function(){this.opts.onlyTimepicker||this._render(),this._addButtonsIfNeed()},_addButtonsIfNeed:function(){this.opts.todayButton&&this._addButton("today"),this.opts.clearButton&&this._addButton("clear")},_render:function(){var i=this._getTitle(this.d.currentDate),s=n.template(t,e.extend({title:i},this.opts));this.d.$nav.html(s),"years"==this.d.view&&e(".datepicker--nav-title",this.d.$nav).addClass("-disabled-"),this.setNavStatus()},_getTitle:function(t){return this.d.formatDate(this.opts.navTitles[this.d.view],t)},_addButton:function(t){this.$buttonsContainer.length||this._addButtonsContainer();var i={action:t,label:this.d.loc[t]},a=n.template(s,i);e("[data-action="+t+"]",this.$buttonsContainer).length||this.$buttonsContainer.append(a)},_addButtonsContainer:function(){this.d.$datepicker.append(i),this.$buttonsContainer=e(".datepicker--buttons",this.d.$datepicker)},setNavStatus:function(){if((this.opts.minDate||this.opts.maxDate)&&this.opts.disableNavWhenOutOfRange){var t=this.d.parsedDate,e=t.month,i=t.year,s=t.date;switch(this.d.view){case"days":this.d._isInRange(new Date(i,e-1,1),"month")||this._disableNav("prev"),this.d._isInRange(new Date(i,e+1,1),"month")||this._disableNav("next");break;case"months":this.d._isInRange(new Date(i-1,e,s),"year")||this._disableNav("prev"),this.d._isInRange(new Date(i+1,e,s),"year")||this._disableNav("next");break;case"years":var a=n.getDecade(this.d.date);this.d._isInRange(new Date(a[0]-1,0,1),"year")||this._disableNav("prev"),this.d._isInRange(new Date(a[1]+1,0,1),"year")||this._disableNav("next")}}},_disableNav:function(t){e('[data-action="'+t+'"]',this.d.$nav).addClass("-disabled-")},_activateNav:function(t){e('[data-action="'+t+'"]',this.d.$nav).removeClass("-disabled-")},_onClickNavButton:function(t){var i=e(t.target).closest("[data-action]"),s=i.data("action");this.d[s]()},_onClickNavTitle:function(t){return e(t.target).hasClass("-disabled-")?void 0:"days"==this.d.view?this.d.view="months":void(this.d.view="years")}}}(),function(){var t='
    #{hourVisible} : #{minValue}
    ',i=e.fn.datepicker,s=i.Constructor;i.Timepicker=function(t,e){this.d=t,this.opts=e,this.init()},i.Timepicker.prototype={init:function(){var t="input";this._setTime(this.d.date),this._buildHTML(),navigator.userAgent.match(/trident/gi)&&(t="change"),this.d.$el.on("selectDate",this._onSelectDate.bind(this)),this.$ranges.on(t,this._onChangeRange.bind(this)),this.$ranges.on("mouseup",this._onMouseUpRange.bind(this)),this.$ranges.on("mousemove focus ",this._onMouseEnterRange.bind(this)),this.$ranges.on("mouseout blur",this._onMouseOutRange.bind(this))},_setTime:function(t){var e=s.getParsedDate(t);this._handleDate(t),this.hours=e.hourst.getHours()&&(this.minMinutes=this.opts.minMinutes)},_setMaxTimeFromDate:function(t){ +this.maxHours=t.getHours(),this.maxMinutes=t.getMinutes(),this.d.lastSelectedDate&&this.d.lastSelectedDate.getHours()t?0:i.minHours,this.minMinutes=i.minMinutes<0||i.minMinutes>e?0:i.minMinutes,this.maxHours=i.maxHours<0||i.maxHours>t?t:i.maxHours,this.maxMinutes=i.maxMinutes<0||i.maxMinutes>e?e:i.maxMinutes},_validateHoursMinutes:function(t){this.hoursthis.maxHours&&(this.hours=this.maxHours),this.minutesthis.maxMinutes&&(this.minutes=this.maxMinutes)},_buildHTML:function(){var i=s.getLeadingZeroNum,a={hourMin:this.minHours,hourMax:i(this.maxHours),hourStep:this.opts.hoursStep,hourValue:this.hours,hourVisible:i(this.displayHours),minMin:this.minMinutes,minMax:i(this.maxMinutes),minStep:this.opts.minutesStep,minValue:i(this.minutes)},n=s.template(t,a);this.$timepicker=e(n).appendTo(this.d.$datepicker),this.$ranges=e('[type="range"]',this.$timepicker),this.$hours=e('[name="hours"]',this.$timepicker),this.$minutes=e('[name="minutes"]',this.$timepicker),this.$hoursText=e(".datepicker--time-current-hours",this.$timepicker),this.$minutesText=e(".datepicker--time-current-minutes",this.$timepicker),this.d.ampm&&(this.$ampm=e('').appendTo(e(".datepicker--time-current",this.$timepicker)).html(this.dayPeriod),this.$timepicker.addClass("-am-pm-"))},_updateCurrentTime:function(){var t=s.getLeadingZeroNum(this.displayHours),e=s.getLeadingZeroNum(this.minutes);this.$hoursText.html(t),this.$minutesText.html(e),this.d.ampm&&this.$ampm.html(this.dayPeriod)},_updateRanges:function(){this.$hours.attr({min:this.minHours,max:this.maxHours}).val(this.hours),this.$minutes.attr({min:this.minMinutes,max:this.maxMinutes}).val(this.minutes)},_handleDate:function(t){this._setDefaultMinMaxTime(),t&&(s.isSame(t,this.d.opts.minDate)?this._setMinTimeFromDate(this.d.opts.minDate):s.isSame(t,this.d.opts.maxDate)&&this._setMaxTimeFromDate(this.d.opts.maxDate)),this._validateHoursMinutes(t)},update:function(){this._updateRanges(),this._updateCurrentTime()},_getValidHoursFromDate:function(t,e){var i=t,a=t;t instanceof Date&&(i=s.getParsedDate(t),a=i.hours);var n=e||this.d.ampm,h="am";if(n)switch(!0){case 0==a:a=12;break;case 12==a:h="pm";break;case a>11:a-=12,h="pm"}return{hours:a,dayPeriod:h}},set hours(t){this._hours=t;var e=this._getValidHoursFromDate(t);this.displayHours=e.hours,this.dayPeriod=e.dayPeriod},get hours(){return this._hours},_onChangeRange:function(t){var i=e(t.target),s=i.attr("name");this.d.timepickerIsActive=!0,this[s]=i.val(),this._updateCurrentTime(),this.d._trigger("timeChange",[this.hours,this.minutes]),this._handleDate(this.d.lastSelectedDate),this.update()},_onSelectDate:function(t,e){this._handleDate(e),this.update()},_onMouseEnterRange:function(t){var i=e(t.target).attr("name");e(".datepicker--time-current-"+i,this.$timepicker).addClass("-focus-")},_onMouseOutRange:function(t){var i=e(t.target).attr("name");this.d.inFocus||e(".datepicker--time-current-"+i,this.$timepicker).removeClass("-focus-")},_onMouseUpRange:function(t){this.d.timepickerIsActive=!1}}}()}(window,jQuery); \ No newline at end of file diff --git a/libraries/datepicker/js/i18n/datepicker.cs.js b/libraries/datepicker/js/i18n/datepicker.cs.js new file mode 100644 index 0000000..a89db7c --- /dev/null +++ b/libraries/datepicker/js/i18n/datepicker.cs.js @@ -0,0 +1,12 @@ +;(function ($) { $.fn.datepicker.language['cs'] = { + days: ['Neděle', 'Pondělí', 'Úterý', 'Středa', 'Čtvrtek', 'Pátek', 'Sobota'], + daysShort: ['Ne', 'Po', 'Út', 'St', 'Čt', 'Pá', 'So'], + daysMin: ['Ne', 'Po', 'Út', 'St', 'Čt', 'Pá', 'So'], + months: ['Leden', 'Únor', 'Březen', 'Duben', 'Květen', 'Červen', 'Červenec', 'Srpen', 'Září', 'Říjen', 'Listopad', 'Prosinec'], + monthsShort: ['Led', 'Úno', 'Bře', 'Dub', 'Kvě', 'Čvn', 'Čvc', 'Srp', 'Zář', 'Říj', 'Lis', 'Pro'], + today: 'Dnes', + clear: 'Vymazat', + dateFormat: 'dd.mm.yyyy', + timeFormat: 'hh:ii', + firstDay: 1 +}; })(jQuery); \ No newline at end of file diff --git a/libraries/datepicker/js/i18n/datepicker.da.js b/libraries/datepicker/js/i18n/datepicker.da.js new file mode 100644 index 0000000..f34456e --- /dev/null +++ b/libraries/datepicker/js/i18n/datepicker.da.js @@ -0,0 +1,12 @@ +;(function ($) { $.fn.datepicker.language['da'] = { + days: ['Søndag', 'Mandag', 'Tirsdag', 'Onsdag', 'Torsdag', 'Fredag', 'Lørdag'], + daysShort: ['Søn', 'Man', 'Tir', 'Ons', 'Tor', 'Fre', 'Lør'], + daysMin: ['Sø', 'Ma', 'Ti', 'On', 'To', 'Fr', 'Lø'], + months: ['Januar','Februar','Marts','April','Maj','Juni', 'Juli','August','September','Oktober','November','December'], + monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'Maj', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'], + today: 'I dag', + clear: 'Nulstil', + dateFormat: 'dd/mm/yyyy', + timeFormat: 'hh:ii', + firstDay: 1 +}; })(jQuery); \ No newline at end of file diff --git a/libraries/datepicker/js/i18n/datepicker.de.js b/libraries/datepicker/js/i18n/datepicker.de.js new file mode 100644 index 0000000..fd9f8ff --- /dev/null +++ b/libraries/datepicker/js/i18n/datepicker.de.js @@ -0,0 +1,13 @@ +;(function ($) { $.fn.datepicker.language['de'] = { + days: ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'], + daysShort: ['Son', 'Mon', 'Die', 'Mit', 'Don', 'Fre', 'Sam'], + daysMin: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'], + months: ['Januar','Februar','März','April','Mai','Juni', 'Juli','August','September','Oktober','November','Dezember'], + monthsShort: ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'], + today: 'Heute', + clear: 'Aufräumen', + dateFormat: 'dd.mm.yyyy', + timeFormat: 'hh:ii', + firstDay: 1 +}; + })(jQuery); \ No newline at end of file diff --git a/libraries/datepicker/js/i18n/datepicker.en.js b/libraries/datepicker/js/i18n/datepicker.en.js new file mode 100644 index 0000000..32072f6 --- /dev/null +++ b/libraries/datepicker/js/i18n/datepicker.en.js @@ -0,0 +1,12 @@ +;(function ($) { $.fn.datepicker.language['en'] = { + days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], + daysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], + daysMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], + months: ['January','February','March','April','May','June', 'July','August','September','October','November','December'], + monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], + today: 'Today', + clear: 'Clear', + dateFormat: 'mm/dd/yyyy', + timeFormat: 'hh:ii aa', + firstDay: 0 +}; })(jQuery); \ No newline at end of file diff --git a/libraries/datepicker/js/i18n/datepicker.es.js b/libraries/datepicker/js/i18n/datepicker.es.js new file mode 100644 index 0000000..a8b6af5 --- /dev/null +++ b/libraries/datepicker/js/i18n/datepicker.es.js @@ -0,0 +1,12 @@ +;(function ($) { $.fn.datepicker.language['es'] = { + days: ['Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado'], + daysShort: ['Dom', 'Lun', 'Mar', 'Mie', 'Jue', 'Vie', 'Sab'], + daysMin: ['Do', 'Lu', 'Ma', 'Mi', 'Ju', 'Vi', 'Sa'], + months: ['Enero','Febrero','Marzo','Abril','Mayo','Junio', 'Julio','Augosto','Septiembre','Octubre','Noviembre','Diciembre'], + monthsShort: ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'], + today: 'Hoy', + clear: 'Limpiar', + dateFormat: 'dd/mm/yyyy', + timeFormat: 'hh:ii aa', + firstDay: 1 +}; })(jQuery); \ No newline at end of file diff --git a/libraries/datepicker/js/i18n/datepicker.fi.js b/libraries/datepicker/js/i18n/datepicker.fi.js new file mode 100644 index 0000000..9619705 --- /dev/null +++ b/libraries/datepicker/js/i18n/datepicker.fi.js @@ -0,0 +1,13 @@ +;(function ($) { $.fn.datepicker.language['fi'] = { + days: ['Sunnuntai', 'Maanantai', 'Tiistai', 'Keskiviikko', 'Torstai', 'Perjantai', 'Lauantai'], + daysShort: ['Su', 'Ma', 'Ti', 'Ke', 'To', 'Pe', 'La'], + daysMin: ['Su', 'Ma', 'Ti', 'Ke', 'To', 'Pe', 'La'], + months: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kesäkuu', 'Heinäkuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'], + monthsShort: ['Tammi', 'Helmi', 'Maalis', 'Huhti', 'Touko', 'Kesä', 'Heinä', 'Elo', 'Syys', 'Loka', 'Marras', 'Joulu'], + today: 'Tänään', + clear: 'Tyhjennä', + dateFormat: 'dd.mm.yyyy', + timeFormat: 'hh:ii', + firstDay: 1 +}; + })(jQuery); \ No newline at end of file diff --git a/libraries/datepicker/js/i18n/datepicker.fr.js b/libraries/datepicker/js/i18n/datepicker.fr.js new file mode 100644 index 0000000..0d083b2 --- /dev/null +++ b/libraries/datepicker/js/i18n/datepicker.fr.js @@ -0,0 +1,12 @@ +;(function ($) { $.fn.datepicker.language['fr'] = { + days: ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'], + daysShort: ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'], + daysMin: ['Di', 'Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa'], + months: ['Janvier','Février','Mars','Avril','Mai','Juin', 'Juillet','Août','Septembre','Octobre','Novembre','Decembre'], + monthsShort: ['Jan', 'Fév', 'Mars', 'Avr', 'Mai', 'Juin', 'Juil', 'Août', 'Sep', 'Oct', 'Nov', 'Dec'], + today: "Aujourd'hui", + clear: 'Effacer', + dateFormat: 'dd/mm/yyyy', + timeFormat: 'hh:ii', + firstDay: 1 +}; })(jQuery); \ No newline at end of file diff --git a/libraries/datepicker/js/i18n/datepicker.hu.js b/libraries/datepicker/js/i18n/datepicker.hu.js new file mode 100644 index 0000000..7d144b3 --- /dev/null +++ b/libraries/datepicker/js/i18n/datepicker.hu.js @@ -0,0 +1,12 @@ +;(function ($) { ;(function ($) { $.fn.datepicker.language['hu'] = { + days: ['Vasárnap', 'Hétfő', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'], + daysShort: ['Va', 'Hé', 'Ke', 'Sze', 'Cs', 'Pé', 'Szo'], + daysMin: ['V', 'H', 'K', 'Sz', 'Cs', 'P', 'Sz'], + months: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június', 'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'], + monthsShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún', 'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'], + today: 'Ma', + clear: 'Törlés', + dateFormat: 'yyyy-mm-dd', + timeFormat: 'hh:ii aa', + firstDay: 1 +}; })(jQuery); })(jQuery); \ No newline at end of file diff --git a/libraries/datepicker/js/i18n/datepicker.nl.js b/libraries/datepicker/js/i18n/datepicker.nl.js new file mode 100644 index 0000000..8d29a5a --- /dev/null +++ b/libraries/datepicker/js/i18n/datepicker.nl.js @@ -0,0 +1,12 @@ +;(function ($) { $.fn.datepicker.language['nl'] = { + days: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'], + daysShort: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], + daysMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], + months: ['Januari', 'Februari', 'Maart', 'April', 'Mei', 'Juni', 'Juli', 'Augustus', 'September', 'Oktober', 'November', 'December'], + monthsShort: ['Jan', 'Feb', 'Mrt', 'Apr', 'Mei', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'], + today: 'Vandaag', + clear: 'Legen', + dateFormat: 'dd-MM-yy', + timeFormat: 'hh:ii', + firstDay: 0 +}; })(jQuery); \ No newline at end of file diff --git a/libraries/datepicker/js/i18n/datepicker.pl.js b/libraries/datepicker/js/i18n/datepicker.pl.js new file mode 100644 index 0000000..3c0f565 --- /dev/null +++ b/libraries/datepicker/js/i18n/datepicker.pl.js @@ -0,0 +1,13 @@ +;(function ($) { $.fn.datepicker.language['pl'] = { + days: ['Niedziela', 'Poniedziałek', 'Wtorek', 'Środa', 'Czwartek', 'Piątek', 'Sobota'], + daysShort: ['Nie', 'Pon', 'Wto', 'Śro', 'Czw', 'Pią', 'Sob'], + daysMin: ['Nd', 'Pn', 'Wt', 'Śr', 'Czw', 'Pt', 'So'], + months: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec', 'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'], + monthsShort: ['Sty', 'Lut', 'Mar', 'Kwi', 'Maj', 'Cze', 'Lip', 'Sie', 'Wrz', 'Paź', 'Lis', 'Gru'], + today: 'Dzisiaj', + clear: 'Wyczyść', + dateFormat: 'yyyy-mm-dd', + timeFormat: 'hh:ii:aa', + firstDay: 1 +}; + })(jQuery); \ No newline at end of file diff --git a/libraries/datepicker/js/i18n/datepicker.pt-BR.js b/libraries/datepicker/js/i18n/datepicker.pt-BR.js new file mode 100644 index 0000000..13a79f5 --- /dev/null +++ b/libraries/datepicker/js/i18n/datepicker.pt-BR.js @@ -0,0 +1,12 @@ +;(function ($) { $.fn.datepicker.language['pt-BR'] = { + days: ['Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sábado'], + daysShort: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'], + daysMin: ['Do', 'Se', 'Te', 'Qu', 'Qu', 'Se', 'Sa'], + months: ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'], + monthsShort: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'], + today: 'Hoje', + clear: 'Limpar', + dateFormat: 'dd/mm/yyyy', + timeFormat: 'hh:ii', + firstDay: 0 +}; })(jQuery); \ No newline at end of file diff --git a/libraries/datepicker/js/i18n/datepicker.pt.js b/libraries/datepicker/js/i18n/datepicker.pt.js new file mode 100644 index 0000000..92a3a08 --- /dev/null +++ b/libraries/datepicker/js/i18n/datepicker.pt.js @@ -0,0 +1,12 @@ +;(function ($) { $.fn.datepicker.language['pt'] = { + days: ['Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sábado'], + daysShort: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'], + daysMin: ['Do', 'Se', 'Te', 'Qa', 'Qi', 'Sx', 'Sa'], + months: ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'], + monthsShort: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'], + today: 'Hoje', + clear: 'Limpar', + dateFormat: 'dd/mm/yyyy', + timeFormat: 'hh:ii', + firstDay: 1 +}; })(jQuery); \ No newline at end of file diff --git a/libraries/datepicker/js/i18n/datepicker.ro.js b/libraries/datepicker/js/i18n/datepicker.ro.js new file mode 100644 index 0000000..0034204 --- /dev/null +++ b/libraries/datepicker/js/i18n/datepicker.ro.js @@ -0,0 +1,13 @@ +;(function ($) { $.fn.datepicker.language['ro'] = { + days: ['Duminică', 'Luni', 'Marţi', 'Miercuri', 'Joi', 'Vineri', 'Sâmbătă'], + daysShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'], + daysMin: ['D', 'L', 'Ma', 'Mi', 'J', 'V', 'S'], + months: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Iunie','Iulie','August','Septembrie','Octombrie','Noiembrie','Decembrie'], + monthsShort: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Iun', 'Iul', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'], + today: 'Azi', + clear: 'Şterge', + dateFormat: 'dd.mm.yyyy', + timeFormat: 'hh:ii', + firstDay: 1 +}; + })(jQuery); \ No newline at end of file diff --git a/libraries/datepicker/js/i18n/datepicker.sk.js b/libraries/datepicker/js/i18n/datepicker.sk.js new file mode 100644 index 0000000..3312386 --- /dev/null +++ b/libraries/datepicker/js/i18n/datepicker.sk.js @@ -0,0 +1,12 @@ +;(function ($) { $.fn.datepicker.language['sk'] = { + days: ['Nedeľa', 'Pondelok', 'Utorok', 'Streda', 'Štvrtok', 'Piatok', 'Sobota'], + daysShort: ['Ned', 'Pon', 'Uto', 'Str', 'Štv', 'Pia', 'Sob'], + daysMin: ['Ne', 'Po', 'Ut', 'St', 'Št', 'Pi', 'So'], + months: ['Január','Február','Marec','Apríl','Máj','Jún', 'Júl','August','September','Október','November','December'], + monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'Máj', 'Jún', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'], + today: 'Dnes', + clear: 'Vymazať', + dateFormat: 'dd.mm.yyyy', + timeFormat: 'hh:ii', + firstDay: 1 +}; })(jQuery); \ No newline at end of file diff --git a/libraries/datepicker/js/i18n/datepicker.zh.js b/libraries/datepicker/js/i18n/datepicker.zh.js new file mode 100644 index 0000000..08633cc --- /dev/null +++ b/libraries/datepicker/js/i18n/datepicker.zh.js @@ -0,0 +1,12 @@ +;(function ($) { $.fn.datepicker.language['zh'] = { + days: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'], + daysShort: ['日', '一', '二', '三', '四', '五', '六'], + daysMin: ['日', '一', '二', '三', '四', '五', '六'], + months: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], + monthsShort: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], + today: '今天', + clear: '清除', + dateFormat: 'yyyy-mm-dd', + timeFormat: 'hh:ii', + firstDay: 1 +}; })(jQuery); \ No newline at end of file diff --git a/libraries/daterange/daterangepicker.css b/libraries/daterange/daterangepicker.css new file mode 100644 index 0000000..1ab86c3 --- /dev/null +++ b/libraries/daterange/daterangepicker.css @@ -0,0 +1,320 @@ +/*! + * Stylesheet for the Date Range Picker, for use with Bootstrap 3.x + * + * Copyright 2013 Dan Grossman ( http://www.dangrossman.info ) + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Built for http://www.improvely.com + */ + + .daterangepicker.dropdown-menu { + max-width: none; + z-index: 3000; +} + +.daterangepicker.opensleft .ranges, .daterangepicker.opensleft .calendar { + float: left; + margin: 4px; +} + +.daterangepicker.opensright .ranges, .daterangepicker.opensright .calendar, +.daterangepicker.openscenter .ranges, .daterangepicker.openscenter .calendar { + float: right; + margin: 4px; +} + +.daterangepicker.single .ranges, .daterangepicker.single .calendar { + float: none; +} + +.daterangepicker .ranges { + width: 160px; + text-align: left; +} + +.daterangepicker .ranges .range_inputs>div { + float: left; +} + +.daterangepicker .ranges .range_inputs>div:nth-child(2) { + padding-left: 11px; +} + +.daterangepicker .calendar { + display: none; + max-width: 270px; +} + +.daterangepicker.show-calendar .calendar { + display: block; +} + +.daterangepicker .calendar.single .calendar-date { + border: none; +} + +.daterangepicker .calendar th, .daterangepicker .calendar td { + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; + white-space: nowrap; + text-align: center; + min-width: 32px; +} + +.daterangepicker .daterangepicker_start_input label, +.daterangepicker .daterangepicker_end_input label { + color: #333; + display: block; + font-size: 11px; + font-weight: normal; + height: 20px; + line-height: 20px; + margin-bottom: 2px; + text-shadow: #fff 1px 1px 0px; + text-transform: uppercase; + width: 74px; +} + +.daterangepicker .ranges input { + font-size: 11px; +} + +.daterangepicker .ranges .input-mini { + border: 1px solid #ccc; + border-radius: 4px; + color: #555; + display: block; + font-size: 11px; + height: 30px; + line-height: 30px; + vertical-align: middle; + margin: 0 0 10px 0; + padding: 0 6px; + width: 74px; +} + +.daterangepicker .ranges ul { + list-style: none; + margin: 0; + padding: 0; +} + +.daterangepicker .ranges li { + font-size: 13px; + background: #f5f5f5; + border: 1px solid #f5f5f5; + color: #08c; + padding: 3px 12px; + margin-bottom: 8px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + cursor: pointer; +} + +.daterangepicker .ranges li.active, .daterangepicker .ranges li:hover { + background: #08c; + border: 1px solid #08c; + color: #fff; +} + +.daterangepicker .calendar-date { + border: 1px solid #ddd; + padding: 4px; + border-radius: 4px; + background: #fff; +} + +.daterangepicker .calendar-time { + text-align: center; + margin: 8px auto 0 auto; + line-height: 30px; +} + +.daterangepicker { + position: absolute; + background: #fff; + top: 100px; + left: 20px; + padding: 4px; + margin-top: 1px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.daterangepicker.opensleft:before { + position: absolute; + top: -7px; + right: 9px; + display: inline-block; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-left: 7px solid transparent; + border-bottom-color: rgba(0, 0, 0, 0.2); + content: ''; +} + +.daterangepicker.opensleft:after { + position: absolute; + top: -6px; + right: 10px; + display: inline-block; + border-right: 6px solid transparent; + border-bottom: 6px solid #fff; + border-left: 6px solid transparent; + content: ''; +} + +.daterangepicker.openscenter:before { + position: absolute; + top: -7px; + left: 0; + right: 0; + width: 0; + margin-left: auto; + margin-right: auto; + display: inline-block; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-left: 7px solid transparent; + border-bottom-color: rgba(0, 0, 0, 0.2); + content: ''; +} + +.daterangepicker.openscenter:after { + position: absolute; + top: -6px; + left: 0; + right: 0; + width: 0; + margin-left: auto; + margin-right: auto; + display: inline-block; + border-right: 6px solid transparent; + border-bottom: 6px solid #fff; + border-left: 6px solid transparent; + content: ''; +} + +.daterangepicker.opensright:before { + position: absolute; + top: -7px; + left: 9px; + display: inline-block; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-left: 7px solid transparent; + border-bottom-color: rgba(0, 0, 0, 0.2); + content: ''; +} + +.daterangepicker.opensright:after { + position: absolute; + top: -6px; + left: 10px; + display: inline-block; + border-right: 6px solid transparent; + border-bottom: 6px solid #fff; + border-left: 6px solid transparent; + content: ''; +} + +.daterangepicker table { + width: 100%; + margin: 0; +} + +.daterangepicker td, .daterangepicker th { + text-align: center; + width: 20px; + height: 20px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + cursor: pointer; + white-space: nowrap; +} + +.daterangepicker td.off { + color: #999; +} + +.daterangepicker td.disabled, .daterangepicker option.disabled { + color: #999; +} + +.daterangepicker td.available:hover, .daterangepicker th.available:hover { + background: #eee; +} + +.daterangepicker td.in-range { + background: #ebf4f8; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.daterangepicker td.start-date { + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.daterangepicker td.end-date { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.daterangepicker td.start-date.end-date { + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.daterangepicker td.active, .daterangepicker td.active:hover { + background-color: #357ebd; + border-color: #3071a9; + color: #fff; +} + +.daterangepicker td.week, .daterangepicker th.week { + font-size: 80%; + color: #ccc; +} + +.daterangepicker select.monthselect, .daterangepicker select.yearselect { + font-size: 12px; + padding: 1px; + height: auto; + margin: 0; + cursor: default; +} + +.daterangepicker select.monthselect { + margin-right: 2%; + width: 56%; +} + +.daterangepicker select.yearselect { + width: 40%; +} + +.daterangepicker select.hourselect, .daterangepicker select.minuteselect, .daterangepicker select.secondselect, .daterangepicker select.ampmselect { + width: 50px; + margin-bottom: 0; +} + +.daterangepicker_start_input { + float: left; +} + +.daterangepicker_end_input { + float: left; + padding-left: 11px +} + +.daterangepicker th.month { + width: auto; +} diff --git a/libraries/daterange/daterangepicker.js b/libraries/daterange/daterangepicker.js new file mode 100644 index 0000000..f631d3c --- /dev/null +++ b/libraries/daterange/daterangepicker.js @@ -0,0 +1,1266 @@ +/** +* @version: 1.3.16 +* @author: Dan Grossman http://www.dangrossman.info/ +* @date: 2014-11-12 +* @copyright: Copyright (c) 2012-2014 Dan Grossman. All rights reserved. +* @license: Licensed under Apache License v2.0. See http://www.apache.org/licenses/LICENSE-2.0 +* @website: http://www.improvely.com/ +*/ + +(function(root, factory) { + + if (typeof define === 'function' && define.amd) { + define(['moment', 'jquery', 'exports'], function(momentjs, $, exports) { + root.daterangepicker = factory(root, exports, momentjs, $); + }); + + } else if (typeof exports !== 'undefined') { + var momentjs = require('moment'); + var jQuery; + try { + jQuery = require('jquery'); + } catch (err) { + jQuery = window.jQuery; + if (!jQuery) throw new Error('jQuery dependency not found'); + } + + factory(root, exports, momentjs, jQuery); + + // Finally, as a browser global. + } else { + root.daterangepicker = factory(root, {}, root.moment, (root.jQuery || root.Zepto || root.ender || root.$)); + } + +}(this, function(root, daterangepicker, moment, $) { + + var DateRangePicker = function (element, options, cb) { + + // by default, the daterangepicker element is placed at the bottom of HTML body + this.parentEl = 'body'; + + //element that triggered the date range picker + this.element = $(element); + + //tracks visible state + this.isShowing = false; + + //create the picker HTML object + var DRPTemplate = ''; + + //custom options + if (typeof options !== 'object' || options === null) + options = {}; + + this.parentEl = (typeof options === 'object' && options.parentEl && $(options.parentEl).length) ? $(options.parentEl) : $(this.parentEl); + this.container = $(DRPTemplate).appendTo(this.parentEl); + + this.setOptions(options, cb); + + //apply CSS classes and labels to buttons + var c = this.container; + $.each(this.buttonClasses, function (idx, val) { + c.find('button').addClass(val); + }); + this.container.find('.daterangepicker_start_input label').html(this.locale.fromLabel); + this.container.find('.daterangepicker_end_input label').html(this.locale.toLabel); + if (this.applyClass.length) + this.container.find('.applyBtn').addClass(this.applyClass); + if (this.cancelClass.length) + this.container.find('.cancelBtn').addClass(this.cancelClass); + this.container.find('.applyBtn').html(this.locale.applyLabel); + this.container.find('.cancelBtn').html(this.locale.cancelLabel).addClass( 'mt5' ); + this.container.find('.clearBtn').html(this.locale.clearLabel).addClass( 'btn btn-danger mt5' ); + + //event listeners + + this.container.find('.calendar') + .on('click.daterangepicker', '.prev', $.proxy(this.clickPrev, this)) + .on('click.daterangepicker', '.next', $.proxy(this.clickNext, this)) + .on('click.daterangepicker', 'td.available', $.proxy(this.clickDate, this)) + .on('mouseenter.daterangepicker', 'td.available', $.proxy(this.hoverDate, this)) + .on('mouseleave.daterangepicker', 'td.available', $.proxy(this.updateFormInputs, this)) + .on('change.daterangepicker', 'select.yearselect', $.proxy(this.updateMonthYear, this)) + .on('change.daterangepicker', 'select.monthselect', $.proxy(this.updateMonthYear, this)) + .on('change.daterangepicker', 'select.hourselect,select.minuteselect,select.secondselect,select.ampmselect', $.proxy(this.updateTime, this)); + + this.container.find('.ranges') + .on('click.daterangepicker', 'button.applyBtn', $.proxy(this.clickApply, this)) + .on('click.daterangepicker', 'button.cancelBtn', $.proxy(this.clickCancel, this)) + .on('click.daterangepicker', 'button.clearBtn', $.proxy(this.clickClear, this )) + .on('click.daterangepicker', '.daterangepicker_start_input,.daterangepicker_end_input', $.proxy(this.showCalendars, this)) + .on('change.daterangepicker', '.daterangepicker_start_input,.daterangepicker_end_input', $.proxy(this.inputsChanged, this)) + .on('keydown.daterangepicker', '.daterangepicker_start_input,.daterangepicker_end_input', $.proxy(this.inputsKeydown, this)) + .on('click.daterangepicker', 'li', $.proxy(this.clickRange, this)) + .on('mouseenter.daterangepicker', 'li', $.proxy(this.enterRange, this)) + .on('mouseleave.daterangepicker', 'li', $.proxy(this.updateFormInputs, this)); + + if (this.element.is('input')) { + this.element.on({ + 'click.daterangepicker': $.proxy(this.show, this), + 'focus.daterangepicker': $.proxy(this.show, this), + 'keyup.daterangepicker': $.proxy(this.updateFromControl, this) + }); + } else { + this.element.on('click.daterangepicker', $.proxy(this.toggle, this)); + } + + }; + + DateRangePicker.prototype = { + + constructor: DateRangePicker, + + setOptions: function(options, callback) { + + this.startDate = moment().startOf('day'); + this.endDate = moment().endOf('day'); + this.timeZone = moment().zone(); + this.minDate = false; + this.maxDate = false; + this.dateLimit = false; + + this.showDropdowns = false; + this.showWeekNumbers = false; + this.timePicker = false; + this.timePickerSeconds = false; + this.timePickerIncrement = 30; + this.timePicker12Hour = true; + this.singleDatePicker = false; + this.ranges = {}; + + this.opens = 'left'; + if (this.element.hasClass('pull-right')) + this.opens = 'left'; + + this.buttonClasses = ['btn', 'btn-small btn-sm']; + this.applyClass = 'btn-success'; + this.cancelClass = 'btn-default'; + + this.format = 'YYYY-MM-DD'; + this.separator = ' - '; + + this.locale = { + applyLabel: 'Zatwierdź', + cancelLabel: 'Anuluj', + clearLabel: 'Wyczyść', + fromLabel: 'Od', + toLabel: 'Do', + weekLabel: 'W', + customRangeLabel: 'Custom Range', + daysOfWeek: moment.weekdaysMin(), + monthNames: moment.monthsShort(), + firstDay: moment.localeData()._week.dow + }; + + this.cb = function () { }; + + if (typeof options.format === 'string') + this.format = options.format; + + if (typeof options.separator === 'string') + this.separator = options.separator; + + if (typeof options.startDate === 'string') + this.startDate = moment(options.startDate, this.format); + + if (typeof options.endDate === 'string') + this.endDate = moment(options.endDate, this.format); + + if (typeof options.minDate === 'string') + this.minDate = moment(options.minDate, this.format); + + if (typeof options.maxDate === 'string') + this.maxDate = moment(options.maxDate, this.format); + + if (typeof options.startDate === 'object') + this.startDate = moment(options.startDate); + + if (typeof options.endDate === 'object') + this.endDate = moment(options.endDate); + + if (typeof options.minDate === 'object') + this.minDate = moment(options.minDate); + + if (typeof options.maxDate === 'object') + this.maxDate = moment(options.maxDate); + + if (typeof options.applyClass === 'string') + this.applyClass = options.applyClass; + + if (typeof options.cancelClass === 'string') + this.cancelClass = options.cancelClass; + + if (typeof options.dateLimit === 'object') + this.dateLimit = options.dateLimit; + + if (typeof options.locale === 'object') { + + if (typeof options.locale.daysOfWeek === 'object') { + // Create a copy of daysOfWeek to avoid modification of original + // options object for reusability in multiple daterangepicker instances + this.locale.daysOfWeek = options.locale.daysOfWeek.slice(); + } + + if (typeof options.locale.monthNames === 'object') { + this.locale.monthNames = options.locale.monthNames.slice(); + } + + if (typeof options.locale.firstDay === 'number') { + this.locale.firstDay = options.locale.firstDay; + } + + if (typeof options.locale.applyLabel === 'string') { + this.locale.applyLabel = options.locale.applyLabel; + } + + if (typeof options.locale.cancelLabel === 'string') { + this.locale.cancelLabel = options.locale.cancelLabel; + } + + if (typeof options.locale.fromLabel === 'string') { + this.locale.fromLabel = options.locale.fromLabel; + } + + if (typeof options.locale.toLabel === 'string') { + this.locale.toLabel = options.locale.toLabel; + } + + if (typeof options.locale.weekLabel === 'string') { + this.locale.weekLabel = options.locale.weekLabel; + } + + if (typeof options.locale.customRangeLabel === 'string') { + this.locale.customRangeLabel = options.locale.customRangeLabel; + } + } + + if (typeof options.opens === 'string') + this.opens = options.opens; + + if (typeof options.showWeekNumbers === 'boolean') { + this.showWeekNumbers = options.showWeekNumbers; + } + + if (typeof options.buttonClasses === 'string') { + this.buttonClasses = [options.buttonClasses]; + } + + if (typeof options.buttonClasses === 'object') { + this.buttonClasses = options.buttonClasses; + } + + if (typeof options.showDropdowns === 'boolean') { + this.showDropdowns = options.showDropdowns; + } + + if (typeof options.singleDatePicker === 'boolean') { + this.singleDatePicker = options.singleDatePicker; + if (this.singleDatePicker) { + this.endDate = this.startDate.clone(); + } + } + + if (typeof options.timePicker === 'boolean') { + this.timePicker = options.timePicker; + } + + if (typeof options.timePickerSeconds === 'boolean') { + this.timePickerSeconds = options.timePickerSeconds; + } + + if (typeof options.timePickerIncrement === 'number') { + this.timePickerIncrement = options.timePickerIncrement; + } + + if (typeof options.timePicker12Hour === 'boolean') { + this.timePicker12Hour = options.timePicker12Hour; + } + + // update day names order to firstDay + if (this.locale.firstDay != 0) { + var iterator = this.locale.firstDay; + while (iterator > 0) { + this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()); + iterator--; + } + } + + var start, end, range; + + //if no start/end dates set, check if an input element contains initial values + if (typeof options.startDate === 'undefined' && typeof options.endDate === 'undefined') { + if ($(this.element).is('input[type=text]')) { + var val = $(this.element).val(), + split = val.split(this.separator); + + start = end = null; + + if (split.length == 2) { + start = moment(split[0], this.format); + end = moment(split[1], this.format); + } else if (this.singleDatePicker && val !== "") { + start = moment(val, this.format); + end = moment(val, this.format); + } + if (start !== null && end !== null) { + this.startDate = start; + this.endDate = end; + } + } + } + + // bind the time zone used to build the calendar to either the timeZone passed in through the options or the zone of the startDate (which will be the local time zone by default) + if (typeof options.timeZone === 'string' || typeof options.timeZone === 'number') { + this.timeZone = options.timeZone; + this.startDate.zone(this.timeZone); + this.endDate.zone(this.timeZone); + } else { + this.timeZone = moment(this.startDate).zone(); + } + + if (typeof options.ranges === 'object') { + for (range in options.ranges) { + + if (typeof options.ranges[range][0] === 'string') + start = moment(options.ranges[range][0], this.format); + else + start = moment(options.ranges[range][0]); + + if (typeof options.ranges[range][1] === 'string') + end = moment(options.ranges[range][1], this.format); + else + end = moment(options.ranges[range][1]); + + // If we have a min/max date set, bound this range + // to it, but only if it would otherwise fall + // outside of the min/max. + if (this.minDate && start.isBefore(this.minDate)) + start = moment(this.minDate); + + if (this.maxDate && end.isAfter(this.maxDate)) + end = moment(this.maxDate); + + // If the end of the range is before the minimum (if min is set) OR + // the start of the range is after the max (also if set) don't display this + // range option. + if ((this.minDate && end.isBefore(this.minDate)) || (this.maxDate && start.isAfter(this.maxDate))) { + continue; + } + + this.ranges[range] = [start, end]; + } + + var list = '
      '; + for (range in this.ranges) { + list += '
    • ' + range + '
    • '; + } + list += '
    • ' + this.locale.customRangeLabel + '
    • '; + list += '
    '; + this.container.find('.ranges ul').remove(); + this.container.find('.ranges').prepend(list); + } + + if (typeof callback === 'function') { + this.cb = callback; + } + + if (!this.timePicker) { + this.startDate = this.startDate.startOf('day'); + this.endDate = this.endDate.endOf('day'); + } + + if (this.singleDatePicker) { + this.opens = 'right'; + this.container.addClass('single'); + this.container.find('.calendar.right').show(); + this.container.find('.calendar.left').hide(); + if (!this.timePicker) { + this.container.find('.ranges').hide(); + } else { + this.container.find('.ranges .daterangepicker_start_input, .ranges .daterangepicker_end_input').hide(); + } + if (!this.container.find('.calendar.right').hasClass('single')) + this.container.find('.calendar.right').addClass('single'); + } else { + this.container.removeClass('single'); + this.container.find('.calendar.right').removeClass('single'); + this.container.find('.ranges').show(); + } + + this.oldStartDate = this.startDate.clone(); + this.oldEndDate = this.endDate.clone(); + this.oldChosenLabel = this.chosenLabel; + + this.leftCalendar = { + month: moment([this.startDate.year(), this.startDate.month(), 1, this.startDate.hour(), this.startDate.minute(), this.startDate.second()]), + calendar: [] + }; + + this.rightCalendar = { + month: moment([this.endDate.year(), this.endDate.month(), 1, this.endDate.hour(), this.endDate.minute(), this.endDate.second()]), + calendar: [] + }; + + if (this.opens == 'right' || this.opens == 'center') { + //swap calendar positions + var first = this.container.find('.calendar.first'); + var second = this.container.find('.calendar.second'); + + if (second.hasClass('single')) { + second.removeClass('single'); + first.addClass('single'); + } + + first.removeClass('left').addClass('right'); + second.removeClass('right').addClass('left'); + + if (this.singleDatePicker) { + first.show(); + second.hide(); + } + } + + if (typeof options.ranges === 'undefined' && !this.singleDatePicker) { + this.container.addClass('show-calendar'); + } + + this.container.addClass('opens' + this.opens); + + this.updateView(); + this.updateCalendars(); + + }, + + setStartDate: function(startDate) { + if (typeof startDate === 'string') + this.startDate = moment(startDate, this.format).zone(this.timeZone); + + if (typeof startDate === 'object') + this.startDate = moment(startDate); + + if (!this.timePicker) + this.startDate = this.startDate.startOf('day'); + + this.oldStartDate = this.startDate.clone(); + + this.updateView(); + this.updateCalendars(); + this.updateInputText(); + }, + + setEndDate: function(endDate) { + if (typeof endDate === 'string') + this.endDate = moment(endDate, this.format).zone(this.timeZone); + + if (typeof endDate === 'object') + this.endDate = moment(endDate); + + if (!this.timePicker) + this.endDate = this.endDate.endOf('day'); + + this.oldEndDate = this.endDate.clone(); + + this.updateView(); + this.updateCalendars(); + this.updateInputText(); + }, + + updateView: function () { + this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year()).hour(this.startDate.hour()).minute(this.startDate.minute()); + this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year()).hour(this.endDate.hour()).minute(this.endDate.minute()); + this.updateFormInputs(); + }, + + updateFormInputs: function () { + this.container.find('input[name=daterangepicker_start]').val(this.startDate.format(this.format)); + this.container.find('input[name=daterangepicker_end]').val(this.endDate.format(this.format)); + + if (this.startDate.isSame(this.endDate) || this.startDate.isBefore(this.endDate)) { + this.container.find('button.applyBtn').removeAttr('disabled'); + } else { + this.container.find('button.applyBtn').attr('disabled', 'disabled'); + } + }, + + updateFromControl: function () { + if (!this.element.is('input')) return; + if (!this.element.val().length) return; + + var dateString = this.element.val().split(this.separator), + start = null, + end = null; + + if(dateString.length === 2) { + start = moment(dateString[0], this.format).zone(this.timeZone); + end = moment(dateString[1], this.format).zone(this.timeZone); + } + + if (this.singleDatePicker || start === null || end === null) { + start = moment(this.element.val(), this.format).zone(this.timeZone); + end = start; + } + + if (end.isBefore(start)) return; + + this.oldStartDate = this.startDate.clone(); + this.oldEndDate = this.endDate.clone(); + + this.startDate = start; + this.endDate = end; + + if (!this.startDate.isSame(this.oldStartDate) || !this.endDate.isSame(this.oldEndDate)) + this.notify(); + + this.updateCalendars(); + }, + + notify: function () { + this.updateView(); + this.cb(this.startDate, this.endDate, this.chosenLabel); + }, + + move: function () { + var parentOffset = { top: 0, left: 0 }; + var parentRightEdge = $(window).width(); + if (!this.parentEl.is('body')) { + parentOffset = { + top: this.parentEl.offset().top - this.parentEl.scrollTop(), + left: this.parentEl.offset().left - this.parentEl.scrollLeft() + }; + parentRightEdge = this.parentEl[0].clientWidth + this.parentEl.offset().left; + } + + if (this.opens == 'left') { + this.container.css({ + top: this.element.offset().top + this.element.outerHeight() - parentOffset.top, + right: parentRightEdge - this.element.offset().left - this.element.outerWidth(), + left: 'auto' + }); + if (this.container.offset().left < 0) { + this.container.css({ + right: 'auto', + left: 9 + }); + } + } else if (this.opens == 'center') { + this.container.css({ + top: this.element.offset().top + this.element.outerHeight() - parentOffset.top, + left: this.element.offset().left - parentOffset.left + this.element.outerWidth() / 2 + - this.container.outerWidth() / 2, + right: 'auto' + }); + if (this.container.offset().left < 0) { + this.container.css({ + right: 'auto', + left: 9 + }); + } + } else { + this.container.css({ + top: this.element.offset().top + this.element.outerHeight() - parentOffset.top, + left: this.element.offset().left - parentOffset.left, + right: 'auto' + }); + if (this.container.offset().left + this.container.outerWidth() > $(window).width()) { + this.container.css({ + left: 'auto', + right: 0 + }); + } + } + }, + + toggle: function (e) { + if (this.element.hasClass('active')) { + this.hide(); + } else { + this.show(); + } + }, + + show: function (e) { + if (this.isShowing) return; + + this.element.addClass('active'); + this.container.show(); + this.move(); + + // Create a click proxy that is private to this instance of datepicker, for unbinding + this._outsideClickProxy = $.proxy(function (e) { this.outsideClick(e); }, this); + // Bind global datepicker mousedown for hiding and + $(document) + .on('mousedown.daterangepicker', this._outsideClickProxy) + // also explicitly play nice with Bootstrap dropdowns, which stopPropagation when clicking them + .on('click.daterangepicker', '[data-toggle=dropdown]', this._outsideClickProxy) + // and also close when focus changes to outside the picker (eg. tabbing between controls) + .on('focusin.daterangepicker', this._outsideClickProxy); + + this.isShowing = true; + this.element.trigger('show.daterangepicker', this); + }, + + outsideClick: function (e) { + var target = $(e.target); + // if the page is clicked anywhere except within the daterangerpicker/button + // itself then call this.hide() + if ( + target.closest(this.element).length || + target.closest(this.container).length || + target.closest('.calendar-date').length + ) return; + this.hide(); + }, + + hide: function (e) { + if (!this.isShowing) return; + + $(document) + .off('.daterangepicker'); + + this.element.removeClass('active'); + this.container.hide(); + + if (!this.startDate.isSame(this.oldStartDate) || !this.endDate.isSame(this.oldEndDate)) + this.notify(); + + this.oldStartDate = this.startDate.clone(); + this.oldEndDate = this.endDate.clone(); + + this.isShowing = false; + this.element.trigger('hide.daterangepicker', this); + }, + + enterRange: function (e) { + // mouse pointer has entered a range label + var label = e.target.innerHTML; + if (label == this.locale.customRangeLabel) { + this.updateView(); + } else { + var dates = this.ranges[label]; + this.container.find('input[name=daterangepicker_start]').val(dates[0].format(this.format)); + this.container.find('input[name=daterangepicker_end]').val(dates[1].format(this.format)); + } + }, + + showCalendars: function() { + this.container.addClass('show-calendar'); + this.move(); + this.element.trigger('showCalendar.daterangepicker', this); + }, + + hideCalendars: function() { + this.container.removeClass('show-calendar'); + this.element.trigger('hideCalendar.daterangepicker', this); + }, + + // when a date is typed into the start to end date textboxes + inputsChanged: function (e) { + var el = $(e.target); + var date = moment(el.val(), this.format); + if (!date.isValid()) return; + + var startDate, endDate; + if (el.attr('name') === 'daterangepicker_start') { + startDate = date; + endDate = this.endDate; + } else { + startDate = this.startDate; + endDate = date; + } + this.setCustomDates(startDate, endDate); + }, + + inputsKeydown: function(e) { + if (e.keyCode === 13) { + this.inputsChanged(e); + this.notify(); + } + }, + + updateInputText: function() { + if (this.element.is('input') && !this.singleDatePicker) { + this.element.val(this.startDate.format(this.format) + this.separator + this.endDate.format(this.format)); + this.element.trigger( 'change' ); + } else if (this.element.is('input')) { + this.element.val(this.endDate.format(this.format)); + this.element.trigger( 'change' ); + } + }, + + clickRange: function (e) { + var label = e.target.innerHTML; + this.chosenLabel = label; + if (label == this.locale.customRangeLabel) { + this.showCalendars(); + } else { + var dates = this.ranges[label]; + + this.startDate = dates[0]; + this.endDate = dates[1]; + + if (!this.timePicker) { + this.startDate.startOf('day'); + this.endDate.endOf('day'); + } + + this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year()).hour(this.startDate.hour()).minute(this.startDate.minute()); + this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year()).hour(this.endDate.hour()).minute(this.endDate.minute()); + this.updateCalendars(); + + this.updateInputText(); + + this.hideCalendars(); + this.hide(); + this.element.trigger('apply.daterangepicker', this); + } + }, + + clickPrev: function (e) { + var cal = $(e.target).parents('.calendar'); + if (cal.hasClass('left')) { + this.leftCalendar.month.subtract(1, 'month'); + } else { + this.rightCalendar.month.subtract(1, 'month'); + } + this.updateCalendars(); + }, + + clickNext: function (e) { + var cal = $(e.target).parents('.calendar'); + if (cal.hasClass('left')) { + this.leftCalendar.month.add(1, 'month'); + } else { + this.rightCalendar.month.add(1, 'month'); + } + this.updateCalendars(); + }, + + hoverDate: function (e) { + var title = $(e.target).attr('data-title'); + var row = title.substr(1, 1); + var col = title.substr(3, 1); + var cal = $(e.target).parents('.calendar'); + + if (cal.hasClass('left')) { + this.container.find('input[name=daterangepicker_start]').val(this.leftCalendar.calendar[row][col].format(this.format)); + } else { + this.container.find('input[name=daterangepicker_end]').val(this.rightCalendar.calendar[row][col].format(this.format)); + } + }, + + setCustomDates: function(startDate, endDate) { + this.chosenLabel = this.locale.customRangeLabel; + if (startDate.isAfter(endDate)) { + var difference = this.endDate.diff(this.startDate); + endDate = moment(startDate).add(difference, 'ms'); + } + this.startDate = startDate; + this.endDate = endDate; + + this.updateView(); + this.updateCalendars(); + }, + + clickDate: function (e) { + var title = $(e.target).attr('data-title'); + var row = title.substr(1, 1); + var col = title.substr(3, 1); + var cal = $(e.target).parents('.calendar'); + + var startDate, endDate; + if (cal.hasClass('left')) { + startDate = this.leftCalendar.calendar[row][col]; + endDate = this.endDate; + if (typeof this.dateLimit === 'object') { + var maxDate = moment(startDate).add(this.dateLimit).startOf('day'); + if (endDate.isAfter(maxDate)) { + endDate = maxDate; + } + } + } else { + startDate = this.startDate; + endDate = this.rightCalendar.calendar[row][col]; + if (typeof this.dateLimit === 'object') { + var minDate = moment(endDate).subtract(this.dateLimit).startOf('day'); + if (startDate.isBefore(minDate)) { + startDate = minDate; + } + } + } + + if (this.singleDatePicker && cal.hasClass('left')) { + endDate = startDate.clone(); + } else if (this.singleDatePicker && cal.hasClass('right')) { + startDate = endDate.clone(); + } + + cal.find('td').removeClass('active'); + + $(e.target).addClass('active'); + + this.setCustomDates(startDate, endDate); + + if (!this.timePicker) + endDate.endOf('day'); + + if (this.singleDatePicker && !this.timePicker) + this.clickApply(); + }, + + clickApply: function (e) { + this.updateInputText(); + this.hide(); + this.element.trigger('apply.daterangepicker', this); + }, + + clickClear: function (e) { + if (this.element.is('input') && !this.singleDatePicker) { + this.element.val( '' ); + } else if (this.element.is('input')) { + this.element.val( '' ); + } + this.element.trigger( 'change' ); + this.hide(); + }, + + clickCancel: function (e) { + this.startDate = this.oldStartDate; + this.endDate = this.oldEndDate; + this.chosenLabel = this.oldChosenLabel; + this.updateView(); + this.updateCalendars(); + this.hide(); + this.element.trigger('cancel.daterangepicker', this); + }, + + updateMonthYear: function (e) { + var isLeft = $(e.target).closest('.calendar').hasClass('left'), + leftOrRight = isLeft ? 'left' : 'right', + cal = this.container.find('.calendar.'+leftOrRight); + + // Month must be Number for new moment versions + var month = parseInt(cal.find('.monthselect').val(), 10); + var year = cal.find('.yearselect').val(); + + this[leftOrRight+'Calendar'].month.month(month).year(year); + this.updateCalendars(); + }, + + updateTime: function(e) { + + var cal = $(e.target).closest('.calendar'), + isLeft = cal.hasClass('left'); + + var hour = parseInt(cal.find('.hourselect').val(), 10); + var minute = parseInt(cal.find('.minuteselect').val(), 10); + var second = 0; + + if (this.timePickerSeconds) { + second = parseInt(cal.find('.secondselect').val(), 10); + } + + if (this.timePicker12Hour) { + var ampm = cal.find('.ampmselect').val(); + if (ampm === 'PM' && hour < 12) + hour += 12; + if (ampm === 'AM' && hour === 12) + hour = 0; + } + + if (isLeft) { + var start = this.startDate.clone(); + start.hour(hour); + start.minute(minute); + start.second(second); + this.startDate = start; + this.leftCalendar.month.hour(hour).minute(minute).second(second); + if (this.singleDatePicker) + this.endDate = start.clone(); + } else { + var end = this.endDate.clone(); + end.hour(hour); + end.minute(minute); + end.second(second); + this.endDate = end; + if (this.singleDatePicker) + this.startDate = end.clone(); + this.rightCalendar.month.hour(hour).minute(minute).second(second); + } + + this.updateView(); + this.updateCalendars(); + }, + + updateCalendars: function () { + this.leftCalendar.calendar = this.buildCalendar(this.leftCalendar.month.month(), this.leftCalendar.month.year(), this.leftCalendar.month.hour(), this.leftCalendar.month.minute(), this.leftCalendar.month.second(), 'left'); + this.rightCalendar.calendar = this.buildCalendar(this.rightCalendar.month.month(), this.rightCalendar.month.year(), this.rightCalendar.month.hour(), this.rightCalendar.month.minute(), this.rightCalendar.month.second(), 'right'); + this.container.find('.calendar.left').empty().html(this.renderCalendar(this.leftCalendar.calendar, this.startDate, this.minDate, this.maxDate, 'left')); + this.container.find('.calendar.right').empty().html(this.renderCalendar(this.rightCalendar.calendar, this.endDate, this.singleDatePicker ? this.minDate : this.startDate, this.maxDate, 'right')); + + this.container.find('.ranges li').removeClass('active'); + var customRange = true; + var i = 0; + for (var range in this.ranges) { + if (this.timePicker) { + if (this.startDate.isSame(this.ranges[range][0]) && this.endDate.isSame(this.ranges[range][1])) { + customRange = false; + this.chosenLabel = this.container.find('.ranges li:eq(' + i + ')') + .addClass('active').html(); + } + } else { + //ignore times when comparing dates if time picker is not enabled + if (this.startDate.format('YYYY-MM-DD') == this.ranges[range][0].format('YYYY-MM-DD') && this.endDate.format('YYYY-MM-DD') == this.ranges[range][1].format('YYYY-MM-DD')) { + customRange = false; + this.chosenLabel = this.container.find('.ranges li:eq(' + i + ')') + .addClass('active').html(); + } + } + i++; + } + if (customRange) { + this.chosenLabel = this.container.find('.ranges li:last').addClass('active').html(); + this.showCalendars(); + } + }, + + buildCalendar: function (month, year, hour, minute, second, side) { + var daysInMonth = moment([year, month]).daysInMonth(); + var firstDay = moment([year, month, 1]); + var lastDay = moment([year, month, daysInMonth]); + var lastMonth = moment(firstDay).subtract(1, 'month').month(); + var lastYear = moment(firstDay).subtract(1, 'month').year(); + + var daysInLastMonth = moment([lastYear, lastMonth]).daysInMonth(); + + var dayOfWeek = firstDay.day(); + + var i; + + //initialize a 6 rows x 7 columns array for the calendar + var calendar = []; + calendar.firstDay = firstDay; + calendar.lastDay = lastDay; + + for (i = 0; i < 6; i++) { + calendar[i] = []; + } + + //populate the calendar with date objects + var startDay = daysInLastMonth - dayOfWeek + this.locale.firstDay + 1; + if (startDay > daysInLastMonth) + startDay -= 7; + + if (dayOfWeek == this.locale.firstDay) + startDay = daysInLastMonth - 6; + + var curDate = moment([lastYear, lastMonth, startDay, 12, minute, second]).zone(this.timeZone); + + var col, row; + for (i = 0, col = 0, row = 0; i < 42; i++, col++, curDate = moment(curDate).add(24, 'hour')) { + if (i > 0 && col % 7 === 0) { + col = 0; + row++; + } + calendar[row][col] = curDate.clone().hour(hour); + curDate.hour(12); + + if (this.minDate && calendar[row][col].format('YYYY-MM-DD') == this.minDate.format('YYYY-MM-DD') && calendar[row][col].isBefore(this.minDate) && side == 'left') { + calendar[row][col] = this.minDate.clone(); + } + + if (this.maxDate && calendar[row][col].format('YYYY-MM-DD') == this.maxDate.format('YYYY-MM-DD') && calendar[row][col].isAfter(this.maxDate) && side == 'right') { + calendar[row][col] = this.maxDate.clone(); + } + + } + + return calendar; + }, + + renderDropdowns: function (selected, minDate, maxDate) { + var currentMonth = selected.month(); + var currentYear = selected.year(); + var maxYear = (maxDate && maxDate.year()) || (currentYear + 5); + var minYear = (minDate && minDate.year()) || (currentYear - 50); + + var monthHtml = '"; + + var yearHtml = ''; + + return monthHtml + yearHtml; + }, + + renderCalendar: function (calendar, selected, minDate, maxDate, side) { + + var html = '
    '; + html += ''; + html += ''; + html += ''; + + // add empty cell for week number + if (this.showWeekNumbers) + html += ''; + + if (!minDate || minDate.isBefore(calendar.firstDay)) { + html += ''; + } else { + html += ''; + } + + var dateHtml = this.locale.monthNames[calendar[1][1].month()] + calendar[1][1].format(" YYYY"); + + if (this.showDropdowns) { + dateHtml = this.renderDropdowns(calendar[1][1], minDate, maxDate); + } + + html += ''; + if (!maxDate || maxDate.isAfter(calendar.lastDay)) { + html += ''; + } else { + html += ''; + } + + html += ''; + html += ''; + + // add week number label + if (this.showWeekNumbers) + html += ''; + + $.each(this.locale.daysOfWeek, function (index, dayOfWeek) { + html += ''; + }); + + html += ''; + html += ''; + html += ''; + + for (var row = 0; row < 6; row++) { + html += ''; + + // add week number + if (this.showWeekNumbers) + html += ''; + + for (var col = 0; col < 7; col++) { + var cname = 'available '; + cname += (calendar[row][col].month() == calendar[1][1].month()) ? '' : 'off'; + + if ((minDate && calendar[row][col].isBefore(minDate, 'day')) || (maxDate && calendar[row][col].isAfter(maxDate, 'day'))) { + cname = ' off disabled '; + } else if (calendar[row][col].format('YYYY-MM-DD') == selected.format('YYYY-MM-DD')) { + cname += ' active '; + if (calendar[row][col].format('YYYY-MM-DD') == this.startDate.format('YYYY-MM-DD')) { + cname += ' start-date '; + } + if (calendar[row][col].format('YYYY-MM-DD') == this.endDate.format('YYYY-MM-DD')) { + cname += ' end-date '; + } + } else if (calendar[row][col] >= this.startDate && calendar[row][col] <= this.endDate) { + cname += ' in-range '; + if (calendar[row][col].isSame(this.startDate)) { cname += ' start-date '; } + if (calendar[row][col].isSame(this.endDate)) { cname += ' end-date '; } + } + + var title = 'r' + row + 'c' + col; + html += ''; + } + html += ''; + } + + html += ''; + html += '
    ' + dateHtml + '
    ' + this.locale.weekLabel + '' + dayOfWeek + '
    ' + calendar[row][0].week() + '' + calendar[row][col].date() + '
    '; + html += '
    '; + + var i; + if (this.timePicker) { + + html += '
    '; + html += ' : '; + + html += ' '; + + if (this.timePickerSeconds) { + html += ': '; + } + + if (this.timePicker12Hour) { + html += ''; + } + + html += '
    '; + + } + + return html; + + }, + + remove: function() { + + this.container.remove(); + this.element.off('.daterangepicker'); + this.element.removeData('daterangepicker'); + + } + + }; + + $.fn.daterangepicker = function (options, cb) { + this.each(function () { + var el = $(this); + if (el.data('daterangepicker')) + el.data('daterangepicker').remove(); + el.data('daterangepicker', new DateRangePicker(el, options, cb)); + }); + return this; + }; + +})); diff --git a/libraries/daterange/moment.min.js b/libraries/daterange/moment.min.js new file mode 100644 index 0000000..c30bbff --- /dev/null +++ b/libraries/daterange/moment.min.js @@ -0,0 +1,6 @@ +//! moment.js +//! version : 2.8.1 +//! authors : Tim Wood, Iskren Chernev, Moment.js contributors +//! license : MIT +//! momentjs.com +(function(a){function b(a,b,c){switch(arguments.length){case 2:return null!=a?a:b;case 3:return null!=a?a:null!=b?b:c;default:throw new Error("Implement me")}}function c(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function d(a){rb.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+a)}function e(a,b){var c=!0;return l(function(){return c&&(d(a),c=!1),b.apply(this,arguments)},b)}function f(a,b){nc[a]||(d(b),nc[a]=!0)}function g(a,b){return function(c){return o(a.call(this,c),b)}}function h(a,b){return function(c){return this.localeData().ordinal(a.call(this,c),b)}}function i(){}function j(a,b){b!==!1&&E(a),m(this,a),this._d=new Date(+a._d)}function k(a){var b=x(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+1e3*j+6e4*i+36e5*h,this._days=+g+7*f,this._months=+e+3*d+12*c,this._data={},this._locale=rb.localeData(),this._bubble()}function l(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return b.hasOwnProperty("toString")&&(a.toString=b.toString),b.hasOwnProperty("valueOf")&&(a.valueOf=b.valueOf),a}function m(a,b){var c,d,e;if("undefined"!=typeof b._isAMomentObject&&(a._isAMomentObject=b._isAMomentObject),"undefined"!=typeof b._i&&(a._i=b._i),"undefined"!=typeof b._f&&(a._f=b._f),"undefined"!=typeof b._l&&(a._l=b._l),"undefined"!=typeof b._strict&&(a._strict=b._strict),"undefined"!=typeof b._tzm&&(a._tzm=b._tzm),"undefined"!=typeof b._isUTC&&(a._isUTC=b._isUTC),"undefined"!=typeof b._offset&&(a._offset=b._offset),"undefined"!=typeof b._pf&&(a._pf=b._pf),"undefined"!=typeof b._locale&&(a._locale=b._locale),Fb.length>0)for(c in Fb)d=Fb[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function n(a){return 0>a?Math.ceil(a):Math.floor(a)}function o(a,b,c){for(var d=""+Math.abs(a),e=a>=0;d.lengthd;d++)(c&&a[d]!==b[d]||!c&&z(a[d])!==z(b[d]))&&g++;return g+f}function w(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=gc[a]||hc[b]||b}return a}function x(a){var b,c,d={};for(c in a)a.hasOwnProperty(c)&&(b=w(c),b&&(d[b]=a[c]));return d}function y(b){var c,d;if(0===b.indexOf("week"))c=7,d="day";else{if(0!==b.indexOf("month"))return;c=12,d="month"}rb[b]=function(e,f){var g,h,i=rb._locale[b],j=[];if("number"==typeof e&&(f=e,e=a),h=function(a){var b=rb().utc().set(d,a);return i.call(rb._locale,b,e||"")},null!=f)return h(f);for(g=0;c>g;g++)j.push(h(g));return j}}function z(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function A(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function B(a,b,c){return fb(rb([a,11,31+b-c]),b,c).week}function C(a){return D(a)?366:365}function D(a){return a%4===0&&a%100!==0||a%400===0}function E(a){var b;a._a&&-2===a._pf.overflow&&(b=a._a[yb]<0||a._a[yb]>11?yb:a._a[zb]<1||a._a[zb]>A(a._a[xb],a._a[yb])?zb:a._a[Ab]<0||a._a[Ab]>23?Ab:a._a[Bb]<0||a._a[Bb]>59?Bb:a._a[Cb]<0||a._a[Cb]>59?Cb:a._a[Db]<0||a._a[Db]>999?Db:-1,a._pf._overflowDayOfYear&&(xb>b||b>zb)&&(b=zb),a._pf.overflow=b)}function F(a){return null==a._isValid&&(a._isValid=!isNaN(a._d.getTime())&&a._pf.overflow<0&&!a._pf.empty&&!a._pf.invalidMonth&&!a._pf.nullInput&&!a._pf.invalidFormat&&!a._pf.userInvalidated,a._strict&&(a._isValid=a._isValid&&0===a._pf.charsLeftOver&&0===a._pf.unusedTokens.length)),a._isValid}function G(a){return a?a.toLowerCase().replace("_","-"):a}function H(a){for(var b,c,d,e,f=0;f0;){if(d=I(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&v(e,c,!0)>=b-1)break;b--}f++}return null}function I(a){var b=null;if(!Eb[a]&&Gb)try{b=rb.locale(),require("./locale/"+a),rb.locale(b)}catch(c){}return Eb[a]}function J(a,b){return b._isUTC?rb(a).zone(b._offset||0):rb(a).local()}function K(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function L(a){var b,c,d=a.match(Kb);for(b=0,c=d.length;c>b;b++)d[b]=mc[d[b]]?mc[d[b]]:K(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function M(a,b){return a.isValid()?(b=N(b,a.localeData()),ic[b]||(ic[b]=L(b)),ic[b](a)):a.localeData().invalidDate()}function N(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Lb.lastIndex=0;d>=0&&Lb.test(a);)a=a.replace(Lb,c),Lb.lastIndex=0,d-=1;return a}function O(a,b){var c,d=b._strict;switch(a){case"Q":return Wb;case"DDDD":return Yb;case"YYYY":case"GGGG":case"gggg":return d?Zb:Ob;case"Y":case"G":case"g":return _b;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return d?$b:Pb;case"S":if(d)return Wb;case"SS":if(d)return Xb;case"SSS":if(d)return Yb;case"DDD":return Nb;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Rb;case"a":case"A":return b._locale._meridiemParse;case"X":return Ub;case"Z":case"ZZ":return Sb;case"T":return Tb;case"SSSS":return Qb;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return d?Xb:Mb;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Mb;case"Do":return Vb;default:return c=new RegExp(X(W(a.replace("\\","")),"i"))}}function P(a){a=a||"";var b=a.match(Sb)||[],c=b[b.length-1]||[],d=(c+"").match(ec)||["-",0,0],e=+(60*d[1])+z(d[2]);return"+"===d[0]?-e:e}function Q(a,b,c){var d,e=c._a;switch(a){case"Q":null!=b&&(e[yb]=3*(z(b)-1));break;case"M":case"MM":null!=b&&(e[yb]=z(b)-1);break;case"MMM":case"MMMM":d=c._locale.monthsParse(b),null!=d?e[yb]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[zb]=z(b));break;case"Do":null!=b&&(e[zb]=z(parseInt(b,10)));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=z(b));break;case"YY":e[xb]=rb.parseTwoDigitYear(b);break;case"YYYY":case"YYYYY":case"YYYYYY":e[xb]=z(b);break;case"a":case"A":c._isPm=c._locale.isPM(b);break;case"H":case"HH":case"h":case"hh":e[Ab]=z(b);break;case"m":case"mm":e[Bb]=z(b);break;case"s":case"ss":e[Cb]=z(b);break;case"S":case"SS":case"SSS":case"SSSS":e[Db]=z(1e3*("0."+b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=P(b);break;case"dd":case"ddd":case"dddd":d=c._locale.weekdaysParse(b),null!=d?(c._w=c._w||{},c._w.d=d):c._pf.invalidWeekday=b;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":a=a.substr(0,1);case"gggg":case"GGGG":case"GGGGG":a=a.substr(0,2),b&&(c._w=c._w||{},c._w[a]=z(b));break;case"gg":case"GG":c._w=c._w||{},c._w[a]=rb.parseTwoDigitYear(b)}}function R(a){var c,d,e,f,g,h,i;c=a._w,null!=c.GG||null!=c.W||null!=c.E?(g=1,h=4,d=b(c.GG,a._a[xb],fb(rb(),1,4).year),e=b(c.W,1),f=b(c.E,1)):(g=a._locale._week.dow,h=a._locale._week.doy,d=b(c.gg,a._a[xb],fb(rb(),g,h).year),e=b(c.w,1),null!=c.d?(f=c.d,g>f&&++e):f=null!=c.e?c.e+g:g),i=gb(d,e,f,h,g),a._a[xb]=i.year,a._dayOfYear=i.dayOfYear}function S(a){var c,d,e,f,g=[];if(!a._d){for(e=U(a),a._w&&null==a._a[zb]&&null==a._a[yb]&&R(a),a._dayOfYear&&(f=b(a._a[xb],e[xb]),a._dayOfYear>C(f)&&(a._pf._overflowDayOfYear=!0),d=bb(f,0,a._dayOfYear),a._a[yb]=d.getUTCMonth(),a._a[zb]=d.getUTCDate()),c=0;3>c&&null==a._a[c];++c)a._a[c]=g[c]=e[c];for(;7>c;c++)a._a[c]=g[c]=null==a._a[c]?2===c?1:0:a._a[c];a._d=(a._useUTC?bb:ab).apply(null,g),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()+a._tzm)}}function T(a){var b;a._d||(b=x(a._i),a._a=[b.year,b.month,b.day,b.hour,b.minute,b.second,b.millisecond],S(a))}function U(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function V(a){if(a._f===rb.ISO_8601)return void Z(a);a._a=[],a._pf.empty=!0;var b,c,d,e,f,g=""+a._i,h=g.length,i=0;for(d=N(a._f,a._locale).match(Kb)||[],b=0;b0&&a._pf.unusedInput.push(f),g=g.slice(g.indexOf(c)+c.length),i+=c.length),mc[e]?(c?a._pf.empty=!1:a._pf.unusedTokens.push(e),Q(e,c,a)):a._strict&&!c&&a._pf.unusedTokens.push(e);a._pf.charsLeftOver=h-i,g.length>0&&a._pf.unusedInput.push(g),a._isPm&&a._a[Ab]<12&&(a._a[Ab]+=12),a._isPm===!1&&12===a._a[Ab]&&(a._a[Ab]=0),S(a),E(a)}function W(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function X(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Y(a){var b,d,e,f,g;if(0===a._f.length)return a._pf.invalidFormat=!0,void(a._d=new Date(0/0));for(f=0;fg)&&(e=g,d=b));l(a,d||b)}function Z(a){var b,c,d=a._i,e=ac.exec(d);if(e){for(a._pf.iso=!0,b=0,c=cc.length;c>b;b++)if(cc[b][1].exec(d)){a._f=cc[b][0]+(e[6]||" ");break}for(b=0,c=dc.length;c>b;b++)if(dc[b][1].exec(d)){a._f+=dc[b][0];break}d.match(Sb)&&(a._f+="Z"),V(a)}else a._isValid=!1}function $(a){Z(a),a._isValid===!1&&(delete a._isValid,rb.createFromInputFallback(a))}function _(b){var c,d=b._i;d===a?b._d=new Date:u(d)?b._d=new Date(+d):null!==(c=Hb.exec(d))?b._d=new Date(+c[1]):"string"==typeof d?$(b):t(d)?(b._a=d.slice(0),S(b)):"object"==typeof d?T(b):"number"==typeof d?b._d=new Date(d):rb.createFromInputFallback(b)}function ab(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 1970>a&&h.setFullYear(a),h}function bb(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function cb(a,b){if("string"==typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function db(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function eb(a,b,c){var d=rb.duration(a).abs(),e=wb(d.as("s")),f=wb(d.as("m")),g=wb(d.as("h")),h=wb(d.as("d")),i=wb(d.as("M")),j=wb(d.as("y")),k=e0,k[4]=c,db.apply({},k)}function fb(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=rb(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function gb(a,b,c,d,e){var f,g,h=bb(a,0,1).getUTCDay();return h=0===h?7:h,c=null!=c?c:e,f=e-h+(h>d?7:0)-(e>h?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:C(a-1)+g}}function hb(b){var c=b._i,d=b._f;return b._locale=b._locale||rb.localeData(b._l),null===c||d===a&&""===c?rb.invalid({nullInput:!0}):("string"==typeof c&&(b._i=c=b._locale.preparse(c)),rb.isMoment(c)?new j(c,!0):(d?t(d)?Y(b):V(b):_(b),new j(b)))}function ib(a,b){var c,d;if(1===b.length&&t(b[0])&&(b=b[0]),!b.length)return rb();for(c=b[0],d=1;d=0?"+":"-";return b+o(Math.abs(a),6)},gg:function(){return o(this.weekYear()%100,2)},gggg:function(){return o(this.weekYear(),4)},ggggg:function(){return o(this.weekYear(),5)},GG:function(){return o(this.isoWeekYear()%100,2)},GGGG:function(){return o(this.isoWeekYear(),4)},GGGGG:function(){return o(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return z(this.milliseconds()/100)},SS:function(){return o(z(this.milliseconds()/10),2)},SSS:function(){return o(this.milliseconds(),3)},SSSS:function(){return o(this.milliseconds(),3)},Z:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+o(z(a/60),2)+":"+o(z(a)%60,2)},ZZ:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+o(z(a/60),2)+o(z(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()},Q:function(){return this.quarter()}},nc={},oc=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];kc.length;)tb=kc.pop(),mc[tb+"o"]=h(mc[tb],tb);for(;lc.length;)tb=lc.pop(),mc[tb+tb]=g(mc[tb],2);mc.DDDD=g(mc.DDD,3),l(i.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a){var b,c,d;for(this._monthsParse||(this._monthsParse=[]),b=0;12>b;b++)if(this._monthsParse[b]||(c=rb.utc([2e3,b]),d="^"+this.months(c,"")+"|^"+this.monthsShort(c,""),this._monthsParse[b]=new RegExp(d.replace(".",""),"i")),this._monthsParse[b].test(a))return b},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=rb([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b){var c=this._calendar[a];return"function"==typeof c?c.apply(b):c},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",preparse:function(a){return a},postformat:function(a){return a},week:function(a){return fb(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),rb=function(b,d,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._i=b,g._f=d,g._l=e,g._strict=f,g._isUTC=!1,g._pf=c(),hb(g)},rb.suppressDeprecationWarnings=!1,rb.createFromInputFallback=e("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i)}),rb.min=function(){var a=[].slice.call(arguments,0);return ib("isBefore",a)},rb.max=function(){var a=[].slice.call(arguments,0);return ib("isAfter",a)},rb.utc=function(b,d,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._useUTC=!0,g._isUTC=!0,g._l=e,g._i=b,g._f=d,g._strict=f,g._pf=c(),hb(g).utc()},rb.unix=function(a){return rb(1e3*a)},rb.duration=function(a,b){var c,d,e,f,g=a,h=null;return rb.isDuration(a)?g={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(g={},b?g[b]=a:g.milliseconds=a):(h=Ib.exec(a))?(c="-"===h[1]?-1:1,g={y:0,d:z(h[zb])*c,h:z(h[Ab])*c,m:z(h[Bb])*c,s:z(h[Cb])*c,ms:z(h[Db])*c}):(h=Jb.exec(a))?(c="-"===h[1]?-1:1,e=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*c},g={y:e(h[2]),M:e(h[3]),d:e(h[4]),h:e(h[5]),m:e(h[6]),s:e(h[7]),w:e(h[8])}):"object"==typeof g&&("from"in g||"to"in g)&&(f=q(rb(g.from),rb(g.to)),g={},g.ms=f.milliseconds,g.M=f.months),d=new k(g),rb.isDuration(a)&&a.hasOwnProperty("_locale")&&(d._locale=a._locale),d},rb.version=ub,rb.defaultFormat=bc,rb.ISO_8601=function(){},rb.momentProperties=Fb,rb.updateOffset=function(){},rb.relativeTimeThreshold=function(b,c){return jc[b]===a?!1:c===a?jc[b]:(jc[b]=c,!0)},rb.lang=e("moment.lang is deprecated. Use moment.locale instead.",function(a,b){return rb.locale(a,b)}),rb.locale=function(a,b){var c;return a&&(c="undefined"!=typeof b?rb.defineLocale(a,b):rb.localeData(a),c&&(rb.duration._locale=rb._locale=c)),rb._locale._abbr},rb.defineLocale=function(a,b){return null!==b?(b.abbr=a,Eb[a]||(Eb[a]=new i),Eb[a].set(b),rb.locale(a),Eb[a]):(delete Eb[a],null)},rb.langData=e("moment.langData is deprecated. Use moment.localeData instead.",function(a){return rb.localeData(a)}),rb.localeData=function(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return rb._locale;if(!t(a)){if(b=I(a))return b;a=[a]}return H(a)},rb.isMoment=function(a){return a instanceof j||null!=a&&a.hasOwnProperty("_isAMomentObject")},rb.isDuration=function(a){return a instanceof k};for(tb=oc.length-1;tb>=0;--tb)y(oc[tb]);rb.normalizeUnits=function(a){return w(a)},rb.invalid=function(a){var b=rb.utc(0/0);return null!=a?l(b._pf,a):b._pf.userInvalidated=!0,b},rb.parseZone=function(){return rb.apply(null,arguments).parseZone()},rb.parseTwoDigitYear=function(a){return z(a)+(z(a)>68?1900:2e3)},l(rb.fn=j.prototype,{clone:function(){return rb(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var a=rb(this).utc();return 00:!1},parsingFlags:function(){return l({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(a){return this.zone(0,a)},local:function(a){return this._isUTC&&(this.zone(0,a),this._isUTC=!1,a&&this.add(this._d.getTimezoneOffset(),"m")),this},format:function(a){var b=M(this,a||rb.defaultFormat);return this.localeData().postformat(b)},add:r(1,"add"),subtract:r(-1,"subtract"),diff:function(a,b,c){var d,e,f=J(a,this),g=6e4*(this.zone()-f.zone());return b=w(b),"year"===b||"month"===b?(d=432e5*(this.daysInMonth()+f.daysInMonth()),e=12*(this.year()-f.year())+(this.month()-f.month()),e+=(this-rb(this).startOf("month")-(f-rb(f).startOf("month")))/d,e-=6e4*(this.zone()-rb(this).startOf("month").zone()-(f.zone()-rb(f).startOf("month").zone()))/d,"year"===b&&(e/=12)):(d=this-f,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-g)/864e5:"week"===b?(d-g)/6048e5:d),c?e:n(e)},from:function(a,b){return rb.duration({to:this,from:a}).locale(this.locale()).humanize(!b)},fromNow:function(a){return this.from(rb(),a)},calendar:function(a){var b=a||rb(),c=J(b,this).startOf("day"),d=this.diff(c,"days",!0),e=-6>d?"sameElse":-1>d?"lastWeek":0>d?"lastDay":1>d?"sameDay":2>d?"nextDay":7>d?"nextWeek":"sameElse";return this.format(this.localeData().calendar(e,this))},isLeapYear:function(){return D(this.year())},isDST:function(){return this.zone()+rb(a).startOf(b)},isBefore:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)<+rb(a).startOf(b)},isSame:function(a,b){return b=b||"ms",+this.clone().startOf(b)===+J(a,this).startOf(b)},min:e("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(a){return a=rb.apply(null,arguments),this>a?this:a}),max:e("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(a){return a=rb.apply(null,arguments),a>this?this:a}),zone:function(a,b){var c,d=this._offset||0;return null==a?this._isUTC?d:this._d.getTimezoneOffset():("string"==typeof a&&(a=P(a)),Math.abs(a)<16&&(a=60*a),!this._isUTC&&b&&(c=this._d.getTimezoneOffset()),this._offset=a,this._isUTC=!0,null!=c&&this.subtract(c,"m"),d!==a&&(!b||this._changeInProgress?s(this,rb.duration(d-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,rb.updateOffset(this,!0),this._changeInProgress=null)),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.zone(this._tzm):"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(a){return a=a?rb(a).zone():0,(this.zone()-a)%60===0},daysInMonth:function(){return A(this.year(),this.month())},dayOfYear:function(a){var b=wb((rb(this).startOf("day")-rb(this).startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")},quarter:function(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)},weekYear:function(a){var b=fb(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==a?b:this.add(a-b,"y")},isoWeekYear:function(a){var b=fb(this,1,4).year;return null==a?b:this.add(a-b,"y")},week:function(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")},isoWeek:function(a){var b=fb(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")},weekday:function(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},isoWeeksInYear:function(){return B(this.year(),1,4)},weeksInYear:function(){var a=this.localeData()._week;return B(this.year(),a.dow,a.doy)},get:function(a){return a=w(a),this[a]()},set:function(a,b){return a=w(a),"function"==typeof this[a]&&this[a](b),this},locale:function(b){return b===a?this._locale._abbr:(this._locale=rb.localeData(b),this)},lang:e("moment().lang() is deprecated. Use moment().localeData() instead.",function(b){return b===a?this.localeData():(this._locale=rb.localeData(b),this)}),localeData:function(){return this._locale}}),rb.fn.millisecond=rb.fn.milliseconds=mb("Milliseconds",!1),rb.fn.second=rb.fn.seconds=mb("Seconds",!1),rb.fn.minute=rb.fn.minutes=mb("Minutes",!1),rb.fn.hour=rb.fn.hours=mb("Hours",!0),rb.fn.date=mb("Date",!0),rb.fn.dates=e("dates accessor is deprecated. Use date instead.",mb("Date",!0)),rb.fn.year=mb("FullYear",!0),rb.fn.years=e("years accessor is deprecated. Use year instead.",mb("FullYear",!0)),rb.fn.days=rb.fn.day,rb.fn.months=rb.fn.month,rb.fn.weeks=rb.fn.week,rb.fn.isoWeeks=rb.fn.isoWeek,rb.fn.quarters=rb.fn.quarter,rb.fn.toJSON=rb.fn.toISOString,l(rb.duration.fn=k.prototype,{_bubble:function(){var a,b,c,d=this._milliseconds,e=this._days,f=this._months,g=this._data,h=0;g.milliseconds=d%1e3,a=n(d/1e3),g.seconds=a%60,b=n(a/60),g.minutes=b%60,c=n(b/60),g.hours=c%24,e+=n(c/24),h=n(nb(e)),e-=n(ob(h)),f+=n(e/30),e%=30,h+=n(f/12),f%=12,g.days=e,g.months=f,g.years=h},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return n(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*z(this._months/12)},humanize:function(a){var b=eb(this,!a,this.localeData());return a&&(b=this.localeData().pastFuture(+this,b)),this.localeData().postformat(b)},add:function(a,b){var c=rb.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=rb.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=w(a),this[a.toLowerCase()+"s"]()},as:function(a){var b,c;if(a=w(a),b=this._days+this._milliseconds/864e5,"month"===a||"year"===a)return c=this._months+12*nb(b),"month"===a?c:c/12;switch(b+=ob(this._months/12),a){case"week":return b/7;case"day":return b;case"hour":return 24*b;case"minute":return 24*b*60;case"second":return 24*b*60*60;case"millisecond":return 24*b*60*60*1e3;default:throw new Error("Unknown unit "+a)}},lang:rb.fn.lang,locale:rb.fn.locale,toIsoString:e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"},localeData:function(){return this._locale}});for(tb in fc)fc.hasOwnProperty(tb)&&pb(tb.toLowerCase());rb.duration.fn.asMilliseconds=function(){return this.as("ms")},rb.duration.fn.asSeconds=function(){return this.as("s")},rb.duration.fn.asMinutes=function(){return this.as("m")},rb.duration.fn.asHours=function(){return this.as("h")},rb.duration.fn.asDays=function(){return this.as("d")},rb.duration.fn.asWeeks=function(){return this.as("weeks")},rb.duration.fn.asMonths=function(){return this.as("M")},rb.duration.fn.asYears=function(){return this.as("y")},rb.locale("en",{ordinal:function(a){var b=a%10,c=1===z(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),Gb?module.exports=rb:"function"==typeof define&&define.amd?(define("moment",function(a,b,c){return c.config&&c.config()&&c.config().noGlobal===!0&&(vb.moment=sb),rb}),qb(!0)):qb()}).call(this); \ No newline at end of file diff --git a/libraries/filemanager-9.14.1/UploadHandler.php b/libraries/filemanager-9.14.1/UploadHandler.php new file mode 100644 index 0000000..a45ea14 --- /dev/null +++ b/libraries/filemanager-9.14.1/UploadHandler.php @@ -0,0 +1,1595 @@ + 'The uploaded file exceeds the upload_max_filesize directive in php.ini', + 2 => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form', + 3 => 'The uploaded file was only partially uploaded', + 4 => 'No file was uploaded', + 6 => 'Missing a temporary folder', + 7 => 'Failed to write file to disk', + 8 => 'A PHP extension stopped the file upload', + 'post_max_size' => 'The uploaded file exceeds the post_max_size directive in php.ini', + 'max_file_size' => 'File is too big', + 'min_file_size' => 'File is too small', + 'accept_file_types' => 'Filetype not allowed', + 'max_number_of_files' => 'Maximum number of files exceeded', + 'max_width' => 'Image exceeds maximum width', + 'min_width' => 'Image requires a minimum width', + 'max_height' => 'Image exceeds maximum height', + 'min_height' => 'Image requires a minimum height', + 'abort' => 'File upload aborted', + 'image_resize' => 'Failed to resize image' + ); + + const IMAGETYPE_GIF = 1; + const IMAGETYPE_JPEG = 2; + const IMAGETYPE_PNG = 3; + + protected $image_objects = array(); + + public function __construct($options = null, $initialize = true, $error_messages = null) { + $this->response = array(); + $this->options = array( + 'script_url' => $this->get_full_url().'/'.$this->basename($this->get_server_var('SCRIPT_NAME')), + 'upload_dir' => dirname($this->get_server_var('SCRIPT_FILENAME')).'/files/', + 'upload_url' => $this->get_full_url().'/files/', + 'input_stream' => 'php://input', + 'user_dirs' => false, + 'mkdir_mode' => 0755, + 'param_name' => 'files', + // Set the following option to 'POST', if your server does not support + // DELETE requests. This is a parameter sent to the client: + 'delete_type' => 'DELETE', + 'access_control_allow_origin' => '*', + 'access_control_allow_credentials' => false, + 'access_control_allow_methods' => array( + 'OPTIONS', + 'HEAD', + 'GET', + 'POST', + 'PUT', + 'PATCH', + 'DELETE' + ), + 'access_control_allow_headers' => array( + 'Content-Type', + 'Content-Range', + 'Content-Disposition' + ), + // By default, allow redirects to the referer protocol+host: + 'redirect_allow_target' => '/^'.preg_quote( + parse_url($this->get_server_var('HTTP_REFERER'), PHP_URL_SCHEME) + .'://' + .parse_url($this->get_server_var('HTTP_REFERER'), PHP_URL_HOST) + .'/', // Trailing slash to not match subdomains by mistake + '/' // preg_quote delimiter param + ).'/', + // Enable to provide file downloads via GET requests to the PHP script: + // 1. Set to 1 to download files via readfile method through PHP + // 2. Set to 2 to send a X-Sendfile header for lighttpd/Apache + // 3. Set to 3 to send a X-Accel-Redirect header for nginx + // If set to 2 or 3, adjust the upload_url option to the base path of + // the redirect parameter, e.g. '/files/'. + 'download_via_php' => false, + // Read files in chunks to avoid memory limits when download_via_php + // is enabled, set to 0 to disable chunked reading of files: + 'readfile_chunk_size' => 10 * 1024 * 1024, // 10 MiB + // Defines which files can be displayed inline when downloaded: + 'inline_file_types' => '/\.(gif|jpe?g|png)$/i', + // Defines which files (based on their names) are accepted for upload. + // By default, only allows file uploads with image file extensions. + // Only change this setting after making sure that any allowed file + // types cannot be executed by the webserver in the files directory, + // e.g. PHP scripts, nor executed by the browser when downloaded, + // e.g. HTML files with embedded JavaScript code. + // Please also read the SECURITY.md document in this repository. + 'accept_file_types' => '/\.(gif|jpe?g|png)$/i', + // Replaces dots in filenames with the given string. + // Can be disabled by setting it to false or an empty string. + // Note that this is a security feature for servers that support + // multiple file extensions, e.g. the Apache AddHandler Directive: + // https://httpd.apache.org/docs/current/mod/mod_mime.html#addhandler + // Before disabling it, make sure that files uploaded with multiple + // extensions cannot be executed by the webserver, e.g. + // "example.php.png" with embedded PHP code, nor executed by the + // browser when downloaded, e.g. "example.html.gif" with embedded + // JavaScript code. + 'replace_dots_in_filenames' => '-', + // The php.ini settings upload_max_filesize and post_max_size + // take precedence over the following max_file_size setting: + 'max_file_size' => null, + 'min_file_size' => 1, + // The maximum number of files for the upload directory: + 'max_number_of_files' => null, + // Reads first file bytes to identify and correct file extensions: + 'correct_image_extensions' => false, + // Image resolution restrictions: + 'max_width' => null, + 'max_height' => null, + 'min_width' => 1, + 'min_height' => 1, + // Set the following option to false to enable resumable uploads: + 'discard_aborted_uploads' => true, + // Set to 0 to use the GD library to scale and orient images, + // set to 1 to use imagick (if installed, falls back to GD), + // set to 2 to use the ImageMagick convert binary directly: + 'image_library' => 1, + // Uncomment the following to define an array of resource limits + // for imagick: + /* + 'imagick_resource_limits' => array( + imagick::RESOURCETYPE_MAP => 32, + imagick::RESOURCETYPE_MEMORY => 32 + ), + */ + // Command or path for to the ImageMagick convert binary: + 'convert_bin' => 'convert', + // Uncomment the following to add parameters in front of each + // ImageMagick convert call (the limit constraints seem only + // to have an effect if put in front): + /* + 'convert_params' => '-limit memory 32MiB -limit map 32MiB', + */ + // Command or path for to the ImageMagick identify binary: + 'identify_bin' => 'identify', + 'image_versions' => array( + // The empty image version key defines options for the original image. + // Keep in mind: these image manipulations are inherited by all other image versions from this point onwards. + // Also note that the property 'no_cache' is not inherited, since it's not a manipulation. + '' => array( + // Automatically rotate images based on EXIF meta data: + 'auto_orient' => true + ), + // You can add arrays to generate different versions. + // The name of the key is the name of the version (example: 'medium'). + // the array contains the options to apply. + /* + 'medium' => array( + 'max_width' => 800, + 'max_height' => 600 + ), + */ + //'thumbnail' => array( + // Uncomment the following to use a defined directory for the thumbnails + // instead of a subdirectory based on the version identifier. + // Make sure that this directory doesn't allow execution of files if you + // don't pose any restrictions on the type of uploaded files, e.g. by + // copying the .htaccess file from the files directory for Apache: + //'upload_dir' => dirname($this->get_server_var('SCRIPT_FILENAME')).'/thumb/', + //'upload_url' => $this->get_full_url().'/thumb/', + // Uncomment the following to force the max + // dimensions and e.g. create square thumbnails: + // 'auto_orient' => true, + // 'crop' => true, + // 'jpeg_quality' => 70, + // 'no_cache' => true, (there's a caching option, but this remembers thumbnail sizes from a previous action!) + // 'strip' => true, (this strips EXIF tags, such as geolocation) + // 'max_width' => 80, // either specify width, or set to 0. Then width is automatically adjusted - keeping aspect ratio to a specified max_height. + // 'max_height' => 80 // either specify height, or set to 0. Then height is automatically adjusted - keeping aspect ratio to a specified max_width. + // ) + ), + 'print_response' => true + ); + if ($options) { + $this->options = $options + $this->options; + } + if ($error_messages) { + $this->error_messages = $error_messages + $this->error_messages; + } + if ($initialize) { + $this->initialize(); + } + } + + protected function initialize() { + switch ($this->get_server_var('REQUEST_METHOD')) { + case 'OPTIONS': + case 'HEAD': + $this->head(); + break; + case 'GET': + $this->get($this->options['print_response']); + break; + case 'PATCH': + case 'PUT': + case 'POST': + $this->post($this->options['print_response']); + break; + case 'DELETE': + $this->delete($this->options['print_response']); + break; + default: + $this->header('HTTP/1.1 405 Method Not Allowed'); + } + } + + protected function get_full_url() { + $https = !empty($_SERVER['HTTPS']) && strcasecmp($_SERVER['HTTPS'], 'on') === 0 || + !empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && + strcasecmp($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') === 0; + return + ($https ? 'https://' : 'http://'). + (!empty($_SERVER['REMOTE_USER']) ? $_SERVER['REMOTE_USER'].'@' : ''). + (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ($_SERVER['SERVER_NAME']. + ($https && $_SERVER['SERVER_PORT'] === 443 || + $_SERVER['SERVER_PORT'] === 80 ? '' : ':'.$_SERVER['SERVER_PORT']))). + substr($_SERVER['SCRIPT_NAME'],0, strrpos($_SERVER['SCRIPT_NAME'], '/')); + } + + protected function get_user_id() { + @session_start(); + return session_id(); + } + + protected function get_user_path() { + if ($this->options['user_dirs']) { + return $this->get_user_id().'/'; + } + return ''; + } + + protected function get_upload_path($file_name = null, $version = null) { + $file_name = $file_name ? $file_name : ''; + if (empty($version)) { + $version_path = ''; + } else { + $version_dir = @$this->options['image_versions'][$version]['upload_dir']; + if ($version_dir) { + return $version_dir.$this->get_user_path().$file_name; + } + $version_path = $version.'/'; + } + return $this->options['upload_dir'].$this->get_user_path() + .$version_path.$file_name; + } + + protected function get_query_separator($url) { + return strpos($url, '?') === false ? '?' : '&'; + } + + protected function get_download_url($file_name, $version = null, $direct = false) { + if (!$direct && $this->options['download_via_php']) { + $url = $this->options['script_url'] + .$this->get_query_separator($this->options['script_url']) + .$this->get_singular_param_name() + .'='.rawurlencode($file_name); + if ($version) { + $url .= '&version='.rawurlencode($version); + } + return $url.'&download=1'; + } + if (empty($version)) { + $version_path = ''; + } else { + $version_url = @$this->options['image_versions'][$version]['upload_url']; + if ($version_url) { + return $version_url.$this->get_user_path().rawurlencode($file_name); + } + $version_path = rawurlencode($version).'/'; + } + return $this->options['upload_url'].$this->get_user_path() + .$version_path.rawurlencode($file_name); + } + + protected function set_additional_file_properties($file) { + $file->deleteUrl = $this->options['script_url'] + .$this->get_query_separator($this->options['script_url']) + .$this->get_singular_param_name() + .'='.rawurlencode($file->name); + $file->deleteType = $this->options['delete_type']; + if ($file->deleteType !== 'DELETE') { + $file->deleteUrl .= '&_method=DELETE'; + } + if ($this->options['access_control_allow_credentials']) { + $file->deleteWithCredentials = true; + } + } + + // Fix for overflowing signed 32 bit integers, + // works for sizes up to 2^32-1 bytes (4 GiB - 1): + protected function fix_integer_overflow($size) { + if ($size < 0) { + $size += 2.0 * (PHP_INT_MAX + 1); + } + return $size; + } + + protected function get_file_size($file_path, $clear_stat_cache = false) { + if ($clear_stat_cache) { + if (version_compare(PHP_VERSION, '5.3.0') >= 0) { + clearstatcache(true, $file_path); + } else { + clearstatcache(); + } + } + return $this->fix_integer_overflow(filesize($file_path)); + } + + protected function is_valid_file_object($file_name) { + $file_path = $this->get_upload_path($file_name); + if (is_file($file_path) && $file_name[0] !== '.') { + return true; + } + return false; + } + + protected function get_file_object($file_name) { + if ($this->is_valid_file_object($file_name)) { + $file = new \stdClass(); + $file->name = $file_name; + $file->size = $this->get_file_size( + $this->get_upload_path($file_name) + ); + $file->url = $this->get_download_url($file->name); + foreach ($this->options['image_versions'] as $version => $options) { + if (!empty($version)) { + if (is_file($this->get_upload_path($file_name, $version))) { + $file->{$version.'Url'} = $this->get_download_url( + $file->name, + $version + ); + } + } + } + $this->set_additional_file_properties($file); + return $file; + } + return null; + } + + protected function get_file_objects($iteration_method = 'get_file_object') { + $upload_dir = $this->get_upload_path(); + if (!is_dir($upload_dir)) { + return array(); + } + return array_values(array_filter(array_map( + array($this, $iteration_method), + scandir($upload_dir) + ))); + } + + protected function count_file_objects() { + return count($this->get_file_objects('is_valid_file_object')); + } + + protected function get_error_message($error) { + return isset($this->error_messages[$error]) ? + $this->error_messages[$error] : $error; + } + + public function get_config_bytes($val) { + $val = trim($val); + $last = strtolower($val[strlen($val)-1]); + $val = (int)$val; + switch ($last) { + case 'g': + $val *= 1024; + case 'm': + $val *= 1024; + case 'k': + $val *= 1024; + } + return $this->fix_integer_overflow($val); + } + + protected function validate($uploaded_file, $file, $error, $index) { + if ($error) { + $file->error = $this->get_error_message($error); + return false; + } + $content_length = $this->fix_integer_overflow( + (int)$this->get_server_var('CONTENT_LENGTH') + ); + $post_max_size = $this->get_config_bytes(ini_get('post_max_size')); + if ($post_max_size && ($content_length > $post_max_size)) { + $file->error = $this->get_error_message('post_max_size'); + return false; + } + if (!preg_match($this->options['accept_file_types'], $file->name)) { + $file->error = $this->get_error_message('accept_file_types'); + return false; + } + if ($uploaded_file && is_uploaded_file($uploaded_file)) { + $file_size = $this->get_file_size($uploaded_file); + } else { + $file_size = $content_length; + } + if ($this->options['max_file_size'] && ( + $file_size > $this->options['max_file_size'] || + $file->size > $this->options['max_file_size']) + ) { + $file->error = $this->get_error_message('max_file_size'); + return false; + } + if ($this->options['min_file_size'] && + $file_size < $this->options['min_file_size']) { + $file->error = $this->get_error_message('min_file_size'); + return false; + } + if (is_int($this->options['max_number_of_files']) && + ($this->count_file_objects() >= $this->options['max_number_of_files']) && + // Ignore additional chunks of existing files: + !is_file($this->get_upload_path($file->name))) { + $file->error = $this->get_error_message('max_number_of_files'); + return false; + } + $max_width = @$this->options['max_width']; + $max_height = @$this->options['max_height']; + $min_width = @$this->options['min_width']; + $min_height = @$this->options['min_height']; + if (($max_width || $max_height || $min_width || $min_height) + && $this->is_valid_image_file($uploaded_file)) { + list($img_width, $img_height) = $this->get_image_size($uploaded_file); + // If we are auto rotating the image by default, do the checks on + // the correct orientation + if ( + @$this->options['image_versions']['']['auto_orient'] && + function_exists('exif_read_data') && + ($exif = @exif_read_data($uploaded_file)) && + (((int) @$exif['Orientation']) >= 5) + ) { + $tmp = $img_width; + $img_width = $img_height; + $img_height = $tmp; + unset($tmp); + } + } + if (!empty($img_width)) { + if ($max_width && $img_width > $max_width) { + $file->error = $this->get_error_message('max_width'); + return false; + } + if ($max_height && $img_height > $max_height) { + $file->error = $this->get_error_message('max_height'); + return false; + } + if ($min_width && $img_width < $min_width) { + $file->error = $this->get_error_message('min_width'); + return false; + } + if ($min_height && $img_height < $min_height) { + $file->error = $this->get_error_message('min_height'); + return false; + } + } + return true; + } + + protected function upcount_name_callback($matches) { + $index = isset($matches[1]) ? ((int)$matches[1]) + 1 : 1; + $ext = isset($matches[2]) ? $matches[2] : ''; + return ' ('.$index.')'.$ext; + } + + protected function upcount_name($name) { + return preg_replace_callback( + '/(?:(?: \(([\d]+)\))?(\.[^.]+))?$/', + array($this, 'upcount_name_callback'), + $name, + 1 + ); + } + + protected function get_unique_filename($file_path, $name, $size, $type, $error, + $index, $content_range) { + while(is_dir($this->get_upload_path($name))) { + $name = $this->upcount_name($name); + } + // Keep an existing filename if this is part of a chunked upload: + $uploaded_bytes = $this->fix_integer_overflow((int)$content_range[1]); + while (is_file($this->get_upload_path($name))) { + if ($uploaded_bytes === $this->get_file_size( + $this->get_upload_path($name))) { + break; + } + $name = $this->upcount_name($name); + } + return $name; + } + + protected function fix_file_extension($file_path, $name, $size, $type, $error, + $index, $content_range) { + // Add missing file extension for known image types: + if (strpos($name, '.') === false && + preg_match('/^image\/(gif|jpe?g|png)/', $type, $matches)) { + $name .= '.'.$matches[1]; + } + if ($this->options['correct_image_extensions']) { + switch ($this->imagetype($file_path)) { + case self::IMAGETYPE_JPEG: + $extensions = array('jpg', 'jpeg'); + break; + case self::IMAGETYPE_PNG: + $extensions = array('png'); + break; + case self::IMAGETYPE_GIF: + $extensions = array('gif'); + break; + } + // Adjust incorrect image file extensions: + if (!empty($extensions)) { + $parts = explode('.', $name); + $extIndex = count($parts) - 1; + $ext = strtolower(@$parts[$extIndex]); + if (!in_array($ext, $extensions)) { + $parts[$extIndex] = $extensions[0]; + $name = implode('.', $parts); + } + } + } + return $name; + } + + protected function trim_file_name($file_path, $name, $size, $type, $error, + $index, $content_range) { + // Remove path information and dots around the filename, to prevent uploading + // into different directories or replacing hidden system files. + // Also remove control characters and spaces (\x00..\x20) around the filename: + $name = trim($this->basename(stripslashes($name)), ".\x00..\x20"); + // Replace dots in filenames to avoid security issues with servers + // that interpret multiple file extensions, e.g. "example.php.png": + $replacement = $this->options['replace_dots_in_filenames']; + if (!empty($replacement)) { + $parts = explode('.', $name); + if (count($parts) > 2) { + $ext = array_pop($parts); + $name = implode($replacement, $parts).'.'.$ext; + } + } + // Use a timestamp for empty filenames: + if (!$name) { + $name = str_replace('.', '-', microtime(true)); + } + return $name; + } + + protected function get_file_name($file_path, $name, $size, $type, $error, + $index, $content_range) { + $name = $this->trim_file_name($file_path, $name, $size, $type, $error, + $index, $content_range); + return $this->get_unique_filename( + $file_path, + $this->fix_file_extension($file_path, $name, $size, $type, $error, + $index, $content_range), + $size, + $type, + $error, + $index, + $content_range + ); + } + + protected function get_scaled_image_file_paths($file_name, $version) { + $file_path = $this->get_upload_path($file_name); + if (!empty($version)) { + $version_dir = $this->get_upload_path(null, $version); + if (!is_dir($version_dir)) { + mkdir($version_dir, $this->options['mkdir_mode'], true); + } + $new_file_path = $version_dir.'/'.$file_name; + } else { + $new_file_path = $file_path; + } + return array($file_path, $new_file_path); + } + + protected function gd_get_image_object($file_path, $func, $no_cache = false) { + if (empty($this->image_objects[$file_path]) || $no_cache) { + $this->gd_destroy_image_object($file_path); + $this->image_objects[$file_path] = $func($file_path); + } + return $this->image_objects[$file_path]; + } + + protected function gd_set_image_object($file_path, $image) { + $this->gd_destroy_image_object($file_path); + $this->image_objects[$file_path] = $image; + } + + protected function gd_destroy_image_object($file_path) { + $image = (isset($this->image_objects[$file_path])) ? $this->image_objects[$file_path] : null ; + return $image && imagedestroy($image); + } + + protected function gd_imageflip($image, $mode) { + if (function_exists('imageflip')) { + return imageflip($image, $mode); + } + $new_width = $src_width = imagesx($image); + $new_height = $src_height = imagesy($image); + $new_img = imagecreatetruecolor($new_width, $new_height); + $src_x = 0; + $src_y = 0; + switch ($mode) { + case '1': // flip on the horizontal axis + $src_y = $new_height - 1; + $src_height = -$new_height; + break; + case '2': // flip on the vertical axis + $src_x = $new_width - 1; + $src_width = -$new_width; + break; + case '3': // flip on both axes + $src_y = $new_height - 1; + $src_height = -$new_height; + $src_x = $new_width - 1; + $src_width = -$new_width; + break; + default: + return $image; + } + imagecopyresampled( + $new_img, + $image, + 0, + 0, + $src_x, + $src_y, + $new_width, + $new_height, + $src_width, + $src_height + ); + return $new_img; + } + + protected function gd_orient_image($file_path, $src_img) { + if (!function_exists('exif_read_data')) { + return false; + } + $exif = @exif_read_data($file_path); + if ($exif === false) { + return false; + } + $orientation = (int)@$exif['Orientation']; + if ($orientation < 2 || $orientation > 8) { + return false; + } + switch ($orientation) { + case 2: + $new_img = $this->gd_imageflip( + $src_img, + defined('IMG_FLIP_VERTICAL') ? IMG_FLIP_VERTICAL : 2 + ); + break; + case 3: + $new_img = imagerotate($src_img, 180, 0); + break; + case 4: + $new_img = $this->gd_imageflip( + $src_img, + defined('IMG_FLIP_HORIZONTAL') ? IMG_FLIP_HORIZONTAL : 1 + ); + break; + case 5: + $tmp_img = $this->gd_imageflip( + $src_img, + defined('IMG_FLIP_HORIZONTAL') ? IMG_FLIP_HORIZONTAL : 1 + ); + $new_img = imagerotate($tmp_img, 270, 0); + imagedestroy($tmp_img); + break; + case 6: + $new_img = imagerotate($src_img, 270, 0); + break; + case 7: + $tmp_img = $this->gd_imageflip( + $src_img, + defined('IMG_FLIP_VERTICAL') ? IMG_FLIP_VERTICAL : 2 + ); + $new_img = imagerotate($tmp_img, 270, 0); + imagedestroy($tmp_img); + break; + case 8: + $new_img = imagerotate($src_img, 90, 0); + break; + default: + return false; + } + $this->gd_set_image_object($file_path, $new_img); + return true; + } + + protected function gd_create_scaled_image($file_name, $version, $options) { + if (!function_exists('imagecreatetruecolor')) { + error_log('Function not found: imagecreatetruecolor'); + return false; + } + list($file_path, $new_file_path) = + $this->get_scaled_image_file_paths($file_name, $version); + $type = strtolower(substr(strrchr($file_name, '.'), 1)); + switch ($type) { + case 'jpg': + case 'jpeg': + $src_func = 'imagecreatefromjpeg'; + $write_func = 'imagejpeg'; + $image_quality = isset($options['jpeg_quality']) ? + $options['jpeg_quality'] : 75; + break; + case 'gif': + $src_func = 'imagecreatefromgif'; + $write_func = 'imagegif'; + $image_quality = null; + break; + case 'png': + $src_func = 'imagecreatefrompng'; + $write_func = 'imagepng'; + $image_quality = isset($options['png_quality']) ? + $options['png_quality'] : 9; + break; + default: + return false; + } + $src_img = $this->gd_get_image_object( + $file_path, + $src_func, + !empty($options['no_cache']) + ); + $image_oriented = false; + if (!empty($options['auto_orient']) && $this->gd_orient_image( + $file_path, + $src_img + )) { + $image_oriented = true; + $src_img = $this->gd_get_image_object( + $file_path, + $src_func + ); + } + $max_width = $img_width = imagesx($src_img); + $max_height = $img_height = imagesy($src_img); + if (!empty($options['max_width'])) { + $max_width = $options['max_width']; + } + if (!empty($options['max_height'])) { + $max_height = $options['max_height']; + } + $scale = min( + $max_width / $img_width, + $max_height / $img_height + ); + if ($scale >= 1) { + if ($image_oriented) { + return $write_func($src_img, $new_file_path, $image_quality); + } + if ($file_path !== $new_file_path) { + return copy($file_path, $new_file_path); + } + return true; + } + if (empty($options['crop'])) { + $new_width = $img_width * $scale; + $new_height = $img_height * $scale; + $dst_x = 0; + $dst_y = 0; + $new_img = imagecreatetruecolor($new_width, $new_height); + } else { + if (($img_width / $img_height) >= ($max_width / $max_height)) { + $new_width = $img_width / ($img_height / $max_height); + $new_height = $max_height; + } else { + $new_width = $max_width; + $new_height = $img_height / ($img_width / $max_width); + } + $dst_x = 0 - ($new_width - $max_width) / 2; + $dst_y = 0 - ($new_height - $max_height) / 2; + $new_img = imagecreatetruecolor($max_width, $max_height); + } + // Handle transparency in GIF and PNG images: + switch ($type) { + case 'gif': + case 'png': + imagecolortransparent($new_img, imagecolorallocate($new_img, 0, 0, 0)); + case 'png': + imagealphablending($new_img, false); + imagesavealpha($new_img, true); + break; + } + $success = imagecopyresampled( + $new_img, + $src_img, + $dst_x, + $dst_y, + 0, + 0, + $new_width, + $new_height, + $img_width, + $img_height + ) && $write_func($new_img, $new_file_path, $image_quality); + $this->gd_set_image_object($file_path, $new_img); + return $success; + } + + protected function imagick_get_image_object($file_path, $no_cache = false) { + if (empty($this->image_objects[$file_path]) || $no_cache) { + $this->imagick_destroy_image_object($file_path); + $image = new \Imagick(); + if (!empty($this->options['imagick_resource_limits'])) { + foreach ($this->options['imagick_resource_limits'] as $type => $limit) { + $image->setResourceLimit($type, $limit); + } + } + $image->readImage($file_path); + $this->image_objects[$file_path] = $image; + } + return $this->image_objects[$file_path]; + } + + protected function imagick_set_image_object($file_path, $image) { + $this->imagick_destroy_image_object($file_path); + $this->image_objects[$file_path] = $image; + } + + protected function imagick_destroy_image_object($file_path) { + $image = (isset($this->image_objects[$file_path])) ? $this->image_objects[$file_path] : null ; + return $image && $image->destroy(); + } + + protected function imagick_orient_image($image) { + $orientation = $image->getImageOrientation(); + $background = new \ImagickPixel('none'); + switch ($orientation) { + case \imagick::ORIENTATION_TOPRIGHT: // 2 + $image->flopImage(); // horizontal flop around y-axis + break; + case \imagick::ORIENTATION_BOTTOMRIGHT: // 3 + $image->rotateImage($background, 180); + break; + case \imagick::ORIENTATION_BOTTOMLEFT: // 4 + $image->flipImage(); // vertical flip around x-axis + break; + case \imagick::ORIENTATION_LEFTTOP: // 5 + $image->flopImage(); // horizontal flop around y-axis + $image->rotateImage($background, 270); + break; + case \imagick::ORIENTATION_RIGHTTOP: // 6 + $image->rotateImage($background, 90); + break; + case \imagick::ORIENTATION_RIGHTBOTTOM: // 7 + $image->flipImage(); // vertical flip around x-axis + $image->rotateImage($background, 270); + break; + case \imagick::ORIENTATION_LEFTBOTTOM: // 8 + $image->rotateImage($background, 270); + break; + default: + return false; + } + $image->setImageOrientation(\imagick::ORIENTATION_TOPLEFT); // 1 + return true; + } + + protected function imagick_create_scaled_image($file_name, $version, $options) { + list($file_path, $new_file_path) = + $this->get_scaled_image_file_paths($file_name, $version); + $image = $this->imagick_get_image_object( + $file_path, + !empty($options['crop']) || !empty($options['no_cache']) + ); + if ($image->getImageFormat() === 'GIF') { + // Handle animated GIFs: + $images = $image->coalesceImages(); + foreach ($images as $frame) { + $image = $frame; + $this->imagick_set_image_object($file_name, $image); + break; + } + } + $image_oriented = false; + if (!empty($options['auto_orient'])) { + $image_oriented = $this->imagick_orient_image($image); + } + + $image_resize = false; + $new_width = $max_width = $img_width = $image->getImageWidth(); + $new_height = $max_height = $img_height = $image->getImageHeight(); + + // use isset(). User might be setting max_width = 0 (auto in regular resizing). Value 0 would be considered empty when you use empty() + if (isset($options['max_width'])) { + $image_resize = true; + $new_width = $max_width = $options['max_width']; + } + if (isset($options['max_height'])) { + $image_resize = true; + $new_height = $max_height = $options['max_height']; + } + + $image_strip = (isset($options['strip']) ? $options['strip'] : false); + + if ( !$image_oriented && ($max_width >= $img_width) && ($max_height >= $img_height) && !$image_strip && empty($options["jpeg_quality"]) ) { + if ($file_path !== $new_file_path) { + return copy($file_path, $new_file_path); + } + return true; + } + $crop = (isset($options['crop']) ? $options['crop'] : false); + + if ($crop) { + $x = 0; + $y = 0; + if (($img_width / $img_height) >= ($max_width / $max_height)) { + $new_width = 0; // Enables proportional scaling based on max_height + $x = ($img_width / ($img_height / $max_height) - $max_width) / 2; + } else { + $new_height = 0; // Enables proportional scaling based on max_width + $y = ($img_height / ($img_width / $max_width) - $max_height) / 2; + } + } + $success = $image->resizeImage( + $new_width, + $new_height, + isset($options['filter']) ? $options['filter'] : \imagick::FILTER_LANCZOS, + isset($options['blur']) ? $options['blur'] : 1, + $new_width && $new_height // fit image into constraints if not to be cropped + ); + if ($success && $crop) { + $success = $image->cropImage( + $max_width, + $max_height, + $x, + $y + ); + if ($success) { + $success = $image->setImagePage($max_width, $max_height, 0, 0); + } + } + $type = strtolower(substr(strrchr($file_name, '.'), 1)); + switch ($type) { + case 'jpg': + case 'jpeg': + if (!empty($options['jpeg_quality'])) { + $image->setImageCompression(\imagick::COMPRESSION_JPEG); + $image->setImageCompressionQuality($options['jpeg_quality']); + } + break; + } + if ( $image_strip ) { + $image->stripImage(); + } + return $success && $image->writeImage($new_file_path); + } + + protected function imagemagick_create_scaled_image($file_name, $version, $options) { + list($file_path, $new_file_path) = + $this->get_scaled_image_file_paths($file_name, $version); + $resize = @$options['max_width'] + .(empty($options['max_height']) ? '' : 'X'.$options['max_height']); + if (!$resize && empty($options['auto_orient'])) { + if ($file_path !== $new_file_path) { + return copy($file_path, $new_file_path); + } + return true; + } + $cmd = $this->options['convert_bin']; + if (!empty($this->options['convert_params'])) { + $cmd .= ' '.$this->options['convert_params']; + } + $cmd .= ' '.escapeshellarg($file_path); + if (!empty($options['auto_orient'])) { + $cmd .= ' -auto-orient'; + } + if ($resize) { + // Handle animated GIFs: + $cmd .= ' -coalesce'; + if (empty($options['crop'])) { + $cmd .= ' -resize '.escapeshellarg($resize.'>'); + } else { + $cmd .= ' -resize '.escapeshellarg($resize.'^'); + $cmd .= ' -gravity center'; + $cmd .= ' -crop '.escapeshellarg($resize.'+0+0'); + } + // Make sure the page dimensions are correct (fixes offsets of animated GIFs): + $cmd .= ' +repage'; + } + if (!empty($options['convert_params'])) { + $cmd .= ' '.$options['convert_params']; + } + $cmd .= ' '.escapeshellarg($new_file_path); + exec($cmd, $output, $error); + if ($error) { + error_log(implode('\n', $output)); + return false; + } + return true; + } + + protected function get_image_size($file_path) { + if ($this->options['image_library']) { + if (extension_loaded('imagick')) { + $image = new \Imagick(); + try { + if (@$image->pingImage($file_path)) { + $dimensions = array($image->getImageWidth(), $image->getImageHeight()); + $image->destroy(); + return $dimensions; + } + return false; + } catch (\Exception $e) { + error_log($e->getMessage()); + } + } + if ($this->options['image_library'] === 2) { + $cmd = $this->options['identify_bin']; + $cmd .= ' -ping '.escapeshellarg($file_path); + exec($cmd, $output, $error); + if (!$error && !empty($output)) { + // image.jpg JPEG 1920x1080 1920x1080+0+0 8-bit sRGB 465KB 0.000u 0:00.000 + $infos = preg_split('/\s+/', substr($output[0], strlen($file_path))); + $dimensions = preg_split('/x/', $infos[2]); + return $dimensions; + } + return false; + } + } + if (!function_exists('getimagesize')) { + error_log('Function not found: getimagesize'); + return false; + } + return @getimagesize($file_path); + } + + protected function create_scaled_image($file_name, $version, $options) { + try { + if ($this->options['image_library'] === 2) { + return $this->imagemagick_create_scaled_image($file_name, $version, $options); + } + if ($this->options['image_library'] && extension_loaded('imagick')) { + return $this->imagick_create_scaled_image($file_name, $version, $options); + } + return $this->gd_create_scaled_image($file_name, $version, $options); + } catch (\Exception $e) { + error_log($e->getMessage()); + return false; + } + } + + protected function destroy_image_object($file_path) { + if ($this->options['image_library'] && extension_loaded('imagick')) { + return $this->imagick_destroy_image_object($file_path); + } + } + + protected function imagetype($file_path) { + $fp = fopen($file_path, 'r'); + $data = fread($fp, 4); + fclose($fp); + // GIF: 47 49 46 38 + if ($data === 'GIF8') { + return self::IMAGETYPE_GIF; + } + // JPG: FF D8 FF + if (bin2hex(substr($data, 0, 3)) === 'ffd8ff') { + return self::IMAGETYPE_JPEG; + } + // PNG: 89 50 4E 47 + if (bin2hex(@$data[0]).substr($data, 1, 4) === '89PNG') { + return self::IMAGETYPE_PNG; + } + return false; + } + + protected function is_valid_image_file($file_path) { + if (!preg_match('/\.(gif|jpe?g|png)$/i', $file_path)) { + return false; + } + return !!$this->imagetype($file_path); + } + + protected function handle_image_file($file_path, $file) { + $failed_versions = array(); + foreach ($this->options['image_versions'] as $version => $options) { + if ($this->create_scaled_image($file->name, $version, $options)) { + if (!empty($version)) { + $file->{$version.'Url'} = $this->get_download_url( + $file->name, + $version + ); + } else { + $file->size = $this->get_file_size($file_path, true); + } + } else { + $failed_versions[] = $version ? $version : 'original'; + } + } + if (count($failed_versions)) { + $file->error = $this->get_error_message('image_resize') + .' ('.implode($failed_versions, ', ').')'; + } + // Free memory: + $this->destroy_image_object($file_path); + } + + protected function handle_file_upload($uploaded_file, $name, $size, $type, $error, + $index = null, $content_range = null) { + $file = new \stdClass(); + $file->name = $this->get_file_name($uploaded_file, $name, $size, $type, $error, + $index, $content_range); + $file->size = $this->fix_integer_overflow((int)$size); + $file->type = $type; + if ($this->validate($uploaded_file, $file, $error, $index)) { + $this->handle_form_data($file, $index); + $upload_dir = $this->get_upload_path(); + if (!is_dir($upload_dir)) { + mkdir($upload_dir, $this->options['mkdir_mode'], true); + } + $file_path = $this->get_upload_path($file->name); + $append_file = $content_range && is_file($file_path) && + $file->size > $this->get_file_size($file_path); + if ($uploaded_file && is_uploaded_file($uploaded_file)) { + // multipart/formdata uploads (POST method uploads) + if ($append_file) { + file_put_contents( + $file_path, + fopen($uploaded_file, 'r'), + FILE_APPEND + ); + } else { + move_uploaded_file($uploaded_file, $file_path); + } + } else { + // Non-multipart uploads (PUT method support) + file_put_contents( + $file_path, + fopen($this->options['input_stream'], 'r'), + $append_file ? FILE_APPEND : 0 + ); + } + $file_size = $this->get_file_size($file_path, $append_file); + if ($file_size === $file->size) { + $file->url = $this->get_download_url($file->name); + if ($this->is_valid_image_file($file_path)) { + $this->handle_image_file($file_path, $file); + } + } else { + $file->size = $file_size; + if (!$content_range && $this->options['discard_aborted_uploads']) { + unlink($file_path); + $file->error = $this->get_error_message('abort'); + } + } + $this->set_additional_file_properties($file); + } + return $file; + } + + protected function readfile($file_path) { + $file_size = $this->get_file_size($file_path); + $chunk_size = $this->options['readfile_chunk_size']; + if ($chunk_size && $file_size > $chunk_size) { + $handle = fopen($file_path, 'rb'); + while (!feof($handle)) { + echo fread($handle, $chunk_size); + @ob_flush(); + @flush(); + } + fclose($handle); + return $file_size; + } + return readfile($file_path); + } + + protected function body($str) { + echo $str; + } + + protected function header($str) { + header($str); + } + + protected function get_upload_data($id) { + return @$_FILES[$id]; + } + + protected function get_post_param($id) { + return @$_POST[$id]; + } + + protected function get_query_param($id) { + return @$_GET[$id]; + } + + protected function get_server_var($id) { + return @$_SERVER[$id]; + } + + protected function handle_form_data($file, $index) { + // Handle form data, e.g. $_POST['description'][$index] + } + + protected function get_version_param() { + return $this->basename(stripslashes($this->get_query_param('version'))); + } + + protected function get_singular_param_name() { + return substr($this->options['param_name'], 0, -1); + } + + protected function get_file_name_param() { + $name = $this->get_singular_param_name(); + return $this->basename(stripslashes($this->get_query_param($name))); + } + + protected function get_file_names_params() { + $params = $this->get_query_param($this->options['param_name']); + if (!$params) { + return null; + } + foreach ($params as $key => $value) { + $params[$key] = $this->basename(stripslashes($value)); + } + return $params; + } + + protected function get_file_type($file_path) { + switch (strtolower(pathinfo($file_path, PATHINFO_EXTENSION))) { + case 'jpeg': + case 'jpg': + return 'image/jpeg'; + case 'png': + return 'image/png'; + case 'gif': + return 'image/gif'; + default: + return ''; + } + } + + protected function download() { + switch ($this->options['download_via_php']) { + case 1: + $redirect_header = null; + break; + case 2: + $redirect_header = 'X-Sendfile'; + break; + case 3: + $redirect_header = 'X-Accel-Redirect'; + break; + default: + return $this->header('HTTP/1.1 403 Forbidden'); + } + $file_name = $this->get_file_name_param(); + if (!$this->is_valid_file_object($file_name)) { + return $this->header('HTTP/1.1 404 Not Found'); + } + if ($redirect_header) { + return $this->header( + $redirect_header.': '.$this->get_download_url( + $file_name, + $this->get_version_param(), + true + ) + ); + } + $file_path = $this->get_upload_path($file_name, $this->get_version_param()); + // Prevent browsers from MIME-sniffing the content-type: + $this->header('X-Content-Type-Options: nosniff'); + if (!preg_match($this->options['inline_file_types'], $file_name)) { + $this->header('Content-Type: application/octet-stream'); + $this->header('Content-Disposition: attachment; filename="'.$file_name.'"'); + } else { + $this->header('Content-Type: '.$this->get_file_type($file_path)); + $this->header('Content-Disposition: inline; filename="'.$file_name.'"'); + } + $this->header('Content-Length: '.$this->get_file_size($file_path)); + $this->header('Last-Modified: '.gmdate('D, d M Y H:i:s T', filemtime($file_path))); + $this->readfile($file_path); + } + + protected function send_content_type_header() { + $this->header('Vary: Accept'); + if (strpos($this->get_server_var('HTTP_ACCEPT'), 'application/json') !== false) { + $this->header('Content-type: application/json'); + } else { + $this->header('Content-type: text/plain'); + } + } + + protected function send_access_control_headers() { + $this->header('Access-Control-Allow-Origin: '.$this->options['access_control_allow_origin']); + $this->header('Access-Control-Allow-Credentials: ' + .($this->options['access_control_allow_credentials'] ? 'true' : 'false')); + $this->header('Access-Control-Allow-Methods: ' + .implode(', ', $this->options['access_control_allow_methods'])); + $this->header('Access-Control-Allow-Headers: ' + .implode(', ', $this->options['access_control_allow_headers'])); + } + + public function generate_response($content, $print_response = true) { + $this->response = $content; + if ($print_response) { + $json = json_encode($content); + $redirect = stripslashes($this->get_post_param('redirect')); + if ($redirect && preg_match($this->options['redirect_allow_target'], $redirect)) { + $this->header('Location: '.sprintf($redirect, rawurlencode($json))); + return; + } + $this->head(); + if ($this->get_server_var('HTTP_CONTENT_RANGE')) { + $files = isset($content[$this->options['param_name']]) ? + $content[$this->options['param_name']] : null; + if ($files && is_array($files) && is_object($files[0]) && $files[0]->size) { + $this->header('Range: 0-'.( + $this->fix_integer_overflow((int)$files[0]->size) - 1 + )); + } + } + $this->body($json); + } + return $content; + } + + public function get_response () { + return $this->response; + } + + public function head() { + $this->header('Pragma: no-cache'); + $this->header('Cache-Control: no-store, no-cache, must-revalidate'); + $this->header('Content-Disposition: inline; filename="files.json"'); + // Prevent Internet Explorer from MIME-sniffing the content-type: + $this->header('X-Content-Type-Options: nosniff'); + if ($this->options['access_control_allow_origin']) { + $this->send_access_control_headers(); + } + $this->send_content_type_header(); + } + + public function get($print_response = true) { + if ($print_response && $this->get_query_param('download')) { + return $this->download(); + } + $file_name = $this->get_file_name_param(); + if ($file_name) { + $response = array( + $this->get_singular_param_name() => $this->get_file_object($file_name) + ); + } else { + $response = array( + $this->options['param_name'] => $this->get_file_objects() + ); + } + return $this->generate_response($response, $print_response); + } + + public function post($print_response = true) { + if ($this->get_query_param('_method') === 'DELETE') { + return $this->delete($print_response); + } + $upload = $this->get_upload_data($this->options['param_name']); + // Parse the Content-Disposition header, if available: + $content_disposition_header = $this->get_server_var('HTTP_CONTENT_DISPOSITION'); + $file_name = $content_disposition_header ? + rawurldecode(preg_replace( + '/(^[^"]+")|("$)/', + '', + $content_disposition_header + )) : null; + // Parse the Content-Range header, which has the following form: + // Content-Range: bytes 0-524287/2000000 + $content_range_header = $this->get_server_var('HTTP_CONTENT_RANGE'); + $content_range = $content_range_header ? + preg_split('/[^0-9]+/', $content_range_header) : null; + $size = $content_range ? $content_range[3] : null; + $files = array(); + if ($upload) { + if (is_array($upload['tmp_name'])) { + // param_name is an array identifier like "files[]", + // $upload is a multi-dimensional array: + foreach ($upload['tmp_name'] as $index => $value) { + $files[] = $this->handle_file_upload( + $upload['tmp_name'][$index], + $file_name ? $file_name : $upload['name'][$index], + $size ? $size : $upload['size'][$index], + $upload['type'][$index], + isset($upload['error']) ? $upload['error'][$index] : null, + $index, + $content_range + ); + } + } else { + // param_name is a single object identifier like "file", + // $upload is a one-dimensional array: + $files[] = $this->handle_file_upload( + isset($upload['tmp_name']) ? $upload['tmp_name'] : null, + $file_name ? $file_name : (isset($upload['name']) ? + $upload['name'] : null), + $size ? $size : (isset($upload['size']) ? + $upload['size'] : $this->get_server_var('CONTENT_LENGTH')), + isset($upload['type']) ? + $upload['type'] : $this->get_server_var('CONTENT_TYPE'), + isset($upload['error']) ? $upload['error'] : null, + null, + $content_range + ); + } + } + $response = array($this->options['param_name'] => $files); + $name = $file_name ? $file_name : $upload['name'][0]; + $res = $this->generate_response($response, $print_response); + if(is_file($this->get_upload_path($name))){ + $uploaded_bytes = $this->fix_integer_overflow((int)$content_range[1]); + $totalSize = $this->get_file_size($this->get_upload_path($name)); + if ($totalSize - $uploaded_bytes - $this->options['readfile_chunk_size'] < 0) { + $this->onUploadEnd($res); + }else{ + $this->head(); + $this->body(json_encode($res)); + } + }else{ + $this->head(); + $this->body(json_encode($res)); + } + return $res; + } + + public function onUploadEnd ($res){ + $targetPath = $this->options['storeFolder']; + $targetPathThumb = $this->options['storeFolderThumb']; + + if(!$this->options['ftp']){ + $targetFile = $targetPath. $res['files'][0]->name; + $targetFileThumb = $targetPathThumb. $res['files'][0]->name; + if (!is_dir($targetPathThumb)) { + mkdir($targetPathThumb, $this->options['mkdir_mode'], true); + } + if(is_file($targetFile)) { + chmod($targetFile, $this->options['config']['filePermission']); + }elseif(is_dir($targetFile)){ + chmod($targetFile, $this->options['config']['folderPermission']); + } + }else{ + $targetFile = $this->options['config']['ftp_temp_folder'].$res['files'][0]->name; + $targetFileThumb = $this->options['config']['ftp_temp_folder']."thumbs/". $res['files'][0]->name; + } + + //check if image (and supported) + $is_img = FALSE; + if ($this->is_valid_image_file($targetFile)){ + $is_img = TRUE; + } + + if ($is_img) + { + if(isset($this->options['config']['image_watermark']) && $this->options['config']['image_watermark']){ + require_once('include/php_image_magician.php'); + + $magicianObj = new imageLib($targetFile); + $magicianObj -> addWatermark($this->options['config']['image_watermark'], $this->options['config']['image_watermark_position'], $this->options['config']['image_watermark_padding']); + + $magicianObj -> saveImage($targetFile); + } + + + + $thumbResult = create_img($targetFile, $targetFileThumb, 122, 91); + + if ( $thumbResult!==true) + { + if($thumbResult === false){ + $res['files'][0]->error = trans("Not enough Memory"); + }else{ + $res['files'][0]->error = $thumbResult; + } + } + else + { + if( !$this->options['ftp'] && ! new_thumbnails_creation($targetPath,$targetFile,$_FILES['files']['name'][0],$this->options['config']['current_path'],$this->options['config'])) + { + $res['files'][0]->error = trans("Not enough Memory"); + } + else + { + $imginfo = getimagesize($targetFile); + $srcWidth = $imginfo[0]; + $srcHeight = $imginfo[1]; + + // resize images if set + if ($this->options['config']['image_resizing']) + { + if ($this->options['config']['image_resizing_width'] == 0) // if width not set + { + if ($this->options['config']['image_resizing_height'] == 0) + { + $this->options['config']['image_resizing_width'] = $srcWidth; + $this->options['config']['image_resizing_height'] = $srcHeight; + } + else + { + $this->options['config']['image_resizing_width'] = $this->options['config']['image_resizing_height']*$srcWidth/$srcHeight; + } + } + elseif ($this->options['config']['image_resizing_height'] == 0) // if height not set + { + $this->options['config']['image_resizing_height'] = $this->options['config']['image_resizing_width']*$srcHeight/$srcWidth; + } + + // new dims and create + $srcWidth = $this->options['config']['image_resizing_width']; + $srcHeight = $this->options['config']['image_resizing_height']; + create_img($targetFile, $targetFile, $this->options['config']['image_resizing_width'], $this->options['config']['image_resizing_height'], $this->options['config']['image_resizing_mode']); + } + + //max resizing limit control + $resize = FALSE; + if ($this->options['config']['image_max_width'] != 0 && $srcWidth > $this->options['config']['image_max_width'] && $this->options['config']['image_resizing_override'] === FALSE) + { + $resize = TRUE; + $srcWidth = $this->options['config']['image_max_width']; + + if ($this->options['config']['image_max_height'] == 0) $srcHeight = $this->options['config']['image_max_width']*$srcHeight/$srcWidth; + } + + if ($this->options['config']['image_max_height'] != 0 && $srcHeight > $this->options['config']['image_max_height'] && $this->options['config']['image_resizing_override'] === FALSE){ + $resize = TRUE; + $srcHeight = $this->options['config']['image_max_height']; + + if ($this->options['config']['image_max_width'] == 0) $srcWidth = $this->options['config']['image_max_height']*$srcWidth/$srcHeight; + } + + if ($resize){ create_img($targetFile, $targetFile, $srcWidth, $srcHeight, $this->options['config']['image_max_mode']); } + } + } + } + + if($this->options['ftp']){ + + $this->options['ftp']->put($targetPath. $res['files'][0]->name, $targetFile, FTP_BINARY); + unlink($targetFile); + if ($is_img) + { + $this->options['ftp']->put($targetPathThumb. $res['files'][0]->name, $targetFileThumb, FTP_BINARY); + unlink($targetFileThumb); + } + } + $this->head(); + $this->body(json_encode($res)); + } + + public function delete($print_response = true) { + $file_names = $this->get_file_names_params(); + if (empty($file_names)) { + $file_names = array($this->get_file_name_param()); + } + $response = array(); + foreach ($file_names as $file_name) { + $file_path = $this->get_upload_path($file_name); + $success = is_file($file_path) && $file_name[0] !== '.' && unlink($file_path); + if ($success) { + foreach ($this->options['image_versions'] as $version => $options) { + if (!empty($version)) { + $file = $this->get_upload_path($file_name, $version); + if (is_file($file)) { + unlink($file); + } + } + } + } + $response[$file_name] = $success; + } + return $this->generate_response($response, $print_response); + } + + protected function basename($filepath, $suffix = null) { + $splited = preg_split('/\//', rtrim ($filepath, '/ ')); + return substr(basename('X'.$splited[count($splited)-1], $suffix), 1); + } +} diff --git a/libraries/filemanager-9.14.1/ajax_calls.php b/libraries/filemanager-9.14.1/ajax_calls.php new file mode 100644 index 0000000..e514186 --- /dev/null +++ b/libraries/filemanager-9.14.1/ajax_calls.php @@ -0,0 +1,653 @@ +send(); + exit; +} +$languages = include 'lang/languages.php'; + +if (isset($_SESSION['RF']['language']) && file_exists('lang/' . basename($_SESSION['RF']['language']) . '.php')) { + if (array_key_exists($_SESSION['RF']['language'], $languages)) { + include 'lang/' . basename($_SESSION['RF']['language']) . '.php'; + } else { + response(trans('Lang_Not_Found').AddErrorLocation())->send(); + exit; + } +} else { + response(trans('Lang_Not_Found').AddErrorLocation())->send(); + exit; +} + + +//check $_GET['file'] +if (isset($_GET['file']) && !checkRelativePath($_GET['file'])) { + response(trans('wrong path').AddErrorLocation())->send(); + exit; +} + +//check $_POST['file'] +if(isset($_POST['path']) && !checkRelativePath($_POST['path'])) { + response(trans('wrong path').AddErrorLocation())->send(); + exit; +} + + +$ftp = ftp_con($config); + +if (isset($_GET['action'])) { + switch ($_GET['action']) { + case 'new_file_form': + echo trans('Filename') . ':

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

    +
      +
    • +
    • +
    • +
    • +
    +
    '; + } + + $ret .= '
    '; + + response($ret)->send(); + exit; + + break; + case 'get_lang': + if (! file_exists('lang/languages.php')) { + response(trans('Lang_Not_Found').AddErrorLocation())->send(); + exit; + } + + $languages = include 'lang/languages.php'; + if (! isset($languages) || ! is_array($languages)) { + response(trans('Lang_Not_Found').AddErrorLocation())->send(); + exit; + } + + $curr = $_SESSION['RF']['language']; + + $ret = ''; + + response($ret)->send(); + exit; + + break; + case 'change_lang': + $choosen_lang = (!empty($_POST['choosen_lang']))? $_POST['choosen_lang']:"en_EN"; + + if (array_key_exists($choosen_lang, $languages)) { + if (! file_exists('lang/' . $choosen_lang . '.php')) { + response(trans('Lang_Not_Found').AddErrorLocation())->send(); + exit; + } else { + $_SESSION['RF']['language'] = $choosen_lang; + } + } + + break; + case 'cad_preview': + if ($ftp) { + $selected_file = $config['ftp_base_url'].$config['upload_dir'] . $_GET['file']; + } else { + $selected_file = $config['current_path'] . $_GET['file']; + + if (! file_exists($selected_file)) { + response(trans('File_Not_Found').AddErrorLocation())->send(); + exit; + } + } + if ($ftp) { + $url_file = $selected_file; + } else { + $url_file = $config['base_url'] . $config['upload_dir'] . str_replace($config['current_path'], '', $_GET["file"]); + } + + $cad_url = urlencode($url_file); + $cad_html = ""; + $ret = $cad_html; + response($ret)->send(); + break; + case 'get_file': // preview or edit + $sub_action = $_GET['sub_action']; + $preview_mode = $_GET["preview_mode"]; + + if ($sub_action != 'preview' && $sub_action != 'edit') { + response(trans('wrong action').AddErrorLocation())->send(); + exit; + } + + if ($ftp) { + $selected_file = ($sub_action == 'preview' ? $config['ftp_base_url'].$config['upload_dir'] . $_GET['file'] : $config['ftp_base_url'].$config['upload_dir'] . $_POST['path']); + } else { + $selected_file = ($sub_action == 'preview' ? $config['current_path'] . $_GET['file'] : $config['current_path'] . $_POST['path']); + + if (! file_exists($selected_file)) { + response(trans('File_Not_Found').AddErrorLocation())->send(); + exit; + } + } + + $info = pathinfo($selected_file); + + if ($preview_mode == 'text') { + $is_allowed = ($sub_action == 'preview' ? $config['preview_text_files'] : $config['edit_text_files']); + $allowed_file_exts = ($sub_action == 'preview' ? $config['previewable_text_file_exts'] : $config['editable_text_file_exts']); + } elseif ($preview_mode == 'google') { + $is_allowed = $config['googledoc_enabled']; + $allowed_file_exts = $config['googledoc_file_exts']; + } + + if (! isset($allowed_file_exts) || ! is_array($allowed_file_exts)) { + $allowed_file_exts = array(); + } + + if (!isset($info['extension'])) { + $info['extension']=''; + } + if (! in_array($info['extension'], $allowed_file_exts) + || ! isset($is_allowed) + || $is_allowed === false + || (!$ftp && ! is_readable($selected_file)) + ) { + response(sprintf(trans('File_Open_Edit_Not_Allowed'), ($sub_action == 'preview' ? strtolower(trans('Open')) : strtolower(trans('Edit')))).AddErrorLocation())->send(); + exit; + } + if ($sub_action == 'preview') { + if ($preview_mode == 'text') { + // get and sanities + $data = file_get_contents($selected_file); + $data = htmlspecialchars(htmlspecialchars_decode($data)); + $ret = ''; + + $ret .= ''; + $ret .= '
    '.$data.'
    '; + } elseif ($preview_mode == 'google') { + if ($ftp) { + $url_file = $selected_file; + } else { + $url_file = $config['base_url'] . $config['upload_dir'] . str_replace($config['current_path'], '', $_GET["file"]); + } + + $googledoc_url = urlencode($url_file); + $ret = ""; + } + }else{ + $data = stripslashes(htmlspecialchars(file_get_contents($selected_file))); + if(in_array($info['extension'],array('html','html'))){ + $ret = ''; + }else{ + $ret = ''; + } + + } + + response($ret)->send(); + exit; + + break; + default: + response(trans('no action passed').AddErrorLocation())->send(); + exit; + } +} else { + response(trans('no action passed').AddErrorLocation())->send(); + exit; +} diff --git a/libraries/filemanager-9.14.1/config/.htaccess b/libraries/filemanager-9.14.1/config/.htaccess new file mode 100644 index 0000000..14249c5 --- /dev/null +++ b/libraries/filemanager-9.14.1/config/.htaccess @@ -0,0 +1 @@ +Deny from all \ No newline at end of file diff --git a/libraries/filemanager-9.14.1/config/config.php b/libraries/filemanager-9.14.1/config/config.php new file mode 100644 index 0000000..a29bb2e --- /dev/null +++ b/libraries/filemanager-9.14.1/config/config.php @@ -0,0 +1,619 @@ + +| in tinymce a new parameter added: filemanager_access_key:"myPrivateKey" +| example tinymce config: +| +| tiny init ... +| external_filemanager_path:"../filemanager/", +| filemanager_title:"Filemanager" , +| filemanager_access_key:"myPrivateKey" , +| ... +| +*/ + +define('USE_ACCESS_KEYS', false); // TRUE or FALSE + +/* +|-------------------------------------------------------------------------- +| DON'T COPY THIS VARIABLES IN FOLDERS config.php FILES +|-------------------------------------------------------------------------- +*/ + +define('DEBUG_ERROR_MESSAGE', false); // TRUE or FALSE + +/* +|-------------------------------------------------------------------------- +| Path configuration +|-------------------------------------------------------------------------- +| In this configuration the folder tree is +| root +| |- source <- upload folder +| |- thumbs <- thumbnail folder [must have write permission (755)] +| |- filemanager +| |- js +| | |- tinymce +| | | |- plugins +| | | | |- responsivefilemanager +| | | | | |- plugin.min.js +*/ + +$config = array( + + /* + |-------------------------------------------------------------------------- + | DON'T TOUCH (base url (only domain) of site). + |-------------------------------------------------------------------------- + | + | without final / (DON'T TOUCH) + | + */ + 'base_url' => '', + /* + |-------------------------------------------------------------------------- + | path from base_url to base of upload folder + |-------------------------------------------------------------------------- + | + | with start and final / + | + */ + 'upload_dir' => '/upload/', + /* + |-------------------------------------------------------------------------- + | relative path from filemanager folder to upload folder + |-------------------------------------------------------------------------- + | + | with final / + | + */ + 'current_path' => '../../upload/', + + /* + |-------------------------------------------------------------------------- + | relative path from filemanager folder to thumbs folder + |-------------------------------------------------------------------------- + | + | with final / + | DO NOT put inside upload folder + | + */ + 'thumbs_base_path' => '../../temp/', + + /* + |-------------------------------------------------------------------------- + | path from base_url to base of thumbs folder + |-------------------------------------------------------------------------- + | + | with final / + | DO NOT put inside upload folder + | + */ + 'thumbs_upload_dir' => '/thumbs/', + + + /* + |-------------------------------------------------------------------------- + | mime file control to define files extensions + |-------------------------------------------------------------------------- + | + | If you want to be forced to assign the extension starting from the mime type + | + */ + 'mime_extension_rename' => true, + + + /* + |-------------------------------------------------------------------------- + | FTP configuration BETA VERSION + |-------------------------------------------------------------------------- + | + | If you want enable ftp use write these parametres otherwise leave empty + | Remember to set base_url properly to point in the ftp server domain and + | upload dir will be ftp_base_folder + upload_dir so without final / + | + */ + 'ftp_host' => false, //put the FTP host + 'ftp_user' => "user", + 'ftp_pass' => "pass", + 'ftp_base_folder' => "base_folder", + 'ftp_base_url' => "http://site to ftp root", + // Directory where place files before to send to FTP with final / + 'ftp_temp_folder' => "../temp/", + /* + |--------------------------------------------------------------------------- + | path from ftp_base_folder to base of thumbs folder with start and final / + |--------------------------------------------------------------------------- + */ + 'ftp_thumbs_dir' => '/thumbs/', + 'ftp_ssl' => false, + 'ftp_port' => 21, + + /* EXAMPLE + 'ftp_host' => "host.com", + 'ftp_user' => "test@host.com", + 'ftp_pass' => "pass.1", + 'ftp_base_folder' => "", + 'ftp_base_url' => "http://host.com/testFTP", + */ + + /* + |-------------------------------------------------------------------------- + | Multiple files selection + |-------------------------------------------------------------------------- + | The user can delete multiple files, select all files , deselect all files + */ + 'multiple_selection' => true, + + /* + | + | The user can have a select button that pass a json to external input or pass the first file selected to editor + | If you use responsivefilemanager tinymce extension can copy into editor multiple object like images, videos, audios, links in the same time + | + */ + 'multiple_selection_action_button' => true, + + /* + |-------------------------------------------------------------------------- + | Access keys + |-------------------------------------------------------------------------- + | + | add access keys eg: array('myPrivateKey', 'someoneElseKey'); + | keys should only containt (a-z A-Z 0-9 \ . _ -) characters + | if you are integrating lets say to a cms for admins, i recommend making keys randomized something like this: + | $username = 'Admin'; + | $salt = 'dsflFWR9u2xQa' (a hard coded string) + | $akey = md5($username.$salt); + | DO NOT use 'key' as access key! + | Keys are CASE SENSITIVE! + | + */ + + 'access_keys' => array(), + + //-------------------------------------------------------------------------------------------------------- + // YOU CAN COPY AND CHANGE THESE VARIABLES INTO FOLDERS config.php FILES TO CUSTOMIZE EACH FOLDER OPTIONS + //-------------------------------------------------------------------------------------------------------- + + /* + |-------------------------------------------------------------------------- + | Maximum size of all files in source folder + |-------------------------------------------------------------------------- + | + | in Megabytes + | + */ + 'MaxSizeTotal' => false, + + /* + |-------------------------------------------------------------------------- + | Maximum upload size + |-------------------------------------------------------------------------- + | + | in Megabytes + | + */ + 'MaxSizeUpload' => 1000, + + /* + |-------------------------------------------------------------------------- + | File and Folder permission + |-------------------------------------------------------------------------- + | + */ + 'filePermission' => 0755, + 'folderPermission' => 0777, + + + /* + |-------------------------------------------------------------------------- + | default language file name + |-------------------------------------------------------------------------- + */ + 'default_language' => "pl", + + /* + |-------------------------------------------------------------------------- + | Icon theme + |-------------------------------------------------------------------------- + | + | Default available: ico and ico_dark + | Can be set to custom icon inside filemanager/img + | + */ + 'icon_theme' => "ico", + + + //Show or not total size in filemanager (is possible to greatly increase the calculations) + 'show_total_size' => true, + //Show or not show folder size in list view feature in filemanager (is possible, if there is a large folder, to greatly increase the calculations) + 'show_folder_size' => true, + //Show or not show sorting feature in filemanager + 'show_sorting_bar' => true, + //Show or not show filters button in filemanager + 'show_filter_buttons' => true, + //Show or not language selection feature in filemanager + 'show_language_selection' => true, + //active or deactive the transliteration (mean convert all strange characters in A..Za..z0..9 characters) + 'transliteration' => true, + //convert all spaces on files name and folders name with $replace_with variable + 'convert_spaces' => true, + //convert all spaces on files name and folders name this value + 'replace_with' => "-", + //convert to lowercase the files and folders name + 'lower_case' => false, + + //Add ?484899493349 (time value) to returned images to prevent cache + 'add_time_to_img' => false, + + + //******************************************* + //Images limit and resizing configuration + //******************************************* + + // set maximum pixel width and/or maximum pixel height for all images + // If you set a maximum width or height, oversized images are converted to those limits. Images smaller than the limit(s) are unaffected + // if you don't need a limit set both to 0 + 'image_max_width' => 1920, + 'image_max_height' => 1080, + 'image_max_mode' => 'auto', + /* + # $option: 0 / exact = defined size; + # 1 / portrait = keep aspect set height; + # 2 / landscape = keep aspect set width; + # 3 / auto = auto; + # 4 / crop= resize and crop; + */ + + //Automatic resizing // + // If you set $image_resizing to TRUE the script converts all uploaded images exactly to image_resizing_width x image_resizing_height dimension + // If you set width or height to 0 the script automatically calculates the other dimension + // Is possible that if you upload very big images the script not work to overcome this increase the php configuration of memory and time limit + 'image_resizing' => false, + 'image_resizing_width' => 0, + 'image_resizing_height' => 0, + 'image_resizing_mode' => 'auto', // same as $image_max_mode + 'image_resizing_override' => false, + // If set to TRUE then you can specify bigger images than $image_max_width & height otherwise if image_resizing is + // bigger than $image_max_width or height then it will be converted to those values + + + //****************** + // + // WATERMARK IMAGE + // + //Watermark path or false + 'image_watermark' => false,//"../watermark.png", + # Could be a pre-determined position such as: + # tl = top left, + # t = top (middle), + # tr = top right, + # l = left, + # m = middle, + # r = right, + # bl = bottom left, + # b = bottom (middle), + # br = bottom right + # Or, it could be a co-ordinate position such as: 50x100 + 'image_watermark_position' => 'br', + # padding: If using a pre-determined position you can + # adjust the padding from the edges by passing an amount + # in pixels. If using co-ordinates, this value is ignored. + 'image_watermark_padding' => 10, + + //****************** + // Default layout setting + // + // 0 => boxes + // 1 => detailed list (1 column) + // 2 => columns list (multiple columns depending on the width of the page) + // YOU CAN ALSO PASS THIS PARAMETERS USING SESSION VAR => $_SESSION['RF']["VIEW"]= + // + //****************** + 'default_view' => 0, + + //set if the filename is truncated when overflow first row + 'ellipsis_title_after_first_row' => true, + + //************************* + //Permissions configuration + //****************** + 'delete_files' => true, + 'create_folders' => true, + 'delete_folders' => true, + 'upload_files' => true, + 'rename_files' => true, + 'rename_folders' => true, + 'duplicate_files' => true, + 'extract_files' => true, + 'copy_cut_files' => true, // for copy/cut files + 'copy_cut_dirs' => true, // for copy/cut directories + 'chmod_files' => true, // change file permissions + 'chmod_dirs' => true, // change folder permissions + 'preview_text_files' => true, // eg.: txt, log etc. + 'edit_text_files' => true, // eg.: txt, log etc. + 'create_text_files' => true, // only create files with exts. defined in $config['editable_text_file_exts'] + 'download_files' => true, // allow download files or just preview + + // you can preview these type of files if $preview_text_files is true + 'previewable_text_file_exts' => array( "bsh", "c","css", "cc", "cpp", "cs", "csh", "cyc", "cv", "htm", "html", "java", "js", "m", "mxml", "perl", "pl", "pm", "py", "rb", "sh", "xhtml", "xml","xsl",'txt', 'log','' ), + + // you can edit these type of files if $edit_text_files is true (only text based files) + // you can create these type of files if $config['create_text_files'] is true (only text based files) + // if you want you can add html,css etc. + // but for security reasons it's NOT RECOMMENDED! + 'editable_text_file_exts' => array( 'txt', 'log', 'xml', 'html', 'css', 'htm', 'js','' ), + + 'jplayer_exts' => array("mp4","flv","webmv","webma","webm","m4a","m4v","ogv","oga","mp3","midi","mid","ogg","wav"), + + 'cad_exts' => array('dwg', 'dxf', 'hpgl', 'plt', 'spl', 'step', 'stp', 'iges', 'igs', 'sat', 'cgm', 'svg'), + + // Preview with Google Documents + 'googledoc_enabled' => true, + 'googledoc_file_exts' => array( 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx' , 'pdf', 'odt', 'odp', 'ods'), + + // defines size limit for paste in MB / operation + // set 'FALSE' for no limit + 'copy_cut_max_size' => 100, + // defines file count limit for paste / operation + // set 'FALSE' for no limit + 'copy_cut_max_count' => 200, + //IF any of these limits reached, operation won't start and generate warning + + //********************** + //Allowed extensions (lowercase insert) + //********************** + 'ext_img' => array( 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'svg', 'ico', 'webp' ), //Images + 'ext_file' => array( 'doc', 'docx', 'rtf', 'pdf', 'xls', 'xlsx', 'txt', 'csv', 'html', 'xhtml', 'psd', 'sql', 'log', 'fla', 'xml', 'ade', 'adp', 'mdb', 'accdb', 'ppt', 'pptx', 'odt', 'ots', 'ott', 'odb', 'odg', 'otp', 'otg', 'odf', 'ods', 'odp', 'css', 'ai', 'kmz','dwg', 'dxf', 'hpgl', 'plt', 'spl', 'step', 'stp', 'iges', 'igs', 'sat', 'cgm', 'tiff',''), //Files + 'ext_video' => array( 'mov', 'mpeg', 'm4v', 'mp4', 'avi', 'mpg', 'wma', "flv", "webm" ), //Video + 'ext_music' => array( 'mp3', 'mpga', 'm4a', 'ac3', 'aiff', 'mid', 'ogg', 'wav' ), //Audio + 'ext_misc' => array( 'zip', 'rar', 'gz', 'tar', 'iso', 'dmg' ), //Archives + + + //********************* + // If you insert an extensions blacklist array the filemanager don't check any extensions but simply block the extensions in the list + // otherwise check Allowed extensions configuration + //********************* + 'ext_blacklist' => false,//['exe','bat','jpg'], + + + //Empty filename permits like .htaccess, .env, ... + 'empty_filename' => false, + + /* + |-------------------------------------------------------------------------- + | accept files without extension + |-------------------------------------------------------------------------- + | + | If you want to accept files without extension, remember to add '' extension on allowed extension + | + */ + 'files_without_extension' => false, + + /****************** + * TUI Image Editor config + *******************/ + // Add or modify the options below as needed - they will be json encoded when added to the configuration so arrays can be utilized as needed + 'tui_active' => true, + 'tui_position' => 'bottom', + // 'common.bi.image' => "../assets/images/logo.png", + // 'common.bisize.width' => '70px', + // 'common.bisize.height' => '25px', + 'common.backgroundImage' => 'none', + 'common.backgroundColor' => '#ececec', + 'common.border' => '1px solid #E6E7E8', + + // header + 'header.backgroundImage' => 'none', + 'header.backgroundColor' => '#ececec', + 'header.border' => '0px', + + // main icons + 'menu.normalIcon.path' => 'svg/icon-d.svg', + 'menu.normalIcon.name' => 'icon-d', + 'menu.activeIcon.path' => 'svg/icon-b.svg', + 'menu.activeIcon.name' => 'icon-b', + 'menu.disabledIcon.path' => 'svg/icon-a.svg', + 'menu.disabledIcon.name' => 'icon-a', + 'menu.hoverIcon.path' => 'svg/icon-c.svg', + 'menu.hoverIcon.name' => 'icon-c', + 'menu.iconSize.width' => '24px', + 'menu.iconSize.height' => '24px', + + // submenu primary color + 'submenu.backgroundColor' => '#ececec', + 'submenu.partition.color' => '#000000', + + // submenu icons + 'submenu.normalIcon.path' => 'svg/icon-d.svg', + 'submenu.normalIcon.name' => 'icon-d', + 'submenu.activeIcon.path' => 'svg/icon-b.svg', + 'submenu.activeIcon.name' => 'icon-b', + 'submenu.iconSize.width' => '32px', + 'submenu.iconSize.height' => '32px', + + // submenu labels + 'submenu.normalLabel.color' => '#000', + 'submenu.normalLabel.fontWeight' => 'normal', + 'submenu.activeLabel.color' => '#000', + 'submenu.activeLabel.fontWeight' => 'normal', + + // checkbox style + 'checkbox.border' => '1px solid #E6E7E8', + 'checkbox.backgroundColor' => '#000', + + // rango style + 'range.pointer.color' => '#333', + 'range.bar.color' => '#ccc', + 'range.subbar.color' => '#606060', + + 'range.disabledPointer.color' => '#d3d3d3', + 'range.disabledBar.color' => 'rgba(85,85,85,0.06)', + 'range.disabledSubbar.color' => 'rgba(51,51,51,0.2)', + + 'range.value.color' => '#000', + 'range.value.fontWeight' => 'normal', + 'range.value.fontSize' => '11px', + 'range.value.border' => '0', + 'range.value.backgroundColor' => '#f5f5f5', + 'range.title.color' => '#000', + 'range.title.fontWeight' => 'lighter', + + // colorpicker style + 'colorpicker.button.border' => '0px', + 'colorpicker.title.color' => '#000', + + + //The filter and sorter are managed through both javascript and php scripts because if you have a lot of + //file in a folder the javascript script can't sort all or filter all, so the filemanager switch to php script. + //The plugin automatic swich javascript to php when the current folder exceeds the below limit of files number + 'file_number_limit_js' => 500, + + //********************** + // Hidden files and folders + //********************** + // set the names of any folders you want hidden (eg "hidden_folder1", "hidden_folder2" ) Remember all folders with these names will be hidden (you can set any exceptions in config.php files on folders) + 'hidden_folders' => array(), + // set the names of any files you want hidden. Remember these names will be hidden in all folders (eg "this_document.pdf", "that_image.jpg" ) + 'hidden_files' => array( 'config.php' ), + + /******************* + * URL upload + *******************/ + 'url_upload' => true, + + + //************************************ + //Thumbnail for external use creation + //************************************ + + + // New image resized creation with fixed path from filemanager folder after uploading (thumbnails in fixed mode) + // If you want create images resized out of upload folder for use with external script you can choose this method, + // You can create also more than one image at a time just simply add a value in the array + // Remember than the image creation respect the folder hierarchy so if you are inside source/test/test1/ the new image will create at + // path_from_filemanager/test/test1/ + // PS if there isn't write permission in your destination folder you must set it + // + 'fixed_image_creation' => false, //activate or not the creation of one or more image resized with fixed path from filemanager folder + 'fixed_path_from_filemanager' => array( '../test/', '../test1/' ), //fixed path of the image folder from the current position on upload folder + 'fixed_image_creation_name_to_prepend' => array( '', 'test_' ), //name to prepend on filename + 'fixed_image_creation_to_append' => array( '_test', '' ), //name to appendon filename + 'fixed_image_creation_width' => array( 300, 400 ), //width of image + 'fixed_image_creation_height' => array( 200, 300 ), //height of image + /* + # $option: 0 / exact = defined size; + # 1 / portrait = keep aspect set height; + # 2 / landscape = keep aspect set width; + # 3 / auto = auto; + # 4 / crop= resize and crop; + */ + 'fixed_image_creation_option' => array( 'crop', 'auto' ), //set the type of the crop + + + // New image resized creation with relative path inside to upload folder after uploading (thumbnails in relative mode) + // With Responsive filemanager you can create automatically resized image inside the upload folder, also more than one at a time + // just simply add a value in the array + // The image creation path is always relative so if i'm inside source/test/test1 and I upload an image, the path start from here + // + 'relative_image_creation' => false, //activate or not the creation of one or more image resized with relative path from upload folder + 'relative_path_from_current_pos' => array( './', './' ), //relative path of the image folder from the current position on upload folder + 'relative_image_creation_name_to_prepend' => array( '', '' ), //name to prepend on filename + 'relative_image_creation_name_to_append' => array( '_thumb', '_thumb1' ), //name to append on filename + 'relative_image_creation_width' => array( 300, 400 ), //width of image + 'relative_image_creation_height' => array( 200, 300 ), //height of image + /* + * $option: 0 / exact = defined size; + * 1 / portrait = keep aspect set height; + * 2 / landscape = keep aspect set width; + * 3 / auto = auto; + * 4 / crop= resize and crop; + */ + 'relative_image_creation_option' => array( 'crop', 'crop' ), //set the type of the crop + + + // Remember text filter after close filemanager for future session + 'remember_text_filter' => false, + +); + +return array_merge( + $config, + array( + 'ext' => array_merge( + $config['ext_img'], + $config['ext_file'], + $config['ext_misc'], + $config['ext_video'], + $config['ext_music'] + ), + 'tui_defaults_config' => array( + //'common.bi.image' => $config['common.bi.image'], + //'common.bisize.width' => $config['common.bisize.width'], + //'common.bisize.height' => $config['common.bisize.height'], + 'common.backgroundImage' => $config['common.backgroundImage'], + 'common.backgroundColor' => $config['common.backgroundColor'], + 'common.border' => $config['common.border'], + 'header.backgroundImage' => $config['header.backgroundImage'], + 'header.backgroundColor' => $config['header.backgroundColor'], + 'header.border' => $config['header.border'], + 'menu.normalIcon.path' => $config['menu.normalIcon.path'], + 'menu.normalIcon.name' => $config['menu.normalIcon.name'], + 'menu.activeIcon.path' => $config['menu.activeIcon.path'], + 'menu.activeIcon.name' => $config['menu.activeIcon.name'], + 'menu.disabledIcon.path' => $config['menu.disabledIcon.path'], + 'menu.disabledIcon.name' => $config['menu.disabledIcon.name'], + 'menu.hoverIcon.path' => $config['menu.hoverIcon.path'], + 'menu.hoverIcon.name' => $config['menu.hoverIcon.name'], + 'menu.iconSize.width' => $config['menu.iconSize.width'], + 'menu.iconSize.height' => $config['menu.iconSize.height'], + 'submenu.backgroundColor' => $config['submenu.backgroundColor'], + 'submenu.partition.color' => $config['submenu.partition.color'], + 'submenu.normalIcon.path' => $config['submenu.normalIcon.path'], + 'submenu.normalIcon.name' => $config['submenu.normalIcon.name'], + 'submenu.activeIcon.path' => $config['submenu.activeIcon.path'], + 'submenu.activeIcon.name' => $config['submenu.activeIcon.name'], + 'submenu.iconSize.width' => $config['submenu.iconSize.width'], + 'submenu.iconSize.height' => $config['submenu.iconSize.height'], + 'submenu.normalLabel.color' => $config['submenu.normalLabel.color'], + 'submenu.normalLabel.fontWeight' => $config['submenu.normalLabel.fontWeight'], + 'submenu.activeLabel.color' => $config['submenu.activeLabel.color'], + //'submenu.activeLabel.fontWeight' => $config['submenu.activeLabel.fontWeightcommon.bi.image'], + 'checkbox.border' => $config['checkbox.border'], + 'checkbox.backgroundColor' => $config['checkbox.backgroundColor'], + 'range.pointer.color' => $config['range.pointer.color'], + 'range.bar.color' => $config['range.bar.color'], + 'range.subbar.color' => $config['range.subbar.color'], + 'range.disabledPointer.color' => $config['range.disabledPointer.color'], + 'range.disabledBar.color' => $config['range.disabledBar.color'], + 'range.disabledSubbar.color' => $config['range.disabledSubbar.color'], + 'range.value.color' => $config['range.value.color'], + 'range.value.fontWeight' => $config['range.value.fontWeight'], + 'range.value.fontSize' => $config['range.value.fontSize'], + 'range.value.border' => $config['range.value.border'], + 'range.value.backgroundColor' => $config['range.value.backgroundColor'], + 'range.title.color' => $config['range.title.color'], + 'range.title.fontWeight' => $config['range.title.fontWeight'], + 'colorpicker.button.border' => $config['colorpicker.button.border'], + 'colorpicker.title.color' => $config['colorpicker.title.color'] + ), + ) +); diff --git a/libraries/filemanager-9.14.1/css/jquery.fileupload-noscript.css b/libraries/filemanager-9.14.1/css/jquery.fileupload-noscript.css new file mode 100644 index 0000000..2409bfb --- /dev/null +++ b/libraries/filemanager-9.14.1/css/jquery.fileupload-noscript.css @@ -0,0 +1,22 @@ +@charset "UTF-8"; +/* + * jQuery File Upload Plugin NoScript CSS + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2013, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * https://opensource.org/licenses/MIT + */ + +.fileinput-button input { + position: static; + opacity: 1; + filter: none; + font-size: inherit !important; + direction: inherit; +} +.fileinput-button span { + display: none; +} diff --git a/libraries/filemanager-9.14.1/css/jquery.fileupload-ui-noscript.css b/libraries/filemanager-9.14.1/css/jquery.fileupload-ui-noscript.css new file mode 100644 index 0000000..30651ac --- /dev/null +++ b/libraries/filemanager-9.14.1/css/jquery.fileupload-ui-noscript.css @@ -0,0 +1,17 @@ +@charset "UTF-8"; +/* + * jQuery File Upload UI Plugin NoScript CSS + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2012, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * https://opensource.org/licenses/MIT + */ + +.fileinput-button i, +.fileupload-buttonbar .delete, +.fileupload-buttonbar .toggle { + display: none; +} diff --git a/libraries/filemanager-9.14.1/css/jquery.fileupload-ui.css b/libraries/filemanager-9.14.1/css/jquery.fileupload-ui.css new file mode 100644 index 0000000..5bb9e42 --- /dev/null +++ b/libraries/filemanager-9.14.1/css/jquery.fileupload-ui.css @@ -0,0 +1,53 @@ +@charset "UTF-8"; +/* + * jQuery File Upload UI Plugin CSS + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2010, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * https://opensource.org/licenses/MIT + */ + +.fileupload-buttonbar .btn, +.fileupload-buttonbar .toggle { + margin-bottom: 5px; +} + +.fileupload-process { + float: right; + display: none; +} +.fileupload-processing .fileupload-process, +.files .processing .preview { + display: block; + width: 32px; + height: 32px; + background: url("../img/loading.gif") center no-repeat; + background-size: contain; +} +.files audio, +.files video { + max-width: 300px; +} + +@media (max-width: 767px) { + .fileupload-buttonbar .toggle, + .files .toggle, + .files .btn span { + display: none; + } + .files .name { + width: 80px; + word-wrap: break-word; + } + .files audio, + .files video { + max-width: 80px; + } + .files img, + .files canvas { + max-width: 100%; + } +} diff --git a/libraries/filemanager-9.14.1/css/jquery.fileupload.css b/libraries/filemanager-9.14.1/css/jquery.fileupload.css new file mode 100644 index 0000000..8ae3b09 --- /dev/null +++ b/libraries/filemanager-9.14.1/css/jquery.fileupload.css @@ -0,0 +1,37 @@ +@charset "UTF-8"; +/* + * jQuery File Upload Plugin CSS + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2013, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * https://opensource.org/licenses/MIT + */ + +.fileinput-button { + position: relative; + overflow: hidden; + display: inline-block; +} +.fileinput-button input { + position: absolute; + top: 0; + right: 0; + margin: 0; + opacity: 0; + -ms-filter: 'alpha(opacity=0)'; + font-size: 200px !important; + direction: ltr; + cursor: pointer; +} + +/* Fixes for IE < 8 */ +@media screen\9 { + .fileinput-button input { + filter: alpha(opacity=0); + font-size: 100%; + height: 100%; + } +} diff --git a/libraries/filemanager-9.14.1/css/rtl-style.css b/libraries/filemanager-9.14.1/css/rtl-style.css new file mode 100644 index 0000000..eb67f80 Binary files /dev/null and b/libraries/filemanager-9.14.1/css/rtl-style.css differ diff --git a/libraries/filemanager-9.14.1/css/style.css b/libraries/filemanager-9.14.1/css/style.css new file mode 100644 index 0000000..64d6512 --- /dev/null +++ b/libraries/filemanager-9.14.1/css/style.css @@ -0,0 +1,35 @@ +/*! + * Bootstrap v2.3.2 + * + * Copyright 2012 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + */article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:active,a:hover{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{width:auto\9;height:auto;max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img,.google-maps img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,html input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button}button,input[type=button],input[type=checkbox],input[type=radio],input[type=reset],input[type=submit],label,select{cursor:pointer}input[type=search]{box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}}body{margin:0;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333;background-color:#fff}a{color:#08c;text-decoration:none}a:focus,a:hover{color:#005580;text-decoration:underline}.img-rounded{border-radius:6px}.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);box-shadow:0 1px 3px rgba(0,0,0,.1)}.img-circle{border-radius:500px}.row{margin-left:-20px;*zoom:1}.row:after,.row:before{display:table;line-height:0;content:""}.row:after{clear:both}[class*=span]{float:left;min-height:1px;margin-left:20px}.container,.navbar-fixed-bottom .container,.navbar-fixed-top .container,.navbar-static-top .container,.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:after,.row-fluid:before{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*=span]{display:block;float:left;width:100%;min-height:30px;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;box-sizing:border-box}.row-fluid [class*=span]:first-child{margin-left:0}.row-fluid .controls-row [class*=span]+[class*=span]{margin-left:2.127659574468085%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%}.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%}.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%}.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%}.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%}.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%}.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%}.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%}.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%}.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%}.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%}.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%}.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%}.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%}.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%}.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%}.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%}.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%}.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%}.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%}.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%}.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%}.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%}.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%}.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%}.row-fluid [class*=span].hide,[class*=span].hide{display:none}.row-fluid [class*=span].pull-right,[class*=span].pull-right{float:right}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:after,.container:before{display:table;line-height:0;content:""}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:after,.container-fluid:before{display:table;line-height:0;content:""}.container-fluid:after{clear:both}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px}small{font-size:85%}strong{font-weight:700}em{font-style:italic}cite{font-style:normal}.muted{color:#999}a.muted:focus,a.muted:hover{color:gray}.text-warning{color:#c09853}a.text-warning:focus,a.text-warning:hover{color:#a47e3c}.text-error{color:#b94a48}a.text-error:focus,a.text-error:hover{color:#953b39}.text-info{color:#3a87ad}a.text-info:focus,a.text-info:hover{color:#2d6987}.text-success{color:#468847}a.text-success:focus,a.text-success:hover{color:#356635}.text-left{text-align:left}.text-right{text-align:right}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:700;line-height:20px;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:400;line-height:1;color:#999}h1,h2,h3{line-height:40px}h1{font-size:38.5px}h2{font-size:31.5px}h3{font-size:24.5px}h4{font-size:17.5px}h5{font-size:14px}h6{font-size:11.9px}h1 small{font-size:24.5px}h2 small{font-size:17.5px}h3 small,h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eee}ol,ul{padding:0;margin:0 0 10px 25px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}li{line-height:20px}ol.inline,ol.unstyled,ul.inline,ul.unstyled{margin-left:0;list-style:none}ol.inline>li,ul.inline>li{display:inline-block;*display:inline;padding-right:5px;padding-left:5px;*zoom:1}dl{margin-bottom:20px}dd,dt{line-height:20px}dt{font-weight:700}dd{margin-left:10px}.dl-horizontal{*zoom:1}.dl-horizontal:after,.dl-horizontal:before{display:table;line-height:0;content:""}.dl-horizontal:after{clear:both}.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:17.5px;font-weight:300;line-height:1.25}blockquote small{display:block;line-height:20px;color:#999}blockquote small:before{content:"\2014 \00A0"}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:""}blockquote.pull-right small:after{content:"\00A0 \2014"}blockquote:after,blockquote:before,q:after,q:before{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,Courier New,monospace;font-size:12px;color:#333;border-radius:3px}code{padding:2px 4px;color:#d14;white-space:nowrap;background-color:#f7f7f9;border:1px solid #e1e1e8}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;color:inherit;white-space:pre;white-space:pre-wrap;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{margin:0}fieldset,legend{padding:0;border:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}button,input,label,select,textarea{font-size:14px;font-weight:400;line-height:20px}button,input,select,textarea{font-family:Helvetica Neue,Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}.uneditable-input,input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555;vertical-align:middle;border-radius:4px}.uneditable-input,input,textarea{width:206px}textarea{height:auto}.uneditable-input,input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],textarea{background-color:#fff;border:1px solid #ccc;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);transition:border .2s linear,box-shadow .2s linear}.uneditable-input:focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,textarea:focus{border-color:rgba(82,168,236,.8);outline:0;outline:thin dotted\9;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(82,168,236,.6)}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;*margin-top:0;line-height:normal}input[type=button],input[type=checkbox],input[type=file],input[type=image],input[type=radio],input[type=reset],input[type=submit]{width:auto}input[type=file],select{height:30px;*margin-top:4px;line-height:30px}select{width:220px;background-color:#fff;border:1px solid #ccc}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus,select:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;cursor:not-allowed;background-color:#fcfcfc;border-color:#ccc;box-shadow:inset 0 1px 2px rgba(0,0,0,.025)}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.checkbox,.radio{min-height:20px;padding-left:20px}.checkbox input[type=checkbox],.radio input[type=radio]{float:left;margin-left:-20px}.controls>.checkbox:first-child,.controls>.radio:first-child{padding-top:5px}.checkbox.inline,.radio.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.checkbox.inline+.checkbox.inline,.radio.inline+.radio.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}.row-fluid .uneditable-input[class*=span],.row-fluid input[class*=span],.row-fluid select[class*=span],.row-fluid textarea[class*=span],.uneditable-input[class*=span],input[class*=span],select[class*=span],textarea[class*=span]{float:none;margin-left:0}.input-append .uneditable-input[class*=span],.input-append input[class*=span],.input-prepend .uneditable-input[class*=span],.input-prepend input[class*=span],.row-fluid .input-append [class*=span],.row-fluid .input-prepend [class*=span],.row-fluid .uneditable-input[class*=span],.row-fluid input[class*=span],.row-fluid select[class*=span],.row-fluid textarea[class*=span]{display:inline-block}.uneditable-input,input,textarea{margin-left:0}.controls-row [class*=span]+[class*=span]{margin-left:20px}.uneditable-input.span12,input.span12,textarea.span12{width:926px}.uneditable-input.span11,input.span11,textarea.span11{width:846px}.uneditable-input.span10,input.span10,textarea.span10{width:766px}.uneditable-input.span9,input.span9,textarea.span9{width:686px}.uneditable-input.span8,input.span8,textarea.span8{width:606px}.uneditable-input.span7,input.span7,textarea.span7{width:526px}.uneditable-input.span6,input.span6,textarea.span6{width:446px}.uneditable-input.span5,input.span5,textarea.span5{width:366px}.uneditable-input.span4,input.span4,textarea.span4{width:286px}.uneditable-input.span3,input.span3,textarea.span3{width:206px}.uneditable-input.span2,input.span2,textarea.span2{width:126px}.uneditable-input.span1,input.span1,textarea.span1{width:46px}.controls-row{*zoom:1}.controls-row:after,.controls-row:before{display:table;line-height:0;content:""}.controls-row:after{clear:both}.controls-row [class*=span],.row-fluid .controls-row [class*=span]{float:left}.controls-row .checkbox[class*=span],.controls-row .radio[class*=span]{padding-top:5px}input[disabled],input[readonly],select[disabled],select[readonly],textarea[disabled],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type=checkbox][disabled],input[type=checkbox][readonly],input[type=radio][disabled],input[type=radio][readonly]{background-color:transparent}.control-group.warning .checkbox,.control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #dbc59e}.control-group.warning .input-append .add-on,.control-group.warning .input-prepend .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error .checkbox,.control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #d59392}.control-group.error .input-append .add-on,.control-group.error .input-prepend .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success .checkbox,.control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7aba7b}.control-group.success .input-append .add-on,.control-group.success .input-prepend .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info .checkbox,.control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7ab5d3}.control-group.info .input-append .add-on,.control-group.info .input-prepend .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:invalid,select:focus:invalid,textarea:focus:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:invalid:focus,select:focus:invalid:focus,textarea:focus:invalid:focus{border-color:#e9322d;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1}.form-actions:after,.form-actions:before{display:table;line-height:0;content:""}.form-actions:after{clear:both}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;*display:inline;padding-left:5px;vertical-align:middle;*zoom:1}.input-append,.input-prepend{display:inline-block;margin-bottom:10px;font-size:0;white-space:nowrap;vertical-align:middle}.input-append .dropdown-menu,.input-append .popover,.input-append .uneditable-input,.input-append input,.input-append select,.input-prepend .dropdown-menu,.input-prepend .popover,.input-prepend .uneditable-input,.input-prepend input,.input-prepend select{font-size:14px}.input-append .uneditable-input,.input-append input,.input-append select,.input-prepend .uneditable-input,.input-prepend input,.input-prepend select{position:relative;margin-bottom:0;*margin-left:0;vertical-align:top;border-radius:0 4px 4px 0}.input-append .uneditable-input:focus,.input-append input:focus,.input-append select:focus,.input-prepend .uneditable-input:focus,.input-prepend input:focus,.input-prepend select:focus{z-index:2}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:400;line-height:20px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-append .btn,.input-append .btn-group>.dropdown-toggle,.input-prepend .add-on,.input-prepend .btn,.input-prepend .btn-group>.dropdown-toggle{vertical-align:top;border-radius:0}.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-append .uneditable-input,.input-append input,.input-append select,.input-prepend .add-on:first-child,.input-prepend .btn:first-child{border-radius:4px 0 0 4px}.input-append .uneditable-input+.btn-group .btn:last-child,.input-append input+.btn-group .btn:last-child,.input-append select+.btn-group .btn:last-child{border-radius:0 4px 4px 0}.input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px}.input-append .add-on:last-child,.input-append .btn-group:last-child>.dropdown-toggle,.input-append .btn:last-child{border-radius:0 4px 4px 0}.input-prepend.input-append .uneditable-input,.input-prepend.input-append input,.input-prepend.input-append select{border-radius:0}.input-prepend.input-append .uneditable-input+.btn-group .btn,.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn{border-radius:0 4px 4px 0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;border-radius:4px 0 0 4px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;border-radius:0 4px 4px 0}.input-prepend.input-append .btn-group:first-child{margin-left:0}input.search-query{padding-right:14px;padding-right:4px\9;padding-left:14px;padding-left:4px\9;margin-bottom:0;border-radius:15px}.form-search .input-append .search-query,.form-search .input-prepend .search-query{border-radius:0}.form-search .input-append .search-query{border-radius:14px 0 0 14px}.form-search .input-append .btn,.form-search .input-prepend .search-query{border-radius:0 14px 14px 0}.form-search .input-prepend .btn{border-radius:14px 0 0 14px}.form-horizontal .help-inline,.form-horizontal .input-append,.form-horizontal .input-prepend,.form-horizontal .uneditable-input,.form-horizontal input,.form-horizontal select,.form-horizontal textarea,.form-inline .help-inline,.form-inline .input-append,.form-inline .input-prepend,.form-inline .uneditable-input,.form-inline input,.form-inline select,.form-inline textarea,.form-search .help-inline,.form-search .input-append,.form-search .input-prepend,.form-search .uneditable-input,.form-search input,.form-search select,.form-search textarea{display:inline-block;*display:inline;margin-bottom:0;vertical-align:middle;*zoom:1}.form-horizontal .hide,.form-inline .hide,.form-search .hide{display:none}.form-inline .btn-group,.form-inline label,.form-search .btn-group,.form-search label{display:inline-block}.form-inline .input-append,.form-inline .input-prepend,.form-search .input-append,.form-search .input-prepend{margin-bottom:0}.form-inline .checkbox,.form-inline .radio,.form-search .checkbox,.form-search .radio{padding-left:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio],.form-search .checkbox input[type=checkbox],.form-search .radio input[type=radio]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px;*zoom:1}.form-horizontal .control-group:after,.form-horizontal .control-group:before{display:table;line-height:0;content:""}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right}.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0}.form-horizontal .controls:first-child{*padding-left:180px}.form-horizontal .help-block{margin-bottom:0}.form-horizontal .input-append+.help-block,.form-horizontal .input-prepend+.help-block,.form-horizontal .uneditable-input+.help-block,.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block{margin-top:10px}.form-horizontal .form-actions{padding-left:180px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:20px}.table td,.table th{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:700}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child td,.table caption+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table thead:first-child tr:first-child td,.table thead:first-child tr:first-child th{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed td,.table-condensed th{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;border-left:0;border-radius:4px}.table-bordered td,.table-bordered th{border-left:1px solid #ddd}.table-bordered caption+tbody tr:first-child td,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+thead tr:first-child th,.table-bordered tbody:first-child tr:first-child td,.table-bordered tbody:first-child tr:first-child th,.table-bordered thead:first-child tr:first-child th{border-top:0}.table-bordered tbody:first-child tr:first-child>td:first-child,.table-bordered tbody:first-child tr:first-child>th:first-child,.table-bordered thead:first-child tr:first-child>th:first-child{border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered tbody:first-child tr:first-child>td:last-child,.table-bordered tbody:first-child tr:first-child>th:last-child,.table-bordered thead:first-child tr:first-child>th:last-child{border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-bordered tbody:last-child tr:last-child>td:first-child,.table-bordered tbody:last-child tr:last-child>th:first-child,.table-bordered tfoot:last-child tr:last-child>td:first-child,.table-bordered tfoot:last-child tr:last-child>th:first-child,.table-bordered thead:last-child tr:last-child>th:first-child{border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px}.table-bordered tbody:last-child tr:last-child>td:last-child,.table-bordered tbody:last-child tr:last-child>th:last-child,.table-bordered tfoot:last-child tr:last-child>td:last-child,.table-bordered tfoot:last-child tr:last-child>th:last-child,.table-bordered thead:last-child tr:last-child>th:last-child{border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px}.table-bordered tfoot+tbody:last-child tr:last-child td:first-child{border-bottom-left-radius:0;-moz-border-radius-bottomleft:0}.table-bordered tfoot+tbody:last-child tr:last-child td:last-child{border-bottom-right-radius:0;-moz-border-radius-bottomright:0}.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered caption+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child{border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered caption+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child{border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover tbody tr:hover>td,.table-hover tbody tr:hover>th{background-color:#f5f5f5}.row-fluid table td[class*=span],.row-fluid table th[class*=span],table td[class*=span],table th[class*=span]{display:table-cell;float:none;margin-left:0}.table td.span1,.table th.span1{float:none;width:44px;margin-left:0}.table td.span2,.table th.span2{float:none;width:124px;margin-left:0}.table td.span3,.table th.span3{float:none;width:204px;margin-left:0}.table td.span4,.table th.span4{float:none;width:284px;margin-left:0}.table td.span5,.table th.span5{float:none;width:364px;margin-left:0}.table td.span6,.table th.span6{float:none;width:444px;margin-left:0}.table td.span7,.table th.span7{float:none;width:524px;margin-left:0}.table td.span8,.table th.span8{float:none;width:604px;margin-left:0}.table td.span9,.table th.span9{float:none;width:684px;margin-left:0}.table td.span10,.table th.span10{float:none;width:764px;margin-left:0}.table td.span11,.table th.span11{float:none;width:844px;margin-left:0}.table td.span12,.table th.span12{float:none;width:924px;margin-left:0}.table tbody tr.success>td{background-color:#dff0d8}.table tbody tr.error>td{background-color:#f2dede}.table tbody tr.warning>td{background-color:#fcf8e3}.table tbody tr.info>td{background-color:#d9edf7}.table-hover tbody tr.success:hover>td{background-color:#d0e9c6}.table-hover tbody tr.error:hover>td{background-color:#ebcccc}.table-hover tbody tr.warning:hover>td{background-color:#faf2cc}.table-hover tbody tr.info:hover>td{background-color:#c4e3f3}[class*=" icon-"],[class^=icon-]{display:inline-block;width:14px;height:14px;margin-top:1px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url(../img/glyphicons-halflings.png);background-position:14px 14px;background-repeat:no-repeat}.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-menu>.active>a>[class^=icon-],.dropdown-menu>li>a:focus>[class*=" icon-"],.dropdown-menu>li>a:focus>[class^=icon-],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^=icon-],.dropdown-submenu:focus>a>[class*=" icon-"],.dropdown-submenu:focus>a>[class^=icon-],.dropdown-submenu:hover>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^=icon-],.icon-white,.nav-list>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^=icon-],.nav-pills>.active>a>[class*=" icon-"],.nav-pills>.active>a>[class^=icon-],.navbar-inverse .nav>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^=icon-]{background-image:url(../img/glyphicons-halflings-white.png)}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{background-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.icon-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72px}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px}.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{background-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{width:16px;background-position:-216px -120px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{width:16px;background-position:-384px -120px}.icon-folder-open{width:16px;background-position:-408px -120px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fullscreen{background-position:-456px -144px}.dropdown,.dropup{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);*border-right-width:2px;*border-bottom-width:2px;border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:20px;color:#333;white-space:nowrap}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover,.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover,.dropdown-submenu:focus>a,.dropdown-submenu:hover>a{color:#fff;text-decoration:none;background-color:#0081c2;background-image:linear-gradient(180deg,#08c,#0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff0088cc",endColorstr="#ff0077b3",GradientType=0)}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#999}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:default;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open{*z-index:1000}.open>.dropdown-menu{display:block}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;border-radius:0 6px 6px 6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;border-radius:5px 5px 5px 0}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent;border-left-color:#ccc;border-style:solid;border-width:5px 0 5px 5px;content:" "}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;border-radius:6px 0 6px 6px}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.typeahead{z-index:1051;margin-top:2px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-large{padding:24px;border-radius:6px}.well-small{padding:9px;border-radius:3px}.fade{opacity:0;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:700;line-height:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;padding:4px 12px;margin-bottom:0;*margin-left:.3em;font-size:14px;line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px hsla(0,0%,100%,.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;*background-color:#e6e6e6;background-image:linear-gradient(180deg,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #ccc;*border:0;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);border-bottom-color:#b3b3b3;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffffffff",endColorstr="#ffe6e6e6",GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);*zoom:1;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.2),0 1px 2px rgba(0,0,0,.05)}.btn.active,.btn.disabled,.btn:active,.btn:focus,.btn:hover,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn.active,.btn:active{background-color:#ccc\9}.btn:first-child{*margin-left:0}.btn:focus,.btn:hover{color:#333;text-decoration:none;background-position:0 -15px;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;border-radius:6px}.btn-large [class*=" icon-"],.btn-large [class^=icon-]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;border-radius:3px}.btn-small [class*=" icon-"],.btn-small [class^=icon-]{margin-top:0}.btn-mini [class*=" icon-"],.btn-mini [class^=icon-]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;border-radius:3px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.btn-danger.active,.btn-info.active,.btn-inverse.active,.btn-primary.active,.btn-success.active,.btn-warning.active{color:hsla(0,0%,100%,.75)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#006dcc;*background-color:#04c;background-image:linear-gradient(180deg,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff0088cc",endColorstr="#ff0044cc",GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary.active,.btn-primary.disabled,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary.active,.btn-primary:active{background-color:#039\9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#faa732;*background-color:#f89406;background-image:linear-gradient(180deg,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#fffbb450",endColorstr="#fff89406",GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning.active,.btn-warning.disabled,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning.active,.btn-warning:active{background-color:#c67605\9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#da4f49;*background-color:#bd362f;background-image:linear-gradient(180deg,#ee5f5b,#bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffee5f5b",endColorstr="#ffbd362f",GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-danger.active,.btn-danger.disabled,.btn-danger:active,.btn-danger:focus,.btn-danger:hover,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger.active,.btn-danger:active{background-color:#942a25\9}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#5bb75b;*background-color:#51a351;background-image:linear-gradient(180deg,#62c462,#51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff62c462",endColorstr="#ff51a351",GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-success.active,.btn-success.disabled,.btn-success:active,.btn-success:focus,.btn-success:hover,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success.active,.btn-success:active{background-color:#408140\9}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#49afcd;*background-color:#2f96b4;background-image:linear-gradient(180deg,#5bc0de,#2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff5bc0de",endColorstr="#ff2f96b4",GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-info.active,.btn-info.disabled,.btn-info:active,.btn-info:focus,.btn-info:hover,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info.active,.btn-info:active{background-color:#24748c\9}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#363636;*background-color:#222;background-image:linear-gradient(180deg,#444,#222);background-repeat:repeat-x;border-color:#222 #222 #000;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff444444",endColorstr="#ff222222",GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-inverse.active,.btn-inverse.disabled,.btn-inverse:active,.btn-inverse:focus,.btn-inverse:hover,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse.active,.btn-inverse:active{background-color:#080808\9}button.btn,input[type=submit].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type=submit].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type=submit].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type=submit].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type=submit].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;box-shadow:none}.btn-link{color:#08c;cursor:pointer;border-color:transparent;border-radius:0}.btn-link:focus,.btn-link:hover{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover{color:#333;text-decoration:none}.btn-group{position:relative;display:inline-block;*display:inline;*margin-left:.3em;font-size:0;white-space:nowrap;vertical-align:middle;*zoom:1}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{margin-top:10px;margin-bottom:10px;font-size:0}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn+.btn-group,.btn-toolbar>.btn-group+.btn{margin-left:5px}.btn-group>.btn{position:relative;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px}.btn-group>.btn-mini{font-size:10.5px}.btn-group>.btn-small{font-size:11.9px}.btn-group>.btn-large{font-size:17.5px}.btn-group>.btn:first-child{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{border-top-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.btn-group>.btn.large:first-child{margin-left:0;border-bottom-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{border-top-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding:5px 8px;box-shadow:inset 1px 0 0 hsla(0,0%,100%,.125),inset 0 1px 0 hsla(0,0%,100%,.2),0 1px 2px rgba(0,0,0,.05)}.btn-group>.btn-mini+.dropdown-toggle{padding:2px 5px}.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn-large+.dropdown-toggle{padding:7px 12px}.btn-group.open .dropdown-toggle{background-image:none;box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#04c}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-large .caret{margin-top:6px;border-top-width:5px;border-right-width:5px;border-left-width:5px}.btn-mini .caret,.btn-small .caret{margin-top:8px}.dropup .btn-large .caret{border-bottom-width:5px}.btn-danger .caret,.btn-info .caret,.btn-inverse .caret,.btn-primary .caret,.btn-success .caret,.btn-warning .caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block;*display:inline;*zoom:1}.btn-group-vertical>.btn{display:block;float:none;max-width:100%;border-radius:0}.btn-group-vertical>.btn+.btn{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:first-child{border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child{border-radius:0 0 4px 4px}.btn-group-vertical>.btn-large:first-child{border-radius:6px 6px 0 0}.btn-group-vertical>.btn-large:last-child{border-radius:0 0 6px 6px}.alert{margin-bottom:20px;text-shadow:0 1px 0 hsla(0,0%,100%,.5);background-color:#fcf8e3;border:1px solid #fbeed5;border-radius:4px}.alert,.alert h4{color:#c09853}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-success h4{color:#468847}.alert-danger,.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-danger h4,.alert-error h4{color:#b94a48}.alert-info{background-color:#d9edf7;border-color:#bce8f1}.alert-info,.alert-info h4{color:#3a87ad}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-bottom:20px;margin-left:0;list-style:none}.nav>li>a{display:block}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li>a>img{max-width:none}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:700;line-height:20px;color:#999;text-shadow:0 1px 0 hsla(0,0%,100%,.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0}.nav-list .nav-header,.nav-list>li>a{margin-right:-15px;margin-left:-15px;text-shadow:0 1px 0 hsla(0,0%,100%,.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:focus,.nav-list>.active>a:hover{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.2);background-color:#08c}.nav-list [class*=" icon-"],.nav-list [class^=icon-]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-pills,.nav-tabs{*zoom:1}.nav-pills:after,.nav-pills:before,.nav-tabs:after,.nav-tabs:before{display:table;line-height:0;content:""}.nav-pills:after,.nav-tabs:after{clear:both}.nav-pills>li,.nav-tabs>li{float:left}.nav-pills>li>a,.nav-tabs>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:focus,.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:focus,.nav-tabs>.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:focus,.nav-pills>.active>a:hover{color:#fff;background-color:#08c}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{border-top-right-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px}.nav-tabs.nav-stacked>li:last-child>a{border-bottom-right-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px}.nav-tabs.nav-stacked>li>a:focus,.nav-tabs.nav-stacked>li>a:hover{z-index:2;border-color:#ddd}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{border-radius:6px}.nav .dropdown-toggle .caret{margin-top:6px;border-top-color:#08c;border-bottom-color:#08c}.nav .dropdown-toggle:focus .caret,.nav .dropdown-toggle:hover .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav>.dropdown.active>a:focus,.nav>.dropdown.active>a:hover{cursor:pointer}.nav-pills .open .dropdown-toggle,.nav-tabs .open .dropdown-toggle,.nav>li.dropdown.open.active>a:focus,.nav>li.dropdown.open.active>a:hover{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open.active .caret,.nav li.dropdown.open .caret,.nav li.dropdown.open a:focus .caret,.nav li.dropdown.open a:hover .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:focus,.tabs-stacked .open>a:hover{border-color:#999}.tabbable{*zoom:1}.tabbable:after,.tabbable:before{display:table;line-height:0;content:""}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-left>.nav-tabs,.tabs-right>.nav-tabs{border-bottom:0}.pill-content>.pill-pane,.tab-content>.tab-pane{display:none}.pill-content>.active,.tab-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:focus,.tabs-below>.nav-tabs>li>a:hover{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:focus,.tabs-below>.nav-tabs>.active>a:hover{border-color:transparent #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:focus,.tabs-left>.nav-tabs>li>a:hover{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:focus,.tabs-left>.nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:focus,.tabs-right>.nav-tabs>li>a:hover{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:focus,.tabs-right>.nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.nav>.disabled>a{color:#999}.nav>.disabled>a:focus,.nav>.disabled>a:hover{text-decoration:none;cursor:default;background-color:transparent}.navbar{*position:relative;*z-index:2;margin-bottom:20px;overflow:visible}.navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#fafafa;background-image:linear-gradient(180deg,#fff,#f2f2f2);background-repeat:repeat-x;border:1px solid #d4d4d4;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffffffff",endColorstr="#fff2f2f2",GradientType=0);*zoom:1;box-shadow:0 1px 4px rgba(0,0,0,.065)}.navbar-inner:after,.navbar-inner:before{display:table;line-height:0;content:""}.navbar-inner:after{clear:both}.navbar .container{width:auto}.nav-collapse.collapse{height:auto;overflow:visible}.navbar .brand{display:block;float:left;padding:10px 20px;margin-left:-20px;font-size:20px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.navbar .brand:focus,.navbar .brand:hover{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px;color:#777}.navbar-link{color:#777}.navbar-link:focus,.navbar-link:hover{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-right:1px solid #fff;border-left:1px solid #f2f2f2}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-append .btn,.navbar .input-append .btn-group,.navbar .input-prepend .btn,.navbar .input-prepend .btn-group{margin-top:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:after,.navbar-form:before{display:table;line-height:0;content:""}.navbar-form:after{clear:both}.navbar-form .checkbox,.navbar-form .radio,.navbar-form input,.navbar-form select{margin-top:5px}.navbar-form .btn,.navbar-form input,.navbar-form select{display:inline-block;margin-bottom:0}.navbar-form input[type=checkbox],.navbar-form input[type=image],.navbar-form input[type=radio]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{padding:4px 14px;margin-bottom:0;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:13px;font-weight:400;line-height:1;border-radius:15px}.navbar-static-top{position:static;margin-bottom:0}.navbar-static-top .navbar-inner{border-radius:0}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0}.navbar-fixed-bottom .navbar-inner,.navbar-fixed-top .navbar-inner{padding-right:0;padding-left:0;border-radius:0}.navbar-fixed-bottom .container,.navbar-fixed-top .container,.navbar-static-top .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{box-shadow:0 1px 10px rgba(0,0,0,.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{box-shadow:0 -1px 10px rgba(0,0,0,.1)}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px;color:#777;text-decoration:none;text-shadow:0 1px 0 #fff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{color:#333;text-decoration:none;background-color:transparent}.navbar .nav>.active>a,.navbar .nav>.active>a:focus,.navbar .nav>.active>a:hover{color:#555;text-decoration:none;background-color:#e5e5e5;box-shadow:inset 0 3px 8px rgba(0,0,0,.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-right:5px;margin-left:5px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#ededed;*background-color:#e5e5e5;background-image:linear-gradient(180deg,#f2f2f2,#e5e5e5);background-repeat:repeat-x;border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#fff2f2f2",endColorstr="#ffe5e5e5",GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1),0 1px 0 hsla(0,0%,100%,.075)}.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar:active,.navbar .btn-navbar:focus,.navbar .btn-navbar:hover,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar.active,.navbar .btn-navbar:active{background-color:#ccc\9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;border-radius:1px;box-shadow:0 1px 0 rgba(0,0,0,.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,.2);content:""}.navbar .nav>li>.dropdown-menu:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:""}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{top:auto;bottom:-7px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,.2)}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{top:auto;bottom:-6px;border-top:6px solid #fff;border-bottom:0}.navbar .nav li.dropdown>a:focus .caret,.navbar .nav li.dropdown>a:hover .caret{border-top-color:#333;border-bottom-color:#333}.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle,.navbar .nav li.dropdown.open>.dropdown-toggle{color:#555;background-color:#e5e5e5}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777;border-bottom-color:#777}.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .nav>li>.dropdown-menu.pull-right,.navbar .pull-right>li>.dropdown-menu{right:0;left:auto}.navbar .nav>li>.dropdown-menu.pull-right:before,.navbar .pull-right>li>.dropdown-menu:before{right:12px;left:auto}.navbar .nav>li>.dropdown-menu.pull-right:after,.navbar .pull-right>li>.dropdown-menu:after{right:13px;left:auto}.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu,.navbar .pull-right>li>.dropdown-menu .dropdown-menu{right:100%;left:auto;margin-right:-1px;margin-left:0;border-radius:6px 0 6px 6px}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:linear-gradient(180deg,#222,#111);background-repeat:repeat-x;border-color:#252525;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff222222",endColorstr="#ff111111",GradientType=0)}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-inverse .brand:focus,.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#fff}.navbar-inverse .brand,.navbar-inverse .navbar-text{color:#999}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:focus,.navbar-inverse .nav .active>a:hover{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:focus,.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .divider-vertical{border-right-color:#222;border-left-color:#111}.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open>.dropdown-toggle{color:#fff;background-color:#111}.navbar-inverse .nav li.dropdown>a:focus .caret,.navbar-inverse .nav li.dropdown>a:hover .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;box-shadow:inset 0 1px 2px rgba(0,0,0,.1),0 1px 0 hsla(0,0%,100%,.15);transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query.focused,.navbar-inverse .navbar-search .search-query:focus{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;outline:0;box-shadow:0 0 3px rgba(0,0,0,.15)}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#0e0e0e;*background-color:#040404;background-image:linear-gradient(180deg,#151515,#040404);background-repeat:repeat-x;border-color:#040404 #040404 #000;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff151515",endColorstr="#ff040404",GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar:active{background-color:#000\9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block;*display:inline;text-shadow:0 1px 0 #fff;*zoom:1}.breadcrumb>li>.divider{padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{margin:20px 0}.pagination ul{display:inline-block;*display:inline;margin-bottom:0;margin-left:0;border-radius:4px;*zoom:1;box-shadow:0 1px 2px rgba(0,0,0,.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination ul>.active>a,.pagination ul>.active>span,.pagination ul>li>a:focus,.pagination ul>li>a:hover{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>a,.pagination ul>.disabled>a:focus,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>span{color:#999;cursor:default;background-color:transparent}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;border-bottom-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px}.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.pagination-mini ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>a,.pagination-small ul>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px}.pagination-mini ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>a,.pagination-small ul>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px}.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px}.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px}.pager{margin:20px 0;text-align:center;list-style:none;*zoom:1}.pager:after,.pager:before{display:table;line-height:0;content:""}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#f5f5f5}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#999;cursor:default;background-color:#fff}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.3);*border:1px solid #999;border-radius:6px;outline:none;box-shadow:0 3px 7px rgba(0,0,0,.3);background-clip:padding-box}.modal.fade{top:-25%;transition:opacity .3s linear,top .3s ease-out}.modal.fade.in{top:10%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{position:relative;max-height:400px;padding:15px;overflow-y:auto}.modal-footer,.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;border-radius:0 0 6px 6px;*zoom:1;box-shadow:inset 0 1px 0 #fff}.modal-footer:after,.modal-footer:before{display:table;line-height:0;content:""}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.tooltip{position:absolute;z-index:1030;display:block;font-size:11px;line-height:1.4;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);background-clip:padding-box}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-title:empty{display:none}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-top-color:#fff;border-bottom-width:0}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right .arrow:after{bottom:-10px;left:1px;border-right-color:#fff;border-left-width:0}.popover.bottom .arrow{top:-11px;left:50%;margin-left:-11px;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);border-top-width:0}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-bottom-color:#fff;border-top-width:0}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-left-color:#999;border-left-color:rgba(0,0,0,.25);border-right-width:0}.popover.left .arrow:after{right:1px;bottom:-10px;border-left-color:#fff;border-right-width:0}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:after,.thumbnails:before{display:table;line-height:0;content:""}.thumbnails:after{clear:both}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;border-radius:4px;box-shadow:0 1px 3px rgba(0,0,0,.055);transition:all .2s ease-in-out}a.thumbnail:focus,a.thumbnail:hover{border-color:#08c;box-shadow:0 1px 4px rgba(0,105,214,.25)}.thumbnail>img{display:block;max-width:100%;margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px;color:#555}.media,.media-body{overflow:hidden;*overflow:visible;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{margin-left:0;list-style:none}.badge,.label{display:inline-block;padding:2px 4px;font-size:11.844px;font-weight:700;line-height:14px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);white-space:nowrap;vertical-align:baseline;background-color:#999}.label{border-radius:3px}.badge{padding-right:9px;padding-left:9px;border-radius:9px}.badge:empty,.label:empty{display:none}a.badge:focus,a.badge:hover,a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.badge-important,.label-important{background-color:#b94a48}.badge-important[href],.label-important[href]{background-color:#953b39}.badge-warning,.label-warning{background-color:#f89406}.badge-warning[href],.label-warning[href]{background-color:#c67605}.badge-success,.label-success{background-color:#468847}.badge-success[href],.label-success[href]{background-color:#356635}.badge-info,.label-info{background-color:#3a87ad}.badge-info[href],.label-info[href]{background-color:#2d6987}.badge-inverse,.label-inverse{background-color:#333}.badge-inverse[href],.label-inverse[href]{background-color:#1a1a1a}.btn .badge,.btn .label{position:relative;top:-1px}.btn-mini .badge,.btn-mini .label{top:0}@keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f7f7f7;background-image:linear-gradient(180deg,#f5f5f5,#f9f9f9);border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#fff5f5f5",endColorstr="#fff9f9f9",GradientType=0);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress,.progress .bar{background-repeat:repeat-x}.progress .bar{float:left;width:0;height:100%;font-size:12px;color:#fff;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#0e90d2;background-image:linear-gradient(180deg,#149bdf,#0480be);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff149bdf",endColorstr="#ff0480be",GradientType=0);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-sizing:border-box;transition:width .6s ease}.progress .bar+.bar{box-shadow:inset 1px 0 0 rgba(0,0,0,.15),inset 0 -1px 0 rgba(0,0,0,.15)}.progress-striped .bar{background-color:#149bdf;background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:40px 40px}.progress.active .bar{animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:linear-gradient(180deg,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffee5f5b",endColorstr="#ffc43c35",GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:linear-gradient(180deg,#62c462,#57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff62c462",endColorstr="#ff57a957",GradientType=0)}.progress-striped .bar-success,.progress-success.progress-striped .bar{background-color:#62c462;background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:linear-gradient(180deg,#5bc0de,#339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff5bc0de",endColorstr="#ff339bb9",GradientType=0)}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-warning .bar,.progress .bar-warning{background-color:#faa732;background-image:linear-gradient(180deg,#fbb450,#f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#fffbb450",endColorstr="#fff89406",GradientType=0)}.progress-striped .bar-warning,.progress-warning.progress-striped .bar{background-color:#fbb450;background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.accordion{margin-bottom:20px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:20px;line-height:1}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;transition:left .6s ease-in-out}.carousel-inner>.item>a>img,.carousel-inner>.item>img{display:block;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid #fff;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{right:15px;left:auto}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-indicators{position:absolute;top:15px;right:15px;z-index:5;margin:0;list-style:none}.carousel-indicators li{display:block;float:left;width:10px;height:10px;margin-left:5px;text-indent:-999px;background-color:#ccc;background-color:hsla(0,0%,100%,.25);border-radius:5px}.carousel-indicators .active{background-color:#fff}.carousel-caption{position:absolute;right:0;bottom:0;left:0;padding:15px;background:#333;background:rgba(0,0,0,.75)}.carousel-caption h4,.carousel-caption p{line-height:20px;color:#fff}.carousel-caption h4{margin:0 0 5px}.carousel-caption p{margin-bottom:0}.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eee;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;color:inherit}.hero-unit li{line-height:30px}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed} + +/*! + * Bootstrap Responsive v2.3.2 + * + * Copyright 2012 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + */.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;box-sizing:border-box}@-ms-viewport{width:device-width}.hidden{display:none;visibility:hidden}.hidden-desktop,.visible-phone,.visible-tablet{display:none!important}.visible-desktop{display:inherit!important}@media (min-width:768px) and (max-width:839px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}}@media (max-width:767px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-phone{display:inherit!important}.hidden-phone{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:inherit!important}.hidden-print{display:none!important}}@media (min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:after,.row:before{display:table;line-height:0;content:""}.row:after{clear:both}[class*=span]{float:left;min-height:1px;margin-left:30px}.container,.navbar-fixed-bottom .container,.navbar-fixed-top .container,.navbar-static-top .container,.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:after,.row-fluid:before{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*=span]{display:block;float:left;width:100%;min-height:30px;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;box-sizing:border-box}.row-fluid [class*=span]:first-child{margin-left:0}.row-fluid .controls-row [class*=span]+[class*=span]{margin-left:2.564102564102564%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%}.row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%}.row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%}.row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%}.row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%}.row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%}.row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%}.row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%}.row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%}.row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%}.row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%}.row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%}.row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%}.row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%}.row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%}.row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%}.row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%}.row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%}.row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%}.row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%}.row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%}.row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%}.row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%}.row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%}.row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%}.row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%}.row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%}.row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%}.row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%}.row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%}.row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%}.row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%}.row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%}.row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%}.row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%}.uneditable-input,input,textarea{margin-left:0}.controls-row [class*=span]+[class*=span]{margin-left:30px}.uneditable-input.span12,input.span12,textarea.span12{width:1156px}.uneditable-input.span11,input.span11,textarea.span11{width:1056px}.uneditable-input.span10,input.span10,textarea.span10{width:956px}.uneditable-input.span9,input.span9,textarea.span9{width:856px}.uneditable-input.span8,input.span8,textarea.span8{width:756px}.uneditable-input.span7,input.span7,textarea.span7{width:656px}.uneditable-input.span6,input.span6,textarea.span6{width:556px}.uneditable-input.span5,input.span5,textarea.span5{width:456px}.uneditable-input.span4,input.span4,textarea.span4{width:356px}.uneditable-input.span3,input.span3,textarea.span3{width:256px}.uneditable-input.span2,input.span2,textarea.span2{width:156px}.uneditable-input.span1,input.span1,textarea.span1{width:56px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media (min-width:768px) and (max-width:839px){.row{margin-left:-20px;*zoom:1}.row:after,.row:before{display:table;line-height:0;content:""}.row:after{clear:both}[class*=span]{float:left;min-height:1px;margin-left:20px}.container,.navbar-fixed-bottom .container,.navbar-fixed-top .container,.navbar-static-top .container,.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:after,.row-fluid:before{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*=span]{display:block;float:left;width:100%;min-height:30px;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;box-sizing:border-box}.row-fluid [class*=span]:first-child{margin-left:0}.row-fluid .controls-row [class*=span]+[class*=span]{margin-left:2.7624309392265194%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%}.row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%}.row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%}.row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%}.row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%}.row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%}.row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%}.row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%}.row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%}.row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%}.row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%}.row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%}.row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%}.row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%}.row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%}.row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%}.row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%}.row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%}.row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%}.row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%}.row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%}.row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%}.row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%}.row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%}.row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%}.row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%}.row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%}.row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%}.row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%}.row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%}.row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%}.row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%}.row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%}.row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%}.row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%}.uneditable-input,input,textarea{margin-left:0}.controls-row [class*=span]+[class*=span]{margin-left:20px}.uneditable-input.span12,input.span12,textarea.span12{width:710px}.uneditable-input.span11,input.span11,textarea.span11{width:648px}.uneditable-input.span10,input.span10,textarea.span10{width:586px}.uneditable-input.span9,input.span9,textarea.span9{width:524px}.uneditable-input.span8,input.span8,textarea.span8{width:462px}.uneditable-input.span7,input.span7,textarea.span7{width:400px}.uneditable-input.span6,input.span6,textarea.span6{width:338px}.uneditable-input.span5,input.span5,textarea.span5{width:276px}.uneditable-input.span4,input.span4,textarea.span4{width:214px}.uneditable-input.span3,input.span3,textarea.span3{width:152px}.uneditable-input.span2,input.span2,textarea.span2{width:90px}.uneditable-input.span1,input.span1,textarea.span1{width:28px}}@media (max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}.thumbnails>li{float:none;margin-left:0}.row-fluid [class*=span],.uneditable-input[class*=span],[class*=span]{display:block;float:none;width:100%;margin-left:0;box-sizing:border-box}.row-fluid .span12,.span12{width:100%;box-sizing:border-box}.row-fluid [class*=offset]:first-child{margin-left:0}.input-large,.input-xlarge,.input-xxlarge,.uneditable-input,input[class*=span],select[class*=span],textarea[class*=span]{display:block;width:100%;min-height:30px;box-sizing:border-box}.input-append input,.input-append input[class*=span],.input-prepend input,.input-prepend input[class*=span]{display:inline-block;width:auto}.controls-row [class*=span]+[class*=span]{margin-left:0}.modal{position:fixed;top:20px;right:20px;left:20px;width:auto;margin:0}.modal.fade{top:-100px}.modal.fade.in{top:20px}}@media (max-width:480px){.nav-collapse{-webkit-transform:translateZ(0)}.page-header h1 small{display:block;line-height:20px}input[type=checkbox],input[type=radio]{border:1px solid #ccc}.form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.media .pull-left,.media .pull-right{display:block;float:none;margin-bottom:10px}.media-object{margin-right:0;margin-left:0}.modal{top:10px;right:10px;left:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media (max-width:839px){body{padding-top:0}.navbar-fixed-bottom,.navbar-fixed-top{position:static}.navbar-fixed-top{margin-bottom:20px}.navbar-fixed-bottom{margin-top:20px}.navbar-fixed-bottom .navbar-inner,.navbar-fixed-top .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 10px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#777;text-shadow:none}.nav-collapse .dropdown-menu a,.nav-collapse .nav>li>a{padding:9px 15px;font-weight:700;color:#777;border-radius:3px}.nav-collapse .btn{padding:4px 10px;font-weight:400;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .dropdown-menu a:focus,.nav-collapse .dropdown-menu a:hover,.nav-collapse .nav>li>a:focus,.nav-collapse .nav>li>a:hover{background-color:#f2f2f2}.navbar-inverse .nav-collapse .dropdown-menu a,.navbar-inverse .nav-collapse .nav>li>a{color:#999}.navbar-inverse .nav-collapse .dropdown-menu a:focus,.navbar-inverse .nav-collapse .dropdown-menu a:hover,.navbar-inverse .nav-collapse .nav>li>a:focus,.navbar-inverse .nav-collapse .nav>li>a:hover{background-color:#111}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:none;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:none;border-radius:0;box-shadow:none}.nav-collapse .open>.dropdown-menu{display:block}.nav-collapse .dropdown-menu .divider,.nav-collapse .dropdown-menu:after,.nav-collapse .dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after,.nav-collapse .nav>li>.dropdown-menu:before{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1),0 1px 0 hsla(0,0%,100%,.1)}.navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111;border-bottom-color:#111}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media (min-width:840px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}}html.with-featherlight{overflow:hidden}.featherlight{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:2147483647;text-align:center;white-space:nowrap;cursor:pointer;background:#333;background:transparent}.featherlight:last-of-type{background:rgba(0,0,0,.8)}.featherlight:before{content:"";display:inline-block;height:100%;vertical-align:middle}.featherlight .featherlight-content{position:relative;text-align:left;vertical-align:middle;display:inline-block;overflow:auto;padding:25px 25px 0;border-bottom:25px solid transparent;margin-left:5%;margin-right:5%;max-height:95%;background:#fff;cursor:auto;white-space:normal}.featherlight .featherlight-inner{display:block}.featherlight link.featherlight-inner,.featherlight script.featherlight-inner,.featherlight style.featherlight-inner{display:none}.featherlight .featherlight-close-icon{position:absolute;z-index:9999;top:0;right:0;line-height:25px;width:25px;cursor:pointer;text-align:center;font-family:Arial,sans-serif;background:#fff;background:hsla(0,0%,100%,.3);color:#000;border:none;padding:0}.featherlight .featherlight-close-icon::-moz-focus-inner{border:0;padding:0}.featherlight .featherlight-image{width:100%}.featherlight-iframe .featherlight-content{border-bottom:0;padding:0;-webkit-overflow-scrolling:touch}.featherlight iframe{border:none}.featherlight *{box-sizing:border-box}@media only screen and (max-width:1024px){.featherlight .featherlight-content{margin-left:0;margin-right:0;max-height:98%;padding:10px 10px 0;border-bottom:10px solid transparent}}@media print{html.with-featherlight>*>:not(.featherlight){display:none}} + +/*! + * jQuery contextMenu - Plugin for simple contextMenu handling + * + * Version: v1.10.3 + * + * Authors: Björn Brala (SWIS.nl), Rodney Rehm, Addy Osmani (patches for FF) + * Web: http://swisnl.github.io/jQuery-contextMenu/ + * + * Copyright (c) 2011-2015 SWIS BV and contributors + * + * Licensed under + * MIT License http://www.opensource.org/licenses/mit-license + + * Date: 2015-12-03T20:12:18.263Z + */.context-menu-list{position:absolute;display:inline-block;min-width:120px;max-width:250px;padding:0;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px;list-style-type:none;background:#eee;border:1px solid #ddd;box-shadow:0 2px 5px rgba(0,0,0,.5)}.context-menu-item{padding:2px 2px 2px 24px;-moz-user-select:none;background-color:#eee}.context-menu-item>label>input,.context-menu-item>label>textarea{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.context-menu-item.hover{cursor:pointer;background-color:#39f}.context-menu-item.disabled{color:#666}.context-menu-submenu:after{position:absolute;top:0;right:3px;z-index:1;color:#666;content:">"}.context-menu-item.icon{min-height:18px;list-style-type:none;background-repeat:no-repeat;background-position:4px 2px}.context-menu-item.icon-edit{background-image:url(images/page_white_edit.png)}.context-menu-item.icon-cut{background-image:url(images/cut.png)}.context-menu-item.icon-copy{background-image:url(images/page_white_copy.png)}.context-menu-item.icon-paste{background-image:url(images/page_white_paste.png)}.context-menu-item.icon-delete{background-image:url(images/page_white_delete.png)}.context-menu-item.icon-add{background-image:url(images/page_white_add.png)}.context-menu-item.icon-quit{background-image:url(images/door.png)}.context-menu-input>label>*{vertical-align:top}.context-menu-input>label>input[type=checkbox],.context-menu-input>label>input[type=radio]{margin-left:-17px}.context-menu-input>label>span{margin-left:5px}.context-menu-input>label,.context-menu-input>label>input[type=text],.context-menu-input>label>select,.context-menu-input>label>textarea{display:block;width:100%;box-sizing:border-box}.context-menu-input>label>textarea{height:100px}.context-menu-item>.context-menu-list{top:5px;right:-5px;display:none}.context-menu-item.visible>.context-menu-list{display:block}.context-menu-accesskey{text-decoration:underline}*,:after,:before{box-sizing:border-box}body,html{font-family:Open Sans,sans-serif;font-size:100%;padding:0;margin:0;height:100%}body{padding-top:32px;font-weight:200;background:#ececec;overflow:-moz-scrollbars-vertical}.btn{background-image:none!important;text-shadow:none!important;border-color:none!important;box-shadow:none!important}.btn:focus{outline:none}.btn-inverse{background-image:none!important;background:#333}pre.no-prettify,pre.prettyprint{height:300px;margin:0!important;width:100%!important;overflow:scroll;border-radius:0!important}.input-append .add-on:last-child,.input-append .btn-group:last-child>.dropdown-toggle,.input-append .btn:last-child{border-radius:0!important}[class*=" rficon-"],[class^=rficon-]{display:inline-block;width:16px;height:16px;margin-top:1px;*margin-right:.3em;line-height:16px;vertical-align:text-top;background-position:0 0;background-repeat:no-repeat}.rficon-clipboard-apply{background-image:url(../img/clipboard_apply.png)}.rficon-clipboard-clear{background-image:url(../img/clipboard_clear.png)}.rficon-upload{background-image:url(../img/upload.png)}.btn{border-radius:0}.container-fluid{padding-right:0!important;margin-top:10px!important}.img-precontainer{width:100%;background:#fff}.img-container,.img-precontainer{margin:auto;text-align:center;border:none}.img-container{height:91px;width:122px;padding:0;overflow:hidden;display:table-cell;vertical-align:middle;background-image:url(../img/trans.jpg);background-size:13px}.img-container img{max-width:122px;max-height:91px}ul.breadcrumb{margin-bottom:5px;border-radius:0;padding-bottom:4px;padding-top:6px;background:#f0f0f0;box-shadow:0 1px 4px rgba(0,0,0,.065);border-bottom:1px solid #bbb}ul.breadcrumb .pull-left i{margin-top:2px}ul.breadcrumb li.multiple{margin-top:-4px;padding-right:20px}.alert{padding:8px 35px 8px 14px;margin-bottom:2px;border:1px solid #aaa;color:#666;font-weight:200;font-size:13px;border-radius:0;background:#fff}.img-container *,.img-container-mini *{vertical-align:middle}#help{display:none}.text-center{text-align:center}iframe{overflow:auto;-webkit-overflow-scrolling:touch}.uploader{position:fixed;top:6px;left:6px;right:6px;bottom:6px;z-index:9999;background:#eee;border:1px solid #ccc;display:none;box-shadow:0 0 10px 0 rgba(1,1,1,.5)}.uploader .flex{padding:10px;position:relative}.uploader .container1,.uploader .container2,.uploader .flex{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}.uploader .upload-help{font-size:11px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff;text-align:center}.uploader .upload-tabbable{padding:2px;height:100%;overflow:hidden}.uploader .upload-tabbable .nav{margin:0}.uploader .upload-tabbable .nav li a{font-size:13px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.uploader .upload-tabbable #urlUpload{padding:5px 10px}.uploader .upload-tabbable .tab-content{padding:5px;border-bottom:1px solid #ddd;border-left:1px solid #ddd;border-right:1px solid #ddd;background:#fff;-ms-flex-positive:2;flex-grow:2;position:relative}.uploader .upload-tabbable .tab-content .tab-pane{position:absolute;top:0;bottom:0;left:0;right:0;padding:5px}.uploader .upload-tabbable .tab-content form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}.uploader .upload-tabbable .tab-content form #filesTable{-ms-flex-positive:2;flex-grow:2;overflow-y:scroll;background:#fff;font-size:.95em}.uploader .upload-tabbable .tab-content form #filesTable .progress{margin-bottom:4px}input#filter-input{margin:0 0 2px;width:84px;height:26px;vertical-align:bottom;border-radius:0;font-size:12px;font-weight:200;position:relative;left:1px}.qq-uploader .span9{margin-left:14px!important;width:690px!important}.space10{clear:both;height:10px}h4{font-size:12px;text-align:center;padding:0;margin:6px 0 0;line-height:18px}h3,h4{font-weight:200}h3{font-size:14px}.boxes{border:1px solid #ccc;word-wrap:break-word;background:#fff;box-shadow:1px 1px 2px 0 rgba(0,0,0,.2);min-height:115px;text-align:center}.container-fluid{padding:0 10px!important}body .avpw .avpw_primary_button,body .avpw .avpw_primary_button:active,body .avpw .avpw_primary_button:link,body .avpw .avpw_primary_button:visited{color:#fff;background:#999;border:none}body .avpw .avpw_primary_button:hover{border:none;background:#666}.download-form{margin-bottom:25px}.grid li i{margin-left:2px;margin-right:2px;z-index:0}.box,.boxx{word-wrap:break-word;vertical-align:top;text-align:left;position:relative;z-index:100;padding:4px}.box,.box .btn,.boxx{border:none;box-shadow:none}.box .btn{width:100%;background:none;z-index:200}.navbar{margin-bottom:0;border-bottom:1px solid #bbb}.navbar .navbar-inner{border:none;min-height:35px;border-radius:0;padding-bottom:2px;margin:0;padding-right:8px;padding-left:8px}.navbar .navbar-inner .container-fluid{margin:0;margin-top:0!important;padding:0}.navbar .navbar-inner .container-fluid .brand{display:none}.navbar .navbar-inner .container-fluid .filters span{margin-top:0;font-size:13px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}ul.sorting{position:absolute;left:-25px;top:20px;min-width:0;background:#eee}ul.sorting li a:hover{background:#aaa}.btn-group .dropdown-toggle.sorting-btn{position:relative;top:-5px;font-size:13px}.btn-group .dropdown-toggle.sorting-btn,.btn-group .dropdown-toggle.sorting-btn:hover{background:none;border:none;box-shadow:none;-webkit-box-shadow:none}ul.sorting.dropdown-menu>li>a{font-size:12px;text-shadow:none}ul.sorting.dropdown-menu>li>a.descending{background-image:url(../img/down.png);background-repeat:no-repeat;background-position:6px 8px}ul.sorting.dropdown-menu>li>a.ascending{background-image:url(../img/up.png);background-repeat:no-repeat;background-position:6px 8px}.sorter-container{margin-top:5px;margin-bottom:0;border-radius:0;padding-bottom:4px;padding-top:6px;box-shadow:0 1px 4px rgba(0,0,0,.065);background-color:#f5f5f5;position:relative;border-bottom:1px solid #bbb;height:24px}.sorter-container a.sorter{color:#000}.sorter-container a.descending{padding-left:9px;background-image:url(../img/down.png);background-repeat:no-repeat;background-position:0 3px}.sorter-container a.ascending{padding-left:9px;background-image:url(../img/up.png);background-repeat:no-repeat;background-position:0 4px}.sorter-container .file-date,.sorter-container .file-extension,.sorter-container .file-name,.sorter-container .file-operations,.sorter-container .file-size,.sorter-container .img-dimension{display:block;position:absolute;top:0;z-index:100;box-shadow:none;text-align:left;font-size:13px;margin-top:1px;color:#999}.sorter-container .file-operations{width:110px;right:0}.sorter-container .img-dimension{width:65px;right:123px}.sorter-container .file-date{width:70px;right:188px}.sorter-container .file-size{width:55px;right:258px}.sorter-container .file-extension{width:40px;right:313px}.sorter-container .file-name{width:50px;left:52px}.file-date,.file-extension,.file-name,.file-operations,.file-size,.img-dimension{font-size:12px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff;display:none}.view-controller{text-align:left}.view-controller .btn-group>.btn:first-child,.view-controller .btn-group>.btn:last-child{border-radius:0}.navbar .filters .btn{margin-bottom:2px;padding:2px 5px;margin-top:5px}.filters .types{text-align:right}.fileupload-buttonbar{margin-bottom:10px}.fileupload-buttonbar .progress{margin:0}@media (max-width:780px){#view2{display:none}}@media (min-width:840px){.mobile-inline-visible{display:none!important}}@media (max-width:839px){body{padding-top:0!important}.mobile-inline-visible{display:inline!important}.filters .types{text-align:left}.navbar .navbar-inner .container-fluid .brand{display:block}.navbar .navbar-inner{padding-bottom:4px}.filters div.span2.half,.filters div.span3.half,.filters div.span4.half{float:left;width:auto;margin-right:10px}.filters div.entire{float:none;width:100%;clear:both}.container-fluid{margin:0!important;padding:0}#qLbar{height:50px!important}}@media (min-width:400px) and (max-width:839px){.filters .row-fluid .half{width:48.61878453038674%;*width:48.56559304102504%;float:left}}.tooltip.in{opacity:1;filter:alpha(opacity=1)}.tooltip,.tooltip.in{z-index:10000;font-weight:700}.grid{padding:0;margin:0 auto;list-style:none;-webkit-overflow-scrolling:touch}.ui-draggable-helper{z-index:10}.grid li{display:inline-block;width:124px;border:none;margin:4px;margin-bottom:8px;padding:0;vertical-align:top}.grid figure{margin:0;position:relative;display:block;width:122px;margin:auto}.grid figure:hover{background:#e0e0e0!important}.list-view1.grid li,.list-view1.grid li figure{width:100%}.grid figcaption{text-align:center;padding:2px;padding-top:8px;color:#fff;height:30px;width:122px;margin-left:0;margin-right:0;position:absolute;top:auto;bottom:0;box-shadow:inset 0 0 8px 0 rgba(41,41,41,.5)}.grid figcaption a{margin:0;padding:3px}.grid figcaption h3{margin:0;padding:0;color:#fff}.grid h4{text-align:center;color:#000;padding:0;margin-bottom:4px;margin-top:4px}.grid figure .box{box-sizing:content-box;cursor:pointer}.list-view0.grid figure .box,.list-view1.grid figure .box,.list-view2.grid figure .box{max-width:100%;display:block;position:relative;overflow:hidden;z-index:1}.list-view0.grid figure .box h4.ellipsis,.list-view1.grid figure .box h4.ellipsis,.list-view2.grid figure .box h4.ellipsis{height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.list-view0.grid figure .box h4,.list-view0.grid figure .box h4 a,.list-view1.grid figure .box h4,.list-view1.grid figure .box h4 a,.list-view2.grid figure .box h4,.list-view2.grid figure .box h4 a{z-index:1}.no-touch .list-view0 figure .box{z-index:1;transition:transform .3s}.list-view0.grid .ui-state-highlight .img-precontainer{background:grey!important}.list-view0.grid .ui-state-highlight .img-precontainer .img-container{background:repeating-linear-gradient(45deg,transparent,transparent 5px,hsla(0,0%,100%,.4) 0,hsla(0,0%,100%,.3) 10px);border:none;overflow:hidden}.list-view0.grid .ui-state-hover .img-precontainer .img-container{background:#666}.list-view1.grid .ui-state-highlight:nth-child(odd) figure,.list-view2.grid .ui-state-highlight:nth-child(odd) figure{background:#ddd!important;border-bottom-color:#444!important}.list-view1.grid .ui-state-highlight:nth-child(2n) figure,.list-view2.grid .ui-state-highlight:nth-child(2n) figure{background:#ccc!important;border-bottom-color:#aaa!important}.list-view1.grid .ui-state-highlight.ui-state-hover figure,.list-view2.grid .ui-state-highlight.ui-state-hover figure{background-color:#aaa!important}.no-touch .list-view0 figure.cs-hover .box,.no-touch .list-view0 figure:hover .box{box-shadow:0 0 4px 0 rgba(1,1,1,.5);transform:translateY(-26px)}.list-view0 figure.cs-hover .box.no-effect,.list-view0 figure:hover .box.no-effect,.no-effect{box-shadow:none;transform:none}.list-view0 .img-precontainer-mini{display:none;background:none}a,a:hover{color:#000;text-decoration:none}.back-directory .box,.back-directory .img-precontainer,.back-directory .img-precontainer-mini{background:none}form{margin:0;padding:0}.google-iframe,.viewer-iframe{width:100%;height:500px;border:none}.modal{width:60%;margin-left:-30%}.modal-body{padding:6px}.modal-body form,.modal-body input,.modal-body textarea{margin:0;border-radius:0}.modal-body .text-center{padding-bottom:6px}.modal-footer{padding:7px}.modal-header{padding:7px 8px!important}.modal-header h3{font-weight:300;font-size:20px}.list-view1.sorter-container{display:block}.list-view0.sorter-container,.list-view2.sorter-container{display:none}.selector{z-index:1}.selector .cont{display:block;position:relative;padding-left:35px;margin-bottom:12px;cursor:pointer;font-size:22px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.selector .cont input{position:absolute;opacity:0;cursor:pointer}.selector .cont input:checked~.checkmark{background-color:#2196f3}.selector .cont .checkmark{position:absolute;top:0;left:0;height:18px;width:18px;background-color:#fff;border:1px solid #ddd;transition:background-color .5s ease;-webkit-transition:background-color .5s ease-out;-moz-transition:background-color .5s ease-out;-o-transition:background-color .5s ease-out}.selector .cont .checkmark:after{content:"";position:absolute;display:none;left:5px;top:1px;width:6px;height:12px;border:solid #fff;border-width:0 3px 3px 0;transform:rotate(45deg)}.selector .cont:hover input~.checkmark{background-color:#ddd}.selector .cont input:checked~.checkmark:after{display:block}.list-view0.grid .selector{position:absolute;top:2px;left:2px;width:18px;height:22px}.list-view0.grid .img-precontainer .img-container img{max-width:122px!important;max-height:91px!important}.list-view0.grid .img-precontainer .img-container img.icon{width:122px;margin-top:0}.list-view0.grid .img-precontainer .filetype{position:absolute;top:0;width:122px;text-align:center;color:#fff;font-size:13px;line-height:22px}.list-view0.grid .cover{background:hsla(0,0%,100%,.25);width:122px;position:absolute;top:22px;right:0;height:69px}.list-view0.grid .box{background:#fff}.list-view0.grid .directory{background:#ddd}.list-view0.grid figure.back-directory .directory{background:#bbb}.list-view0.grid figcaption{background:#fff}.list-view0.grid .selected figure{border:none;height:126px}.list-view0.grid .selected figure .box,.list-view0.grid .selected figure>a,.list-view0.grid .selected figure figcaption{display:none}.list-view1.grid li,.list-view2.grid li{margin:0}.list-view1.grid li.back figure.back-directory,.list-view2.grid li.back figure.back-directory{height:34px}.list-view1.grid li.no-selector .img-container-mini,.list-view2.grid li.no-selector .img-container-mini{padding-left:0}.list-view1.grid li.no-selector figure .box,.list-view2.grid li.no-selector figure .box{margin-left:48px}.list-view1.grid li:nth-child(odd) figure,.list-view2.grid li:nth-child(odd) figure{background:#f9f9f9}.list-view1.grid li:nth-child(odd) figure.directory,.list-view2.grid li:nth-child(odd) figure.directory{background:#eaeaea}.list-view1.grid li figure,.list-view2.grid li figure{border-bottom:1px solid #aaa;background:#fff}.list-view1.grid li figure.back-directory,.list-view2.grid li figure.back-directory{background:#bbb}.list-view1.grid li figure.back-directory .box,.list-view2.grid li figure.back-directory .box{background:none}.list-view1.grid li figure.directory,.list-view2.grid li figure.directory{background:#efefef}.list-view1.grid li figure.directory box,.list-view2.grid li figure.directory box{padding:0;min-height:10px}.list-view1.grid li figure .box,.list-view2.grid li figure .box{margin-left:70px;transition:none}.list-view1.grid li figure .box h4,.list-view2.grid li figure .box h4{padding-top:1px;font-size:13px;text-align:left}.list-view1.grid .img-precontainer-mini,.list-view2.grid .img-precontainer-mini{display:block;position:absolute;width:45px;left:22px;height:34px;overflow:hidden;text-align:center}.list-view1.grid .img-precontainer-mini img,.list-view2.grid .img-precontainer-mini img{max-width:45px;width:45px}.list-view1.grid .img-precontainer-mini .filetype,.list-view2.grid .img-precontainer-mini .filetype{position:absolute;top:1px;left:0;text-align:center;padding:1px 2px;font-size:13px;line-height:32px;width:45px;height:32px;color:#fff;background:#333}.list-view1.grid .cover,.list-view2.grid .cover{display:none}.list-view1.grid .selector,.list-view2.grid .selector{top:8px;left:2px;position:relative}.list-view1.grid .selector .cont,.list-view2.grid .selector .cont{margin:0}.list-view1.grid .img-container-mini,.list-view2.grid .img-container-mini{width:45px;height:34px;border:none;overflow:hidden;text-align:center;vertical-align:middle;margin:auto;left:24px}.list-view1.grid .img-precontainer-mini.original-thumb,.list-view2.grid .img-precontainer-mini.original-thumb{padding:0}.list-view1.grid .img-precontainer-mini.original-thumb img,.list-view2.grid .img-precontainer-mini.original-thumb img{width:auto;max-height:32px}.list-view1.grid .img-precontainer-mini.original-thumb img.original,.list-view2.grid .img-precontainer-mini.original-thumb img.original{width:auto;height:auto}.list-view1.grid .img-precontainer,.list-view2.grid .img-precontainer{display:none}.list-view1.grid figcaption,.list-view2.grid figcaption{background:none;width:120px;position:absolute;right:0;top:0;z-index:1;bottom:0;box-shadow:none;text-align:right}.list-view1.grid .selected figure,.list-view2.grid .selected figure{background:#ccc!important}.list-view1.grid .file-date,.list-view1.grid .file-extension,.list-view1.grid .file-size,.list-view1.grid .img-dimension{overflow:hidden;display:block;position:absolute;top:0;z-index:1;box-shadow:none;text-align:left;margin-top:7px}.list-view1.grid .img-dimension{width:65px;right:120px}.list-view1.grid .file-date{width:70px;right:185px}.list-view1.grid .file-size{width:55px;right:255px}.list-view1.grid .file-extension{width:40px;right:310px}.list-view1.grid figure .box{padding-right:352px}.list-view2.grid figure .box{padding-right:115px}@media (max-width:610px){.list-view1.grid figure .box{padding-right:312px}.list-view1.grid figure .file-extension,.sorter-container .file-extension{display:none}}@media (max-width:565px){.list-view1.grid figure .box{padding-right:257px}.list-view1.grid figure .file-size,.sorter-container .file-size{display:none}}@media (max-width:495px){.list-view1.grid figure .box{padding-right:187px}.list-view1.grid figure .file-date,.sorter-container .file-date{display:none}}@media (max-width:430px){.list-view1.grid figure .box{padding-right:115px}.list-view1.grid figure .img-dimension,.sorter-container .img-dimension{display:none}.breadcrumb{margin-left:0;margin-right:0}}.list-view1.grid .img-precontainer-mini .filetype.pdf,.list-view2.grid .img-precontainer-mini .filetype.pdf{background:#cb0011}.list-view1.grid .img-precontainer-mini .filetype.css,.list-view2.grid .img-precontainer-mini .filetype.css{background:#d10698}.list-view1.grid .img-precontainer-mini .filetype.ai,.list-view2.grid .img-precontainer-mini .filetype.ai{background:#d6772f}.list-view1.grid .img-precontainer-mini .filetype.psd,.list-view2.grid .img-precontainer-mini .filetype.psd{background:#0960a4}.list-view1.grid .img-precontainer-mini .filetype.html,.list-view1.grid .img-precontainer-mini .filetype.xhtml,.list-view2.grid .img-precontainer-mini .filetype.html,.list-view2.grid .img-precontainer-mini .filetype.xhtml{background:#035bc4}.list-view1.grid .img-precontainer-mini .filetype.fla,.list-view1.grid .img-precontainer-mini .filetype.flv,.list-view2.grid .img-precontainer-mini .filetype.fla,.list-view2.grid .img-precontainer-mini .filetype.flv{background:#cf302e}.list-view1.grid .img-precontainer-mini .filetype.ppt,.list-view1.grid .img-precontainer-mini .filetype.pptx,.list-view2.grid .img-precontainer-mini .filetype.ppt,.list-view2.grid .img-precontainer-mini .filetype.pptx{background:#da5b00}.list-view1.grid .img-precontainer-mini .filetype.css,.list-view1.grid .img-precontainer-mini .filetype.xls,.list-view1.grid .img-precontainer-mini .filetype.xlsx,.list-view2.grid .img-precontainer-mini .filetype.css,.list-view2.grid .img-precontainer-mini .filetype.xls,.list-view2.grid .img-precontainer-mini .filetype.xlsx{background:#1a712c}.list-view1.grid .img-precontainer-mini .filetype.doc,.list-view1.grid .img-precontainer-mini .filetype.docx,.list-view1.grid .img-precontainer-mini .filetype.rts,.list-view2.grid .img-precontainer-mini .filetype.doc,.list-view2.grid .img-precontainer-mini .filetype.docx,.list-view2.grid .img-precontainer-mini .filetype.rts{background:#002093}.list-view1.grid .img-precontainer-mini .filetype.gzip,.list-view1.grid .img-precontainer-mini .filetype.rar,.list-view1.grid .img-precontainer-mini .filetype.zip,.list-view2.grid .img-precontainer-mini .filetype.gzip,.list-view2.grid .img-precontainer-mini .filetype.rar,.list-view2.grid .img-precontainer-mini .filetype.zip{background:#fe9221}.list-view1.grid .img-precontainer-mini .filetype.avi,.list-view1.grid .img-precontainer-mini .filetype.mov,.list-view1.grid .img-precontainer-mini .filetype.mp4,.list-view1.grid .img-precontainer-mini .filetype.mpeg,.list-view1.grid .img-precontainer-mini .filetype.mpg,.list-view1.grid .img-precontainer-mini .filetype.webm,.list-view1.grid .img-precontainer-mini .filetype.wma,.list-view2.grid .img-precontainer-mini .filetype.avi,.list-view2.grid .img-precontainer-mini .filetype.mov,.list-view2.grid .img-precontainer-mini .filetype.mp4,.list-view2.grid .img-precontainer-mini .filetype.mpeg,.list-view2.grid .img-precontainer-mini .filetype.mpg,.list-view2.grid .img-precontainer-mini .filetype.webm,.list-view2.grid .img-precontainer-mini .filetype.wma{background:#31231e}.list-view1.grid .img-precontainer-mini .filetype.ac3,.list-view1.grid .img-precontainer-mini .filetype.aiff,.list-view1.grid .img-precontainer-mini .filetype.m4a,.list-view1.grid .img-precontainer-mini .filetype.mid,.list-view1.grid .img-precontainer-mini .filetype.mp3,.list-view1.grid .img-precontainer-mini .filetype.ogg,.list-view1.grid .img-precontainer-mini .filetype.wav,.list-view2.grid .img-precontainer-mini .filetype.ac3,.list-view2.grid .img-precontainer-mini .filetype.aiff,.list-view2.grid .img-precontainer-mini .filetype.m4a,.list-view2.grid .img-precontainer-mini .filetype.mid,.list-view2.grid .img-precontainer-mini .filetype.mp3,.list-view2.grid .img-precontainer-mini .filetype.ogg,.list-view2.grid .img-precontainer-mini .filetype.wav{background:#9f008b}.list-view1.grid .img-precontainer-mini .filetype.odb,.list-view1.grid .img-precontainer-mini .filetype.odf,.list-view1.grid .img-precontainer-mini .filetype.odg,.list-view1.grid .img-precontainer-mini .filetype.odp,.list-view1.grid .img-precontainer-mini .filetype.ods,.list-view1.grid .img-precontainer-mini .filetype.odt,.list-view1.grid .img-precontainer-mini .filetype.otg,.list-view1.grid .img-precontainer-mini .filetype.otp,.list-view1.grid .img-precontainer-mini .filetype.ots,.list-view1.grid .img-precontainer-mini .filetype.ott,.list-view2.grid .img-precontainer-mini .filetype.odb,.list-view2.grid .img-precontainer-mini .filetype.odf,.list-view2.grid .img-precontainer-mini .filetype.odg,.list-view2.grid .img-precontainer-mini .filetype.odp,.list-view2.grid .img-precontainer-mini .filetype.ods,.list-view2.grid .img-precontainer-mini .filetype.odt,.list-view2.grid .img-precontainer-mini .filetype.otg,.list-view2.grid .img-precontainer-mini .filetype.otp,.list-view2.grid .img-precontainer-mini .filetype.ots,.list-view2.grid .img-precontainer-mini .filetype.ott{background:#367bbe}.list-view1.grid .img-precontainer-mini .filetype.bmp,.list-view1.grid .img-precontainer-mini .filetype.gif,.list-view1.grid .img-precontainer-mini .filetype.jpeg,.list-view1.grid .img-precontainer-mini .filetype.jpg,.list-view1.grid .img-precontainer-mini .filetype.png,.list-view1.grid .img-precontainer-mini .filetype.svg,.list-view1.grid .img-precontainer-mini .filetype.tiff,.list-view2.grid .img-precontainer-mini .filetype.bmp,.list-view2.grid .img-precontainer-mini .filetype.gif,.list-view2.grid .img-precontainer-mini .filetype.jpeg,.list-view2.grid .img-precontainer-mini .filetype.jpg,.list-view2.grid .img-precontainer-mini .filetype.png,.list-view2.grid .img-precontainer-mini .filetype.svg,.list-view2.grid .img-precontainer-mini .filetype.tiff{background:#cfa554}.list-view1.grid .img-precontainer-mini .filetype.dmg,.list-view1.grid .img-precontainer-mini .filetype.iso,.list-view1.grid .img-precontainer-mini .filetype.log,.list-view1.grid .img-precontainer-mini .filetype.sql,.list-view1.grid .img-precontainer-mini .filetype.txt,.list-view1.grid .img-precontainer-mini .filetype.xml,.list-view2.grid .img-precontainer-mini .filetype.dmg,.list-view2.grid .img-precontainer-mini .filetype.iso,.list-view2.grid .img-precontainer-mini .filetype.log,.list-view2.grid .img-precontainer-mini .filetype.sql,.list-view2.grid .img-precontainer-mini .filetype.txt,.list-view2.grid .img-precontainer-mini .filetype.xml{background:#cacaca}.list-view1.grid .img-precontainer-mini .filetype.accdb,.list-view1.grid .img-precontainer-mini .filetype.ade,.list-view1.grid .img-precontainer-mini .filetype.adp,.list-view1.grid .img-precontainer-mini .filetype.mdb,.list-view2.grid .img-precontainer-mini .filetype.accdb,.list-view2.grid .img-precontainer-mini .filetype.ade,.list-view2.grid .img-precontainer-mini .filetype.adp,.list-view2.grid .img-precontainer-mini .filetype.mdb{background:#b61c19}.lightbox-content{overflow:hidden;padding:0;background:none;box-shadow:none;border-radius:0;border:0}.context-menu-list{font-family:Open Sans,sans-serif;width:200px;background:#fff;font-size:12px;margin:0;padding:5px}.context-menu-item{background-color:#fff;position:relative;height:auto;word-wrap:break-word;-webkit-user-select:none;-moz-user-select:0;-ms-user-select:none;user-select:none;padding:5px 5px 5px 30px}.context-menu-item:last-child{border:none}.context-menu-separator{padding-bottom:0;border-bottom:1px solid #ddd}.context-menu-item.hover{background-color:#ddd}.context-menu-input.hover,.context-menu-item.disabled.hover{cursor:default;background-color:#eee}.context-menu-item.icon{vertical-align:middle;background-position:4px 5px;width:auto;display:list-item}.context-menu-item.icon-edit{background-image:url(../img/file_edit.png)}.context-menu-item.icon-cut{background-image:url(../img/cut.png)}.context-menu-item.icon-copy{background-image:url(../img/copy.png)}.context-menu-item.icon-rename{background-image:url(../img/rename.png)}.context-menu-item.icon-preview{background-image:url(../img/preview.png)}.context-menu-item.icon-dimension{background-image:url(../img/dimension.png)}.context-menu-item.icon-date{background-image:url(../img/date.png)}.context-menu-item.icon-label{background-image:url(../img/label.png)}.context-menu-item.icon-size{background-image:url(../img/size.png)}.context-menu-item.icon-download{background-image:url(../img/download.png)}.context-menu-item.icon-paste{background-image:url(../img/page_white_paste.png)}.context-menu-item.icon-clipboard-apply{background-image:url(../img/clipboard_apply.png)}.context-menu-item.icon-delete{background-image:url(../img/page_white_delete.png)}.context-menu-item.icon-add{background-image:url(../img/page_white_add.png)}.context-menu-item.icon-quit{background-image:url(../img/door.png)}.context-menu-item.icon-info{background-image:url(../img/info.png)}.context-menu-item.icon-extract{background-image:url(../img/zip.png)}.context-menu-item.icon-url{background-image:url(../img/url.png)}.context-menu-item.icon-edit_img{background-image:url(../img/edit_img.png)}.context-menu-item.icon-duplicate{background-image:url(../img/duplicate.png)}.context-menu-item.icon-key{background-image:url(../img/key.png)}.dropzone{border:1px solid rgba(0,0,0,.03);min-height:360px;border-radius:3px;background:rgba(0,0,0,.03);padding:23px}.dropzone .dz-success *{cursor:pointer!important}.dropzone .dz-default.dz-message{opacity:1;-ms-filter:none;filter:none;transition:opacity .3s ease-in-out;background-repeat:no-repeat;background-position:0 0;position:absolute;width:428px;height:123px;margin-left:-214px;margin-top:-61.5px;top:50%;left:50%}.btn-primary,.btn-primary.disabled,.btn-primary[disabled]{background-color:#333}.btn-primary.active,.btn-primary:active,.btn-primary:focus,.btn-primary:hover{background-color:#222}.tui-image-editor-container{position:fixed;top:0;left:0;z-index:99999} \ No newline at end of file diff --git a/libraries/filemanager-9.14.1/dialog.php b/libraries/filemanager-9.14.1/dialog.php new file mode 100644 index 0000000..3d525da --- /dev/null +++ b/libraries/filemanager-9.14.1/dialog.php @@ -0,0 +1,1373 @@ +isDir($config['ftp_base_folder'] . $config['upload_dir'] . $rfm_subfolder . $subdir)) || (!$ftp && !file_exists($config['current_path'] . $rfm_subfolder . $subdir))) { + $subdir = ''; + $rfm_subfolder = ""; +} + + +$cur_dir = $config['upload_dir'].$rfm_subfolder.$subdir; +$cur_dir_thumb = $config['thumbs_upload_dir'].$rfm_subfolder.$subdir; +$thumbs_path = $config['thumbs_base_path'].$rfm_subfolder.$subdir; +$parent = $rfm_subfolder.$subdir; + +if ($ftp) { + $cur_dir = $config['ftp_base_folder'] . $cur_dir; + $cur_dir_thumb = $config['ftp_base_folder'] . $cur_dir_thumb; + $thumbs_path = str_replace(array('/..', '..'), '', $cur_dir_thumb); + $parent = $config['ftp_base_folder'] . $parent; +} + +if (!$ftp) { + $cycle = TRUE; + $max_cycles = 50; + $i = 0; + while ($cycle && $i < $max_cycles) { + $i++; + + if ($parent == "./") { + $parent = ""; + } + + if (file_exists($config['current_path'] . $parent . "config.php")) { + $configTemp = include $config['current_path'] . $parent . 'config.php'; + $config = array_merge($config, $configTemp); + $cycle = FALSE; + } + + if ($parent == "") { + $cycle = FALSE; + } else { + $parent = fix_dirname($parent) . "/"; + } + } + + if (!is_dir($thumbs_path)) { + create_folder(FALSE, $thumbs_path, $ftp, $config); + } +} + +$multiple = null; + +if (isset($_GET['multiple'])) { + if ($_GET['multiple'] == 1) { + $multiple = 1; + $config['multiple_selection'] = true; + $config['multiple_selection_action_button'] = true; + } elseif ($_GET['multiple'] == 0) { + $multiple = 0; + $config['multiple_selection'] = false; + $config['multiple_selection_action_button'] = false; + } +} + +if (isset($_GET['callback'])) { + $callback = strip_tags($_GET['callback']); + $_SESSION['RF']["callback"] = $callback; +} else { + $callback = 0; + + if (isset($_SESSION['RF']["callback"])) { + $callback = $_SESSION['RF']["callback"]; + } +} + +$popup = isset($_GET['popup']) ? strip_tags($_GET['popup']) : 0; +//Sanitize popup +$popup = !!$popup; + +$crossdomain = isset($_GET['crossdomain']) ? strip_tags($_GET['crossdomain']) : 0; +//Sanitize crossdomain +$crossdomain=!!$crossdomain; + +//view type +if(!isset($_SESSION['RF']["view_type"])) +{ + $view = $config['default_view']; + $_SESSION['RF']["view_type"] = $view; +} + +if (isset($_GET['view'])) +{ + $view = fix_get_params($_GET['view']); + $_SESSION['RF']["view_type"] = $view; +} + +$view = $_SESSION['RF']["view_type"]; + +//filter +$filter = ""; +if(isset($_SESSION['RF']["filter"])) +{ + $filter = $_SESSION['RF']["filter"]; +} + +if(isset($_GET["filter"])) +{ + $filter = fix_get_params($_GET["filter"]); +} + +if (!isset($_SESSION['RF']['sort_by'])) +{ + $_SESSION['RF']['sort_by'] = 'name'; +} + +if (isset($_GET["sort_by"])) { + $sort_by = $_SESSION['RF']['sort_by'] = fix_get_params($_GET["sort_by"]); +} else { + $sort_by = $_SESSION['RF']['sort_by']; +} + + +if (!isset($_SESSION['RF']['descending'])) { + $_SESSION['RF']['descending'] = TRUE; +} + +if (isset($_GET["descending"])) { + $descending = $_SESSION['RF']['descending'] = fix_get_params($_GET["descending"]) == 1; +} else { + $descending = $_SESSION['RF']['descending']; +} + +$boolarray = array(false => 'false', true => 'true'); + +$return_relative_url = isset($_GET['relative_url']) && $_GET['relative_url'] == "1" ? true : false; + +if (!isset($_GET['type'])) { + $_GET['type'] = 0; +} + +$extensions = null; +if (isset($_GET['extensions'])) { + $extensions = json_decode(urldecode($_GET['extensions'])); + $ext_tmp = array(); + foreach ($extensions as $extension) { + $extension = fix_strtolower($extension); + if (check_file_extension($extension, $config)) { + $ext_tmp[] = $extension; + } + } + if ($extensions) { + $ext = $ext_tmp; + $config['ext'] = $ext_tmp; + $config['show_filter_buttons'] = false; + } +} + +if (isset($_GET['editor'])) { + $editor = strip_tags($_GET['editor']); +} else { + $editor = $_GET['type'] == 0 ? null : 'tinymce'; +} + +$field_id = isset($_GET['field_id']) ? fix_get_params($_GET['field_id']) : null; +$type_param = fix_get_params($_GET['type']); +$apply = null; + +if ($multiple) { + $apply = 'apply_multiple'; +} + +if ($type_param == 1) { + $apply_type = 'apply_img'; +} elseif ($type_param == 2) { + $apply_type = 'apply_link'; +} elseif ($type_param == 0 && !$field_id) { + $apply_type = 'apply_none'; +} elseif ($type_param == 3) { + $apply_type = 'apply_video'; +} else { + $apply_type = 'apply'; +} + +if(!$apply){ + $apply = $apply_type; +} + +$get_params = array( + 'editor' => $editor, + 'type' => $type_param, + 'lang' => $lang, + 'popup' => $popup, + 'crossdomain' => $crossdomain, + 'extensions' => ($extensions) ? urlencode(json_encode($extensions)) : null , + 'field_id' => $field_id, + 'multiple' => $multiple, + 'relative_url' => $return_relative_url, + 'akey' => (isset($_GET['akey']) && $_GET['akey'] != '' ? $_GET['akey'] : 'key') +); +if (isset($_GET['CKEditorFuncNum'])) { + $get_params['CKEditorFuncNum'] = $_GET['CKEditorFuncNum']; + $get_params['CKEditor'] = (isset($_GET['CKEditor']) ? $_GET['CKEditor'] : ''); +} +$get_params['fldr'] =''; + +$get_params = http_build_query($get_params); +?> + + + + + + + + Responsive FileManager + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + " /> + " /> + " /> + " /> + + + + +
    +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    +
    +
    + + + + + + + + + +
    +
    + +
    + +
    +
    +
    +
    + + + + +
    + +
    +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    +
    + + + +
    + +scanDir($config['ftp_base_folder'] . $config['upload_dir'] . $rfm_subfolder . $subdir); + if (!$ftp->isDir($config['ftp_base_folder'] . $config['ftp_thumbs_dir'] . $rfm_subfolder . $subdir)) { + create_folder(false, $config['ftp_base_folder'] . $config['ftp_thumbs_dir'] . $rfm_subfolder . $subdir, $ftp, $config); + } + } catch (FtpClient\FtpException $e) { + echo "Error: "; + echo $e->getMessage(); + echo "
    Please check configurations"; + die(); + } +} else { + $files = scandir($config['current_path'] . $rfm_subfolder . $subdir); +} + +$n_files = count($files); + +//php sorting +$sorted = array(); +//$current_folder=array(); +//$prev_folder=array(); +$current_files_number = 0; +$current_folders_number = 0; + +foreach ($files as $k => $file) { + if ($ftp) { + $date = strtotime($file['day'] . " " . $file['month'] . " " . date('Y') . " " . $file['time']); + $size = $file['size']; + if ($file['type'] == 'file') { + $current_files_number++; + $file_ext = substr(strrchr($file['name'], '.'), 1); + $is_dir = false; + } else { + $current_folders_number++; + $file_ext = trans('Type_dir'); + $is_dir = true; + } + $sorted[$k] = array( + 'is_dir' => $is_dir, + 'file' => $file['name'], + 'file_lcase' => strtolower($file['name']), + 'date' => $date, + 'size' => $size, + 'permissions' => $file['permissions'], + 'extension' => fix_strtolower($file_ext) + ); + } else { + + + if ($file != "." && $file != "..") { + if (is_dir($config['current_path'] . $rfm_subfolder . $subdir . $file)) { + $date = filemtime($config['current_path'] . $rfm_subfolder . $subdir . $file); + $current_folders_number++; + if ($config['show_folder_size']) { + list($size, $nfiles, $nfolders) = folder_info($config['current_path'] . $rfm_subfolder . $subdir . $file, false); + } else { + $size = 0; + } + $file_ext = trans('Type_dir'); + $sorted[$k] = array( + 'is_dir' => true, + 'file' => $file, + 'file_lcase' => strtolower($file), + 'date' => $date, + 'size' => $size, + 'permissions' => '', + 'extension' => fix_strtolower($file_ext) + ); + + if ($config['show_folder_size']) { + $sorted[$k]['nfiles'] = $nfiles; + $sorted[$k]['nfolders'] = $nfolders; + } + } else { + $current_files_number++; + $file_path = $config['current_path'] . $rfm_subfolder . $subdir . $file; + $date = filemtime($file_path); + $size = filesize($file_path); + $file_ext = substr(strrchr($file, '.'), 1); + $sorted[$k] = array( + 'is_dir' => false, + 'file' => $file, + 'file_lcase' => strtolower($file), + 'date' => $date, + 'size' => $size, + 'permissions' => '', + 'extension' => strtolower($file_ext) + ); + } + } + } +} + +function filenameSort($x, $y) +{ + global $descending; + + if ($x['is_dir'] !== $y['is_dir']) { + return $y['is_dir']; + } else { + return ($descending) + ? $x['file_lcase'] < $y['file_lcase'] + : $x['file_lcase'] >= $y['file_lcase']; + } +} + +function dateSort($x, $y) +{ + global $descending; + + if ($x['is_dir'] !== $y['is_dir']) { + return $y['is_dir']; + } else { + return ($descending) + ? $x['date'] < $y['date'] + : $x['date'] >= $y['date']; + } +} + +function sizeSort($x, $y) +{ + global $descending; + + if ($x['is_dir'] !== $y['is_dir']) { + return $y['is_dir']; + } else { + return ($descending) + ? $x['size'] < $y['size'] + : $x['size'] >= $y['size']; + } +} + +function extensionSort($x, $y) +{ + global $descending; + + if ($x['is_dir'] !== $y['is_dir']) { + return $y['is_dir']; + } else { + return ($descending) + ? $x['extension'] < $y['extension'] + : $x['extension'] >= $y['extension']; + } +} + +switch ($sort_by) { + case 'date': + usort($sorted, 'dateSort'); + break; + case 'size': + usort($sorted, 'sizeSort'); + break; + case 'extension': + usort($sorted, 'extensionSort'); + break; + default: + usort($sorted, 'filenameSort'); + break; +} + +if ($subdir != "") { + $sorted = array_merge(array(array('file' => '..')), $sorted); +} + +$files = $sorted; +?> + + + + + + + +
    + + +
    + +
    +
    + isDir($config['ftp_base_folder'].$config['upload_dir'].$rfm_subfolder.$subdir)) || (!$ftp && @opendir($config['current_path'].$rfm_subfolder.$subdir)===FALSE)){ ?> +
    +
    There is an error! The upload folder there isn't. Check your config.php file.
    + +

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

    responsive filemanager

    RESPONSIVE filemanager v.9.14.0
    responsivefilemanager.com


    Copyright © Tecrail - Alberto Peripolli. All rights reserved.


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

    ')}),jQuery("#change_lang_btn").on("click",function(){y.ajax({type:"POST",url:"ajax_calls.php?action=get_lang",data:{}}).done(function(e){bootbox.dialog(e,[{label:jQuery("#cancel").val(),class:"btn"},{label:jQuery("#ok").val(),class:"btn-inverse",callback:function(){var a=jQuery("#new_lang_select").val();y.ajax({type:"POST",url:"ajax_calls.php?action=change_lang",data:{choosen_lang:a}}).done(function(e){""!=e?bootbox.alert(e):setTimeout(function(){window.location.href=jQuery("#refresh").attr("href").replace(/lang=[\w]*&/i,"lang="+a+"&")+"&"+(new Date).getTime()},100)})}}],{header:jQuery("#lang_lang_change").val()})})}),s.makeUploader(),jQuery("body").on("keypress",function(e){var a=String.fromCharCode(e.which);if("'"==a||'"'==a||"\\"==a||"/"==a)return!1}),jQuery("ul.grid li figcaption").on("click",'a[data-toggle="lightbox"]',function(){!function(e){show_animation();var a=new Image;a.src=e,jQuery(a).on("load",function(){hide_animation()})}(decodeURIComponent(jQuery(this).attr("data-url")))}),jQuery(".create-file-btn").on("click",function(){jQuery("#textfile_create_area").parent().parent().remove(),y.ajax({type:"GET",url:"ajax_calls.php?action=new_file_form"}).done(function(e){bootbox.dialog(e,[{label:jQuery("#cancel").val(),class:"btn"},{label:jQuery("#ok").val(),class:"btn-inverse",callback:function(){var e=jQuery("#create_text_file_name").val()+jQuery("#create_text_file_extension").val(),a=jQuery("#textfile_create_area").val();if(null!==e){e=Q(e);var t=jQuery("#sub_folder").val()+jQuery("#fldr_value").val();y.ajax({type:"POST",url:"execute.php?action=create_file",data:{path:t,name:e,new_content:a}}).done(function(e){""!=e&&bootbox.alert(e,function(){setTimeout(function(){window.location.href=jQuery("#refresh").attr("href")+"&"+(new Date).getTime()},500)})})}}}],{header:jQuery("#lang_new_file").val()})})}),jQuery(".new-folder").on("click",function(){bootbox.prompt(jQuery("#insert_folder_name").val(),jQuery("#cancel").val(),jQuery("#ok").val(),function(e){if(null!==e){e=Q(e).replace(".","");var a=jQuery("#sub_folder").val()+jQuery("#fldr_value").val();y.ajax({type:"POST",url:"execute.php?action=create_folder",data:{path:a,name:e}}).done(function(e){e?bootbox.alert(jQuery("#rename_existing_folder").val()):setTimeout(function(){window.location.href=jQuery("#refresh").attr("href")+"&"+(new Date).getTime()},300)})}})}),jQuery(".view-controller button").on("click",function(){var e=jQuery(this);jQuery(".view-controller button").removeClass("btn-inverse"),jQuery(".view-controller i").removeClass("icon-white"),e.addClass("btn-inverse"),e.find("i").addClass("icon-white"),y.ajax({url:"ajax_calls.php?action=view&type="+e.attr("data-value")}).done(function(e){""!=e&&bootbox.alert(e)}),void 0!==jQuery("ul.grid")[0]&&jQuery("ul.grid")[0]&&(jQuery("ul.grid")[0].className=jQuery("ul.grid")[0].className.replace(/\blist-view.*?\b/g,"")),void 0!==jQuery(".sorter-container")[0]&&jQuery(".sorter-container")[0]&&(jQuery(".sorter-container")[0].className=jQuery(".sorter-container")[0].className.replace(/\blist-view.*?\b/g,""));var a=e.attr("data-value");jQuery("#view").val(a),jQuery("ul.grid").addClass("list-view"+a),jQuery(".sorter-container").addClass("list-view"+a),1<=e.attr("data-value")?p(14):(jQuery("ul.grid li").css("width",126),jQuery("ul.grid figure").css("width",122)),b()}),n.touch?(jQuery("#help").show(),jQuery(".box:not(.no-effect)").swipe({swipeLeft:v,swipeRight:v,threshold:30})):(jQuery(".tip").tooltip({placement:"bottom"}),jQuery(".tip-top").tooltip({placement:"top"}),jQuery(".tip-left").tooltip({placement:"left"}),jQuery(".tip-right").tooltip({placement:"right"}),jQuery("body").addClass("no-touch")),jQuery(".paste-here-btn").on("click",function(){0==jQuery(this).hasClass("disabled")&&d()}),jQuery(".clear-clipboard-btn").on("click",function(){0==jQuery(this).hasClass("disabled")&&bootbox.confirm(jQuery("#lang_clear_clipboard_confirm").val(),jQuery("#cancel").val(),jQuery("#ok").val(),function(e){1==e&&y.ajax({type:"POST",url:"ajax_calls.php?action=clear_clipboard",data:{}}).done(function(e){""!=e?bootbox.alert(e):jQuery("#clipboard").val("0"),f(!1)})})});var u=function(a){var t=[];return jQuery(".selection:checkbox:checked:visible").each(function(){var e=jQuery(this).val();a&&(e=jQuery(this).closest("figure").attr("data-path")),t.push(e)}),t};if(jQuery(".multiple-action-btn").on("click",function(){var e=u();window[jQuery(this).attr("data-function")](e,jQuery("#field_id").val())}),jQuery(".multiple-deselect-btn").on("click",function(){y(".selection:checkbox").removeAttr("checked"),jQuery("#multiple-selection").hide(300)}),jQuery(".multiple-select-btn").on("click",function(){y(".selection:checkbox:visible").prop("checked",!0)}),jQuery(".multiple-delete-btn").on("click",function(){if(0!=jQuery(".selection:checkbox:checked:visible").length){var e=jQuery(this);bootbox.confirm(e.attr("data-confirm"),jQuery("#cancel").val(),jQuery("#ok").val(),function(e){if(1==e){var a=u(!0);r="delete_files",i=a,o=l=n="",null!==name&&(name=Q(name),y.ajax({type:"POST",url:"execute.php?action="+r,data:{path:i[0],paths:i,names:n}}).done(function(e){return""!=e?(bootbox.alert(e),!1):(""!=o&&window[o](l,name),!0)}));var t=jQuery("#files_number");t.text(parseInt(t.text())-a.length),jQuery(".selection:checkbox:checked:visible").each(function(){jQuery(this).closest("li").remove()}),jQuery("#multiple-selection").hide(300)}var r,i,n,l,o})}}),!n.csstransforms){var r=jQuery("figure");r.on("mouseover",function(){0==jQuery("#view").val()&&!1===jQuery("#main-item-container").hasClass("no-effect-slide")&&jQuery(this).find(".box:not(.no-effect)").animate({top:"-26px"},{queue:!1,duration:300})}),r.on("mouseout",function(){0==jQuery("#view").val()&&jQuery(this).find(".box:not(.no-effect)").animate({top:"0px"},{queue:!1,duration:300})})}jQuery(window).resize(function(){p(28)}),p(14),1==jQuery("#clipboard").val()?f(!0):f(!1),jQuery("li.dir, li.file").draggable({distance:20,cursor:"move",helper:function(){jQuery(this).find("figure").find(".box").css("top","0px");var e=jQuery(this).clone().css("z-index",1e3).find(".box").css("box-shadow","none").css("-webkit-box-shadow","none").parent().parent();return jQuery(this).addClass("selected"),e},start:function(e,a){jQuery(a.helper).addClass("ui-draggable-helper"),0==jQuery("#view").val()&&jQuery("#main-item-container").addClass("no-effect-slide")},stop:function(){jQuery(this).removeClass("selected"),0==jQuery("#view").val()&&jQuery("#main-item-container").removeClass("no-effect-slide")}}),jQuery("li.dir,li.back").droppable({accept:"ul.grid li",activeClass:"ui-state-highlight",hoverClass:"ui-state-hover",drop:function(e,a){!function(t,r){t.hasClass("directory")?t.find(".rename-folder"):t.find(".rename-file");var e=t.closest("figure").attr("data-path");t.parent().hide(100),y.ajax({type:"POST",url:"ajax_calls.php?action=copy_cut",data:{path:e,sub_action:"cut"}}).done(function(e){var a;""!=e?bootbox.alert(e):(a=void 0!==r?r.hasClass("back-directory")?r.find(".path").val():r.closest("figure").attr("data-path"):jQuery("#sub_folder").val()+jQuery("#fldr_value").val(),y.ajax({type:"POST",url:"execute.php?action=paste_clipboard",data:{path:a}}).done(function(e){""!=e?(bootbox.alert(e),t.parent().show(100)):(jQuery("#clipboard").val("0"),f(!1),t.parent().remove())}))}).error(function(){t.parent().show(100)})}(a.draggable.find("figure"),jQuery(this).find("figure"))}}),jQuery(document).on("keyup","#chmod_form #chmod_value",function(){o(!0)}),jQuery(document).on("change","#chmod_form input",function(){o(!1)}),jQuery(document).on("focusout","#chmod_form #chmod_value",function(){var e=jQuery("#chmod_form #chmod_value");null==e.val().match(/^[0-7]{3}$/)&&(e.val(e.attr("data-def-value")),o(!0))}),i=new LazyLoad,new Clipboard(".btn")}),encodeURL=function(e){for(var a=e.split("/"),t=3;t '):-1'+d+" ":-1'+d+" "):i+=''+d+" "}1==jQuery("#crossdomain").val()?t.postMessage({sender:"responsivefilemanager",url:u,field_id:null,html:i},"*"):parent.tinymce.majorVersion<4?(parent.tinymce.activeEditor.execCommand("mceInsertContent",!1,i),parent.tinymce.activeEditor.windowManager.close(parent.tinymce.activeEditor.windowManager.params.mce_window_id)):(parent.tinymce.activeEditor.insertContent(i),parent.tinymce.activeEditor.windowManager.close())}},apply_link=function(e,a){var t=h(),r=jQuery("#callback").val();Array.isArray(e)||(e=new Array(e));var i=m(e),n=JSON.stringify(i);(1==i.length&&(n=i[0]),""!=a)?1==jQuery("#crossdomain").val()?t.postMessage({sender:"responsivefilemanager",url:i[0],field_id:a},"*"):(jQuery("#"+a,t.document).val(n).trigger("change"),0==r?"function"==typeof t.responsive_filemanager_callback&&t.responsive_filemanager_callback(a):"function"==typeof t[r]&&t[r](a),j()):apply_any(i[0])},apply_img=function(e,a){var t=h(),r=jQuery("#callback").val();Array.isArray(e)||(e=new Array(e));var i=m(e),n=JSON.stringify(i);if(1==i.length&&(n=i[0]),""!=a){if(1==jQuery("#crossdomain").val())t.postMessage({sender:"responsivefilemanager",url:i[0],field_id:a},"*");else jQuery("#"+a,t.document).val(n).trigger("change"),0==r?"function"==typeof t.responsive_filemanager_callback&&t.responsive_filemanager_callback(a):"function"==typeof t[r]&&t[r](a),j()}else{if(jQuery("#add_time_to_img").val())var l=i[0]+"?"+(new Date).getTime();else l=i[0];apply_any(l)}},apply_video=function(e,a){var t=h(),r=jQuery("#callback").val();Array.isArray(e)||(e=new Array(e));var i=m(e),n=JSON.stringify(i);(1==i.length&&(n=i[0]),""!=a)?1==jQuery("#crossdomain").val()?t.postMessage({sender:"responsivefilemanager",url:i[0],field_id:a},"*"):(jQuery("#"+a,t.document).val(n).trigger("change"),0==r?"function"==typeof t.responsive_filemanager_callback&&t.responsive_filemanager_callback(a):"function"==typeof t[r]&&t[r](a),j()):apply_any(i[0])},apply_none=function(e,a,t){t.parent().find("form a")[1].click(),jQuery(".tip-right").tooltip("hide")},apply_any=function(e){if(1==jQuery("#crossdomain").val())window.parent.postMessage({sender:"responsivefilemanager",url:e,field_id:null},"*");else if("ckeditor"===jQuery("#editor").val()){var a=(t=new RegExp("(?:[?&]|&)"+"CKEditorFuncNum"+"=([^&]+)","i"),(r=window.location.search.match(t))&&1"+t.html()+"");var r=t.next();apply_file_rename(r.find("figure"),a);var i=r.find(".download-form"),n="form"+(new Date).getTime();i.attr("id",n),i.find(".tip-right").first().attr("onclick","jQuery('#"+n+"').submit();")},apply_file_rename=function(e,a){var t;e.attr("data-name",a),e.parent().attr("data-name",a),e.find("h4").text(a);var r=e.find("a.link"),i=(t=r.attr("data-file")).substring(t.lastIndexOf("/")+1),n=t.substring(t.lastIndexOf(".")+1);n=n?"."+n:"",r.each(function(){jQuery(this).attr("data-file",encodeURIComponent(a+n))}),e.find("img").each(function(){if(e=jQuery(this).attr("src"))jQuery(this).attr("src",e.replace(i,a+n)+"?time="+(new Date).getTime());else{var e=jQuery(this).attr("data-src");jQuery(this).attr("data-src",e.replace(i,a+n)+"?time="+(new Date).getTime())}jQuery(this).attr("alt",a+" thumbnails")});var l=e.find("a.preview");void 0!==(t=l.attr("data-url"))&&t&&l.attr("data-url",t.replace(encodeURIComponent(i),encodeURIComponent(a+n))),e.parent().attr("data-name",a+n),e.attr("data-name",a+n),e.find(".name_download").val(a+n);var o=e.attr("data-path").replace(i,a+n);e.attr("data-path",o)},apply_folder_rename=function(e,a){e.attr("data-name",a),e.find("figure").attr("data-name",a);var t=e.find("h4").find("a").text();e.find("h4 > a").text(a);var r=e.find(".folder-link"),i=r.attr("href"),n=jQuery("#fldr_value").val(),l=i.replace("fldr="+n+encodeURIComponent(t),"fldr="+n+encodeURIComponent(a));r.each(function(){jQuery(this).attr("href",l)});var o=e.attr("data-path"),u=o.lastIndexOf("/"),c=o.substr(0,u+1)+a;e.attr("data-path",c)},show_animation=function(){jQuery("#loading_container").css("display","block"),jQuery("#loading").css("opacity",".7")},hide_animation=function(){jQuery("#loading_container").fadeOut()}}(jQuery,Modernizr,image_editor),function(){if("function"==typeof window.CustomEvent)return;function e(e,a){a=a||{bubbles:!1,cancelable:!1,detail:void 0};var t=document.createEvent("CustomEvent");return t.initCustomEvent(e,a.bubbles,a.cancelable,a.detail),t}e.prototype=window.Event.prototype,window.CustomEvent=e}(); \ No newline at end of file diff --git a/libraries/filemanager-9.14.1/js/jquery.fileupload-angular.js b/libraries/filemanager-9.14.1/js/jquery.fileupload-angular.js new file mode 100644 index 0000000..185907d --- /dev/null +++ b/libraries/filemanager-9.14.1/js/jquery.fileupload-angular.js @@ -0,0 +1,438 @@ +/* + * jQuery File Upload AngularJS Plugin + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2013, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * https://opensource.org/licenses/MIT + */ + +/* jshint nomen:false */ +/* global define, angular, require */ + +;(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define([ + 'jquery', + 'angular', + './jquery.fileupload-image', + './jquery.fileupload-audio', + './jquery.fileupload-video', + './jquery.fileupload-validate' + ], factory); + } else if (typeof exports === 'object') { + // Node/CommonJS: + factory( + require('jquery'), + require('angular'), + require('./jquery.fileupload-image'), + require('./jquery.fileupload-audio'), + require('./jquery.fileupload-video'), + require('./jquery.fileupload-validate') + ); + } else { + factory(); + } +}(function () { + 'use strict'; + + angular.module('blueimp.fileupload', []) + + // The fileUpload service provides configuration options + // for the fileUpload directive and default handlers for + // File Upload events: + .provider('fileUpload', function () { + var scopeEvalAsync = function (expression) { + var scope = angular.element(this) + .fileupload('option', 'scope'); + // Schedule a new $digest cycle if not already inside of one + // and evaluate the given expression: + scope.$evalAsync(expression); + }, + addFileMethods = function (scope, data) { + var files = data.files, + file = files[0]; + angular.forEach(files, function (file, index) { + file._index = index; + file.$state = function () { + return data.state(); + }; + file.$processing = function () { + return data.processing(); + }; + file.$progress = function () { + return data.progress(); + }; + file.$response = function () { + return data.response(); + }; + }); + file.$submit = function () { + if (!file.error) { + return data.submit(); + } + }; + file.$cancel = function () { + return data.abort(); + }; + }, + $config; + $config = this.defaults = { + handleResponse: function (e, data) { + var files = data.result && data.result.files; + if (files) { + data.scope.replace(data.files, files); + } else if (data.errorThrown || + data.textStatus === 'error') { + data.files[0].error = data.errorThrown || + data.textStatus; + } + }, + add: function (e, data) { + if (e.isDefaultPrevented()) { + return false; + } + var scope = data.scope, + filesCopy = []; + angular.forEach(data.files, function (file) { + filesCopy.push(file); + }); + scope.$parent.$applyAsync(function () { + addFileMethods(scope, data); + var method = scope.option('prependFiles') ? + 'unshift' : 'push'; + Array.prototype[method].apply(scope.queue, data.files); + }); + data.process(function () { + return scope.process(data); + }).always(function () { + scope.$parent.$applyAsync(function () { + addFileMethods(scope, data); + scope.replace(filesCopy, data.files); + }); + }).then(function () { + if ((scope.option('autoUpload') || + data.autoUpload) && + data.autoUpload !== false) { + data.submit(); + } + }); + }, + done: function (e, data) { + if (e.isDefaultPrevented()) { + return false; + } + var that = this; + data.scope.$apply(function () { + data.handleResponse.call(that, e, data); + }); + }, + fail: function (e, data) { + if (e.isDefaultPrevented()) { + return false; + } + var that = this, + scope = data.scope; + if (data.errorThrown === 'abort') { + scope.clear(data.files); + return; + } + scope.$apply(function () { + data.handleResponse.call(that, e, data); + }); + }, + stop: scopeEvalAsync, + processstart: scopeEvalAsync, + processstop: scopeEvalAsync, + getNumberOfFiles: function () { + var scope = this.scope; + return scope.queue.length - scope.processing(); + }, + dataType: 'json', + autoUpload: false + }; + this.$get = [ + function () { + return { + defaults: $config + }; + } + ]; + }) + + // Format byte numbers to readable presentations: + .provider('formatFileSizeFilter', function () { + var $config = { + // Byte units following the IEC format + // http://en.wikipedia.org/wiki/Kilobyte + units: [ + {size: 1000000000, suffix: ' GB'}, + {size: 1000000, suffix: ' MB'}, + {size: 1000, suffix: ' KB'} + ] + }; + this.defaults = $config; + this.$get = function () { + return function (bytes) { + if (!angular.isNumber(bytes)) { + return ''; + } + var unit = true, + i = 0, + prefix, + suffix; + while (unit) { + unit = $config.units[i]; + prefix = unit.prefix || ''; + suffix = unit.suffix || ''; + if (i === $config.units.length - 1 || bytes >= unit.size) { + return prefix + (bytes / unit.size).toFixed(2) + suffix; + } + i += 1; + } + }; + }; + }) + + // The FileUploadController initializes the fileupload widget and + // provides scope methods to control the File Upload functionality: + .controller('FileUploadController', [ + '$scope', '$element', '$attrs', '$window', 'fileUpload','$q', + function ($scope, $element, $attrs, $window, fileUpload, $q) { + var uploadMethods = { + progress: function () { + return $element.fileupload('progress'); + }, + active: function () { + return $element.fileupload('active'); + }, + option: function (option, data) { + if (arguments.length === 1) { + return $element.fileupload('option', option); + } + $element.fileupload('option', option, data); + }, + add: function (data) { + return $element.fileupload('add', data); + }, + send: function (data) { + return $element.fileupload('send', data); + }, + process: function (data) { + return $element.fileupload('process', data); + }, + processing: function (data) { + return $element.fileupload('processing', data); + } + }; + $scope.disabled = !$window.jQuery.support.fileInput; + $scope.queue = $scope.queue || []; + $scope.clear = function (files) { + var queue = this.queue, + i = queue.length, + file = files, + length = 1; + if (angular.isArray(files)) { + file = files[0]; + length = files.length; + } + while (i) { + i -= 1; + if (queue[i] === file) { + return queue.splice(i, length); + } + } + }; + $scope.replace = function (oldFiles, newFiles) { + var queue = this.queue, + file = oldFiles[0], + i, + j; + for (i = 0; i < queue.length; i += 1) { + if (queue[i] === file) { + for (j = 0; j < newFiles.length; j += 1) { + queue[i + j] = newFiles[j]; + } + return; + } + } + }; + $scope.applyOnQueue = function (method) { + var list = this.queue.slice(0), + i, + file, + promises = []; + for (i = 0; i < list.length; i += 1) { + file = list[i]; + if (file[method]) { + promises.push(file[method]()); + } + } + return $q.all(promises); + }; + $scope.submit = function () { + return this.applyOnQueue('$submit'); + }; + $scope.cancel = function () { + return this.applyOnQueue('$cancel'); + }; + // Add upload methods to the scope: + angular.extend($scope, uploadMethods); + // The fileupload widget will initialize with + // the options provided via "data-"-parameters, + // as well as those given via options object: + $element.fileupload(angular.extend( + {scope: $scope}, + fileUpload.defaults + )).on('fileuploadadd', function (e, data) { + data.scope = $scope; + }).on('fileuploadfail', function (e, data) { + if (data.errorThrown === 'abort') { + return; + } + if (data.dataType && + data.dataType.indexOf('json') === data.dataType.length - 4) { + try { + data.result = angular.fromJson(data.jqXHR.responseText); + } catch (ignore) {} + } + }).on([ + 'fileuploadadd', + 'fileuploadsubmit', + 'fileuploadsend', + 'fileuploaddone', + 'fileuploadfail', + 'fileuploadalways', + 'fileuploadprogress', + 'fileuploadprogressall', + 'fileuploadstart', + 'fileuploadstop', + 'fileuploadchange', + 'fileuploadpaste', + 'fileuploaddrop', + 'fileuploaddragover', + 'fileuploadchunkbeforesend', + 'fileuploadchunksend', + 'fileuploadchunkdone', + 'fileuploadchunkfail', + 'fileuploadchunkalways', + 'fileuploadprocessstart', + 'fileuploadprocess', + 'fileuploadprocessdone', + 'fileuploadprocessfail', + 'fileuploadprocessalways', + 'fileuploadprocessstop' + ].join(' '), function (e, data) { + $scope.$parent.$applyAsync(function () { + if ($scope.$emit(e.type, data).defaultPrevented) { + e.preventDefault(); + } + }); + }).on('remove', function () { + // Remove upload methods from the scope, + // when the widget is removed: + var method; + for (method in uploadMethods) { + if (uploadMethods.hasOwnProperty(method)) { + delete $scope[method]; + } + } + }); + // Observe option changes: + $scope.$watch( + $attrs.fileUpload, + function (newOptions) { + if (newOptions) { + $element.fileupload('option', newOptions); + } + } + ); + } + ]) + + // Provide File Upload progress feedback: + .controller('FileUploadProgressController', [ + '$scope', '$attrs', '$parse', + function ($scope, $attrs, $parse) { + var fn = $parse($attrs.fileUploadProgress), + update = function () { + var progress = fn($scope); + if (!progress || !progress.total) { + return; + } + $scope.num = Math.floor( + progress.loaded / progress.total * 100 + ); + }; + update(); + $scope.$watch( + $attrs.fileUploadProgress + '.loaded', + function (newValue, oldValue) { + if (newValue !== oldValue) { + update(); + } + } + ); + } + ]) + + // Display File Upload previews: + .controller('FileUploadPreviewController', [ + '$scope', '$element', '$attrs', + function ($scope, $element, $attrs) { + $scope.$watch( + $attrs.fileUploadPreview + '.preview', + function (preview) { + $element.empty(); + if (preview) { + $element.append(preview); + } + } + ); + } + ]) + + .directive('fileUpload', function () { + return { + controller: 'FileUploadController', + scope: true + }; + }) + + .directive('fileUploadProgress', function () { + return { + controller: 'FileUploadProgressController', + scope: true + }; + }) + + .directive('fileUploadPreview', function () { + return { + controller: 'FileUploadPreviewController' + }; + }) + + // Enhance the HTML5 download attribute to + // allow drag&drop of files to the desktop: + .directive('download', function () { + return function (scope, elm) { + elm.on('dragstart', function (e) { + try { + e.originalEvent.dataTransfer.setData( + 'DownloadURL', + [ + 'application/octet-stream', + elm.prop('download'), + elm.prop('href') + ].join(':') + ); + } catch (ignore) {} + }); + }; + }); + +})); diff --git a/libraries/filemanager-9.14.1/js/jquery.fileupload-audio.js b/libraries/filemanager-9.14.1/js/jquery.fileupload-audio.js new file mode 100644 index 0000000..a253776 --- /dev/null +++ b/libraries/filemanager-9.14.1/js/jquery.fileupload-audio.js @@ -0,0 +1,113 @@ +/* + * jQuery File Upload Audio Preview Plugin + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2013, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * https://opensource.org/licenses/MIT + */ + +/* jshint nomen:false */ +/* global define, require, window, document */ + +;(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define([ + 'jquery', + 'load-image', + './jquery.fileupload-process' + ], factory); + } else if (typeof exports === 'object') { + // Node/CommonJS: + factory( + require('jquery'), + require('blueimp-load-image/js/load-image'), + require('./jquery.fileupload-process') + ); + } else { + // Browser globals: + factory( + window.jQuery, + window.loadImage + ); + } +}(function ($, loadImage) { + 'use strict'; + + // Prepend to the default processQueue: + $.blueimp.fileupload.prototype.options.processQueue.unshift( + { + action: 'loadAudio', + // Use the action as prefix for the "@" options: + prefix: true, + fileTypes: '@', + maxFileSize: '@', + disabled: '@disableAudioPreview' + }, + { + action: 'setAudio', + name: '@audioPreviewName', + disabled: '@disableAudioPreview' + } + ); + + // The File Upload Audio Preview plugin extends the fileupload widget + // with audio preview functionality: + $.widget('blueimp.fileupload', $.blueimp.fileupload, { + + options: { + // The regular expression for the types of audio files to load, + // matched against the file type: + loadAudioFileTypes: /^audio\/.*$/ + }, + + _audioElement: document.createElement('audio'), + + processActions: { + + // Loads the audio file given via data.files and data.index + // as audio element if the browser supports playing it. + // Accepts the options fileTypes (regular expression) + // and maxFileSize (integer) to limit the files to load: + loadAudio: function (data, options) { + if (options.disabled) { + return data; + } + var file = data.files[data.index], + url, + audio; + if (this._audioElement.canPlayType && + this._audioElement.canPlayType(file.type) && + ($.type(options.maxFileSize) !== 'number' || + file.size <= options.maxFileSize) && + (!options.fileTypes || + options.fileTypes.test(file.type))) { + url = loadImage.createObjectURL(file); + if (url) { + audio = this._audioElement.cloneNode(false); + audio.src = url; + audio.controls = true; + data.audio = audio; + return data; + } + } + return data; + }, + + // Sets the audio element as a property of the file object: + setAudio: function (data, options) { + if (data.audio && !options.disabled) { + data.files[data.index][options.name || 'preview'] = data.audio; + } + return data; + } + + } + + }); + +})); diff --git a/libraries/filemanager-9.14.1/js/jquery.fileupload-image.js b/libraries/filemanager-9.14.1/js/jquery.fileupload-image.js new file mode 100644 index 0000000..65fc6d7 --- /dev/null +++ b/libraries/filemanager-9.14.1/js/jquery.fileupload-image.js @@ -0,0 +1,326 @@ +/* + * jQuery File Upload Image Preview & Resize Plugin + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2013, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * https://opensource.org/licenses/MIT + */ + +/* jshint nomen:false */ +/* global define, require, window, Blob */ + +;(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define([ + 'jquery', + 'load-image', + 'load-image-meta', + 'load-image-scale', + 'load-image-exif', + 'canvas-to-blob', + './jquery.fileupload-process' + ], factory); + } else if (typeof exports === 'object') { + // Node/CommonJS: + factory( + require('jquery'), + require('blueimp-load-image/js/load-image'), + require('blueimp-load-image/js/load-image-meta'), + require('blueimp-load-image/js/load-image-scale'), + require('blueimp-load-image/js/load-image-exif'), + require('blueimp-canvas-to-blob'), + require('./jquery.fileupload-process') + ); + } else { + // Browser globals: + factory( + window.jQuery, + window.loadImage + ); + } +}(function ($, loadImage) { + 'use strict'; + + // Prepend to the default processQueue: + $.blueimp.fileupload.prototype.options.processQueue.unshift( + { + action: 'loadImageMetaData', + disableImageHead: '@', + disableExif: '@', + disableExifThumbnail: '@', + disableExifSub: '@', + disableExifGps: '@', + disabled: '@disableImageMetaDataLoad' + }, + { + action: 'loadImage', + // Use the action as prefix for the "@" options: + prefix: true, + fileTypes: '@', + maxFileSize: '@', + noRevoke: '@', + disabled: '@disableImageLoad' + }, + { + action: 'resizeImage', + // Use "image" as prefix for the "@" options: + prefix: 'image', + maxWidth: '@', + maxHeight: '@', + minWidth: '@', + minHeight: '@', + crop: '@', + orientation: '@', + forceResize: '@', + disabled: '@disableImageResize' + }, + { + action: 'saveImage', + quality: '@imageQuality', + type: '@imageType', + disabled: '@disableImageResize' + }, + { + action: 'saveImageMetaData', + disabled: '@disableImageMetaDataSave' + }, + { + action: 'resizeImage', + // Use "preview" as prefix for the "@" options: + prefix: 'preview', + maxWidth: '@', + maxHeight: '@', + minWidth: '@', + minHeight: '@', + crop: '@', + orientation: '@', + thumbnail: '@', + canvas: '@', + disabled: '@disableImagePreview' + }, + { + action: 'setImage', + name: '@imagePreviewName', + disabled: '@disableImagePreview' + }, + { + action: 'deleteImageReferences', + disabled: '@disableImageReferencesDeletion' + } + ); + + // The File Upload Resize plugin extends the fileupload widget + // with image resize functionality: + $.widget('blueimp.fileupload', $.blueimp.fileupload, { + + options: { + // The regular expression for the types of images to load: + // matched against the file type: + loadImageFileTypes: /^image\/(gif|jpeg|png|svg\+xml)$/, + // The maximum file size of images to load: + loadImageMaxFileSize: 10000000, // 10MB + // The maximum width of resized images: + imageMaxWidth: 1920, + // The maximum height of resized images: + imageMaxHeight: 1080, + // Defines the image orientation (1-8) or takes the orientation + // value from Exif data if set to true: + imageOrientation: false, + // Define if resized images should be cropped or only scaled: + imageCrop: false, + // Disable the resize image functionality by default: + disableImageResize: true, + // The maximum width of the preview images: + previewMaxWidth: 80, + // The maximum height of the preview images: + previewMaxHeight: 80, + // Defines the preview orientation (1-8) or takes the orientation + // value from Exif data if set to true: + previewOrientation: true, + // Create the preview using the Exif data thumbnail: + previewThumbnail: true, + // Define if preview images should be cropped or only scaled: + previewCrop: false, + // Define if preview images should be resized as canvas elements: + previewCanvas: true + }, + + processActions: { + + // Loads the image given via data.files and data.index + // as img element, if the browser supports the File API. + // Accepts the options fileTypes (regular expression) + // and maxFileSize (integer) to limit the files to load: + loadImage: function (data, options) { + if (options.disabled) { + return data; + } + var that = this, + file = data.files[data.index], + dfd = $.Deferred(); + if (($.type(options.maxFileSize) === 'number' && + file.size > options.maxFileSize) || + (options.fileTypes && + !options.fileTypes.test(file.type)) || + !loadImage( + file, + function (img) { + if (img.src) { + data.img = img; + } + dfd.resolveWith(that, [data]); + }, + options + )) { + return data; + } + return dfd.promise(); + }, + + // Resizes the image given as data.canvas or data.img + // and updates data.canvas or data.img with the resized image. + // Also stores the resized image as preview property. + // Accepts the options maxWidth, maxHeight, minWidth, + // minHeight, canvas and crop: + resizeImage: function (data, options) { + if (options.disabled || !(data.canvas || data.img)) { + return data; + } + options = $.extend({canvas: true}, options); + var that = this, + dfd = $.Deferred(), + img = (options.canvas && data.canvas) || data.img, + resolve = function (newImg) { + if (newImg && (newImg.width !== img.width || + newImg.height !== img.height || + options.forceResize)) { + data[newImg.getContext ? 'canvas' : 'img'] = newImg; + } + data.preview = newImg; + dfd.resolveWith(that, [data]); + }, + thumbnail; + if (data.exif) { + if (options.orientation === true) { + options.orientation = data.exif.get('Orientation'); + } + if (options.thumbnail) { + thumbnail = data.exif.get('Thumbnail'); + if (thumbnail) { + loadImage(thumbnail, resolve, options); + return dfd.promise(); + } + } + // Prevent orienting the same image twice: + if (data.orientation) { + delete options.orientation; + } else { + data.orientation = options.orientation; + } + } + if (img) { + resolve(loadImage.scale(img, options)); + return dfd.promise(); + } + return data; + }, + + // Saves the processed image given as data.canvas + // inplace at data.index of data.files: + saveImage: function (data, options) { + if (!data.canvas || options.disabled) { + return data; + } + var that = this, + file = data.files[data.index], + dfd = $.Deferred(); + if (data.canvas.toBlob) { + data.canvas.toBlob( + function (blob) { + if (!blob.name) { + if (file.type === blob.type) { + blob.name = file.name; + } else if (file.name) { + blob.name = file.name.replace( + /\.\w+$/, + '.' + blob.type.substr(6) + ); + } + } + // Don't restore invalid meta data: + if (file.type !== blob.type) { + delete data.imageHead; + } + // Store the created blob at the position + // of the original file in the files list: + data.files[data.index] = blob; + dfd.resolveWith(that, [data]); + }, + options.type || file.type, + options.quality + ); + } else { + return data; + } + return dfd.promise(); + }, + + loadImageMetaData: function (data, options) { + if (options.disabled) { + return data; + } + var that = this, + dfd = $.Deferred(); + loadImage.parseMetaData(data.files[data.index], function (result) { + $.extend(data, result); + dfd.resolveWith(that, [data]); + }, options); + return dfd.promise(); + }, + + saveImageMetaData: function (data, options) { + if (!(data.imageHead && data.canvas && + data.canvas.toBlob && !options.disabled)) { + return data; + } + var file = data.files[data.index], + blob = new Blob([ + data.imageHead, + // Resized images always have a head size of 20 bytes, + // including the JPEG marker and a minimal JFIF header: + this._blobSlice.call(file, 20) + ], {type: file.type}); + blob.name = file.name; + data.files[data.index] = blob; + return data; + }, + + // Sets the resized version of the image as a property of the + // file object, must be called after "saveImage": + setImage: function (data, options) { + if (data.preview && !options.disabled) { + data.files[data.index][options.name || 'preview'] = data.preview; + } + return data; + }, + + deleteImageReferences: function (data, options) { + if (!options.disabled) { + delete data.img; + delete data.canvas; + delete data.preview; + delete data.imageHead; + } + return data; + } + + } + + }); + +})); diff --git a/libraries/filemanager-9.14.1/js/jquery.fileupload-jquery-ui.js b/libraries/filemanager-9.14.1/js/jquery.fileupload-jquery-ui.js new file mode 100644 index 0000000..7b136b3 --- /dev/null +++ b/libraries/filemanager-9.14.1/js/jquery.fileupload-jquery-ui.js @@ -0,0 +1,161 @@ +/* + * jQuery File Upload jQuery UI Plugin + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2013, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * https://opensource.org/licenses/MIT + */ + +/* jshint nomen:false */ +/* global define, require, window */ + +;(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define([ + 'jquery', + './jquery.fileupload-ui' + ], factory); + } else if (typeof exports === 'object') { + // Node/CommonJS: + factory( + require('jquery'), + require('./jquery.fileupload-ui') + ); + } else { + // Browser globals: + factory(window.jQuery); + } +}(function ($) { + 'use strict'; + + $.widget('blueimp.fileupload', $.blueimp.fileupload, { + + options: { + processdone: function (e, data) { + data.context.find('.start').button('enable'); + }, + progress: function (e, data) { + if (data.context) { + data.context.find('.progress').progressbar( + 'option', + 'value', + parseInt(data.loaded / data.total * 100, 10) + ); + } + }, + progressall: function (e, data) { + var $this = $(this); + $this.find('.fileupload-progress') + .find('.progress').progressbar( + 'option', + 'value', + parseInt(data.loaded / data.total * 100, 10) + ).end() + .find('.progress-extended').each(function () { + $(this).html( + ($this.data('blueimp-fileupload') || + $this.data('fileupload')) + ._renderExtendedProgress(data) + ); + }); + } + }, + + _renderUpload: function (func, files) { + var node = this._super(func, files), + showIconText = $(window).width() > 480; + node.find('.progress').empty().progressbar(); + node.find('.start').button({ + icons: {primary: 'ui-icon-circle-arrow-e'}, + text: showIconText + }); + node.find('.cancel').button({ + icons: {primary: 'ui-icon-cancel'}, + text: showIconText + }); + if (node.hasClass('fade')) { + node.hide(); + } + return node; + }, + + _renderDownload: function (func, files) { + var node = this._super(func, files), + showIconText = $(window).width() > 480; + node.find('.delete').button({ + icons: {primary: 'ui-icon-trash'}, + text: showIconText + }); + if (node.hasClass('fade')) { + node.hide(); + } + return node; + }, + + _startHandler: function (e) { + $(e.currentTarget).button('disable'); + this._super(e); + }, + + _transition: function (node) { + var deferred = $.Deferred(); + if (node.hasClass('fade')) { + node.fadeToggle( + this.options.transitionDuration, + this.options.transitionEasing, + function () { + deferred.resolveWith(node); + } + ); + } else { + deferred.resolveWith(node); + } + return deferred; + }, + + _create: function () { + this._super(); + this.element + .find('.fileupload-buttonbar') + .find('.fileinput-button').each(function () { + var input = $(this).find('input:file').detach(); + $(this) + .button({icons: {primary: 'ui-icon-plusthick'}}) + .append(input); + }) + .end().find('.start') + .button({icons: {primary: 'ui-icon-circle-arrow-e'}}) + .end().find('.cancel') + .button({icons: {primary: 'ui-icon-cancel'}}) + .end().find('.delete') + .button({icons: {primary: 'ui-icon-trash'}}) + .end().find('.progress').progressbar(); + }, + + _destroy: function () { + this.element + .find('.fileupload-buttonbar') + .find('.fileinput-button').each(function () { + var input = $(this).find('input:file').detach(); + $(this) + .button('destroy') + .append(input); + }) + .end().find('.start') + .button('destroy') + .end().find('.cancel') + .button('destroy') + .end().find('.delete') + .button('destroy') + .end().find('.progress').progressbar('destroy'); + this._super(); + } + + }); + +})); diff --git a/libraries/filemanager-9.14.1/js/jquery.fileupload-process.js b/libraries/filemanager-9.14.1/js/jquery.fileupload-process.js new file mode 100644 index 0000000..638f0d2 --- /dev/null +++ b/libraries/filemanager-9.14.1/js/jquery.fileupload-process.js @@ -0,0 +1,178 @@ +/* + * jQuery File Upload Processing Plugin + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2012, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * https://opensource.org/licenses/MIT + */ + +/* jshint nomen:false */ +/* global define, require, window */ + +;(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define([ + 'jquery', + './jquery.fileupload' + ], factory); + } else if (typeof exports === 'object') { + // Node/CommonJS: + factory( + require('jquery'), + require('./jquery.fileupload') + ); + } else { + // Browser globals: + factory( + window.jQuery + ); + } +}(function ($) { + 'use strict'; + + var originalAdd = $.blueimp.fileupload.prototype.options.add; + + // The File Upload Processing plugin extends the fileupload widget + // with file processing functionality: + $.widget('blueimp.fileupload', $.blueimp.fileupload, { + + options: { + // The list of processing actions: + processQueue: [ + /* + { + action: 'log', + type: 'debug' + } + */ + ], + add: function (e, data) { + var $this = $(this); + data.process(function () { + return $this.fileupload('process', data); + }); + originalAdd.call(this, e, data); + } + }, + + processActions: { + /* + log: function (data, options) { + console[options.type]( + 'Processing "' + data.files[data.index].name + '"' + ); + } + */ + }, + + _processFile: function (data, originalData) { + var that = this, + dfd = $.Deferred().resolveWith(that, [data]), + chain = dfd.promise(); + this._trigger('process', null, data); + $.each(data.processQueue, function (i, settings) { + var func = function (data) { + if (originalData.errorThrown) { + return $.Deferred() + .rejectWith(that, [originalData]).promise(); + } + return that.processActions[settings.action].call( + that, + data, + settings + ); + }; + chain = chain.then(func, settings.always && func); + }); + chain + .done(function () { + that._trigger('processdone', null, data); + that._trigger('processalways', null, data); + }) + .fail(function () { + that._trigger('processfail', null, data); + that._trigger('processalways', null, data); + }); + return chain; + }, + + // Replaces the settings of each processQueue item that + // are strings starting with an "@", using the remaining + // substring as key for the option map, + // e.g. "@autoUpload" is replaced with options.autoUpload: + _transformProcessQueue: function (options) { + var processQueue = []; + $.each(options.processQueue, function () { + var settings = {}, + action = this.action, + prefix = this.prefix === true ? action : this.prefix; + $.each(this, function (key, value) { + if ($.type(value) === 'string' && + value.charAt(0) === '@') { + settings[key] = options[ + value.slice(1) || (prefix ? prefix + + key.charAt(0).toUpperCase() + key.slice(1) : key) + ]; + } else { + settings[key] = value; + } + + }); + processQueue.push(settings); + }); + options.processQueue = processQueue; + }, + + // Returns the number of files currently in the processsing queue: + processing: function () { + return this._processing; + }, + + // Processes the files given as files property of the data parameter, + // returns a Promise object that allows to bind callbacks: + process: function (data) { + var that = this, + options = $.extend({}, this.options, data); + if (options.processQueue && options.processQueue.length) { + this._transformProcessQueue(options); + if (this._processing === 0) { + this._trigger('processstart'); + } + $.each(data.files, function (index) { + var opts = index ? $.extend({}, options) : options, + func = function () { + if (data.errorThrown) { + return $.Deferred() + .rejectWith(that, [data]).promise(); + } + return that._processFile(opts, data); + }; + opts.index = index; + that._processing += 1; + that._processingQueue = that._processingQueue.then(func, func) + .always(function () { + that._processing -= 1; + if (that._processing === 0) { + that._trigger('processstop'); + } + }); + }); + } + return this._processingQueue; + }, + + _create: function () { + this._super(); + this._processing = 0; + this._processingQueue = $.Deferred().resolveWith(this) + .promise(); + } + + }); + +})); diff --git a/libraries/filemanager-9.14.1/js/jquery.fileupload-ui.js b/libraries/filemanager-9.14.1/js/jquery.fileupload-ui.js new file mode 100644 index 0000000..5058084 --- /dev/null +++ b/libraries/filemanager-9.14.1/js/jquery.fileupload-ui.js @@ -0,0 +1,714 @@ +/* + * jQuery File Upload User Interface Plugin + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2010, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * https://opensource.org/licenses/MIT + */ + +/* jshint nomen:false */ +/* global define, require, window */ + +;(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define([ + 'jquery', + 'blueimp-tmpl', + './jquery.fileupload-image', + './jquery.fileupload-audio', + './jquery.fileupload-video', + './jquery.fileupload-validate' + ], factory); + } else if (typeof exports === 'object') { + // Node/CommonJS: + factory( + require('jquery'), + require('blueimp-tmpl'), + require('./jquery.fileupload-image'), + require('./jquery.fileupload-audio'), + require('./jquery.fileupload-video'), + require('./jquery.fileupload-validate') + ); + } else { + // Browser globals: + factory( + window.jQuery, + window.tmpl + ); + } +}(function ($, tmpl) { + 'use strict'; + + $.blueimp.fileupload.prototype._specialOptions.push( + 'filesContainer', + 'uploadTemplateId', + 'downloadTemplateId' + ); + + // The UI version extends the file upload widget + // and adds complete user interface interaction: + $.widget('blueimp.fileupload', $.blueimp.fileupload, { + + options: { + // By default, files added to the widget are uploaded as soon + // as the user clicks on the start buttons. To enable automatic + // uploads, set the following option to true: + autoUpload: false, + // The ID of the upload template: + uploadTemplateId: 'template-upload', + // The ID of the download template: + downloadTemplateId: 'template-download', + // The container for the list of files. If undefined, it is set to + // an element with class "files" inside of the widget element: + filesContainer: undefined, + // By default, files are appended to the files container. + // Set the following option to true, to prepend files instead: + prependFiles: false, + // The expected data type of the upload response, sets the dataType + // option of the $.ajax upload requests: + dataType: 'json', + + // Error and info messages: + messages: { + unknownError: 'Unknown error' + }, + + // Function returning the current number of files, + // used by the maxNumberOfFiles validation: + getNumberOfFiles: function () { + return this.filesContainer.children() + .not('.processing').length; + }, + + // Callback to retrieve the list of files from the server response: + getFilesFromResponse: function (data) { + if (data.result && $.isArray(data.result.files)) { + return data.result.files; + } + return []; + }, + + // The add callback is invoked as soon as files are added to the fileupload + // widget (via file input selection, drag & drop or add API call). + // See the basic file upload widget for more information: + add: function (e, data) { + if (e.isDefaultPrevented()) { + return false; + } + var $this = $(this), + that = $this.data('blueimp-fileupload') || + $this.data('fileupload'), + options = that.options; + data.context = that._renderUpload(data.files) + .data('data', data) + .addClass('processing'); + options.filesContainer[ + options.prependFiles ? 'prepend' : 'append' + ](data.context); + that._forceReflow(data.context); + that._transition(data.context); + data.process(function () { + return $this.fileupload('process', data); + }).always(function () { + data.context.each(function (index) { + $(this).find('.size').text( + that._formatFileSize(data.files[index].size) + ); + }).removeClass('processing'); + that._renderPreviews(data); + }).done(function () { + data.context.find('.start').prop('disabled', false); + if ((that._trigger('added', e, data) !== false) && + (options.autoUpload || data.autoUpload) && + data.autoUpload !== false) { + data.submit(); + } + }).fail(function () { + if (data.files.error) { + data.context.each(function (index) { + var error = data.files[index].error; + if (error) { + $(this).find('.error').text(error); + } + }); + } + }); + }, + // Callback for the start of each file upload request: + send: function (e, data) { + if (e.isDefaultPrevented()) { + return false; + } + var that = $(this).data('blueimp-fileupload') || + $(this).data('fileupload'); + if (data.context && data.dataType && + data.dataType.substr(0, 6) === 'iframe') { + // Iframe Transport does not support progress events. + // In lack of an indeterminate progress bar, we set + // the progress to 100%, showing the full animated bar: + data.context + .find('.progress').addClass( + !$.support.transition && 'progress-animated' + ) + .attr('aria-valuenow', 100) + .children().first().css( + 'width', + '100%' + ); + } + return that._trigger('sent', e, data); + }, + // Callback for successful uploads: + done: function (e, data) { + if (e.isDefaultPrevented()) { + return false; + } + var that = $(this).data('blueimp-fileupload') || + $(this).data('fileupload'), + getFilesFromResponse = data.getFilesFromResponse || + that.options.getFilesFromResponse, + files = getFilesFromResponse(data), + template, + deferred; + if (data.context) { + data.context.each(function (index) { + var file = files[index] || + {error: 'Empty file upload result'}; + deferred = that._addFinishedDeferreds(); + that._transition($(this)).done( + function () { + var node = $(this); + template = that._renderDownload([file]) + .replaceAll(node); + that._forceReflow(template); + that._transition(template).done( + function () { + data.context = $(this); + that._trigger('completed', e, data); + that._trigger('finished', e, data); + deferred.resolve(); + } + ); + } + ); + }); + } else { + template = that._renderDownload(files)[ + that.options.prependFiles ? 'prependTo' : 'appendTo' + ](that.options.filesContainer); + that._forceReflow(template); + deferred = that._addFinishedDeferreds(); + that._transition(template).done( + function () { + data.context = $(this); + that._trigger('completed', e, data); + that._trigger('finished', e, data); + deferred.resolve(); + } + ); + } + }, + // Callback for failed (abort or error) uploads: + fail: function (e, data) { + if (e.isDefaultPrevented()) { + return false; + } + var that = $(this).data('blueimp-fileupload') || + $(this).data('fileupload'), + template, + deferred; + if (data.context) { + data.context.each(function (index) { + if (data.errorThrown !== 'abort') { + var file = data.files[index]; + file.error = file.error || data.errorThrown || + data.i18n('unknownError'); + deferred = that._addFinishedDeferreds(); + that._transition($(this)).done( + function () { + var node = $(this); + template = that._renderDownload([file]) + .replaceAll(node); + that._forceReflow(template); + that._transition(template).done( + function () { + data.context = $(this); + that._trigger('failed', e, data); + that._trigger('finished', e, data); + deferred.resolve(); + } + ); + } + ); + } else { + deferred = that._addFinishedDeferreds(); + that._transition($(this)).done( + function () { + $(this).remove(); + that._trigger('failed', e, data); + that._trigger('finished', e, data); + deferred.resolve(); + } + ); + } + }); + } else if (data.errorThrown !== 'abort') { + data.context = that._renderUpload(data.files)[ + that.options.prependFiles ? 'prependTo' : 'appendTo' + ](that.options.filesContainer) + .data('data', data); + that._forceReflow(data.context); + deferred = that._addFinishedDeferreds(); + that._transition(data.context).done( + function () { + data.context = $(this); + that._trigger('failed', e, data); + that._trigger('finished', e, data); + deferred.resolve(); + } + ); + } else { + that._trigger('failed', e, data); + that._trigger('finished', e, data); + that._addFinishedDeferreds().resolve(); + } + }, + // Callback for upload progress events: + progress: function (e, data) { + if (e.isDefaultPrevented()) { + return false; + } + var progress = Math.floor(data.loaded / data.total * 100); + if (data.context) { + data.context.each(function () { + $(this).find('.progress') + .attr('aria-valuenow', progress) + .children().first().css( + 'width', + progress + '%' + ); + }); + } + }, + // Callback for global upload progress events: + progressall: function (e, data) { + if (e.isDefaultPrevented()) { + return false; + } + var $this = $(this), + progress = Math.floor(data.loaded / data.total * 100), + globalProgressNode = $this.find('.fileupload-progress'), + extendedProgressNode = globalProgressNode + .find('.progress-extended'); + if (extendedProgressNode.length) { + extendedProgressNode.html( + ($this.data('blueimp-fileupload') || $this.data('fileupload')) + ._renderExtendedProgress(data) + ); + } + globalProgressNode + .find('.progress') + .attr('aria-valuenow', progress) + .children().first().css( + 'width', + progress + '%' + ); + }, + // Callback for uploads start, equivalent to the global ajaxStart event: + start: function (e) { + if (e.isDefaultPrevented()) { + return false; + } + var that = $(this).data('blueimp-fileupload') || + $(this).data('fileupload'); + that._resetFinishedDeferreds(); + that._transition($(this).find('.fileupload-progress')).done( + function () { + that._trigger('started', e); + } + ); + }, + // Callback for uploads stop, equivalent to the global ajaxStop event: + stop: function (e) { + if (e.isDefaultPrevented()) { + return false; + } + var that = $(this).data('blueimp-fileupload') || + $(this).data('fileupload'), + deferred = that._addFinishedDeferreds(); + $.when.apply($, that._getFinishedDeferreds()) + .done(function () { + that._trigger('stopped', e); + }); + that._transition($(this).find('.fileupload-progress')).done( + function () { + $(this).find('.progress') + .attr('aria-valuenow', '0') + .children().first().css('width', '0%'); + $(this).find('.progress-extended').html(' '); + deferred.resolve(); + } + ); + }, + processstart: function (e) { + if (e.isDefaultPrevented()) { + return false; + } + $(this).addClass('fileupload-processing'); + }, + processstop: function (e) { + if (e.isDefaultPrevented()) { + return false; + } + $(this).removeClass('fileupload-processing'); + }, + // Callback for file deletion: + destroy: function (e, data) { + if (e.isDefaultPrevented()) { + return false; + } + var that = $(this).data('blueimp-fileupload') || + $(this).data('fileupload'), + removeNode = function () { + that._transition(data.context).done( + function () { + $(this).remove(); + that._trigger('destroyed', e, data); + } + ); + }; + if (data.url) { + data.dataType = data.dataType || that.options.dataType; + $.ajax(data).done(removeNode).fail(function () { + that._trigger('destroyfailed', e, data); + }); + } else { + removeNode(); + } + } + }, + + _resetFinishedDeferreds: function () { + this._finishedUploads = []; + }, + + _addFinishedDeferreds: function (deferred) { + if (!deferred) { + deferred = $.Deferred(); + } + this._finishedUploads.push(deferred); + return deferred; + }, + + _getFinishedDeferreds: function () { + return this._finishedUploads; + }, + + // Link handler, that allows to download files + // by drag & drop of the links to the desktop: + _enableDragToDesktop: function () { + var link = $(this), + url = link.prop('href'), + name = link.prop('download'), + type = 'application/octet-stream'; + link.bind('dragstart', function (e) { + try { + e.originalEvent.dataTransfer.setData( + 'DownloadURL', + [type, name, url].join(':') + ); + } catch (ignore) {} + }); + }, + + _formatFileSize: function (bytes) { + if (typeof bytes !== 'number') { + return ''; + } + if (bytes >= 1000000000) { + return (bytes / 1000000000).toFixed(2) + ' GB'; + } + if (bytes >= 1000000) { + return (bytes / 1000000).toFixed(2) + ' MB'; + } + return (bytes / 1000).toFixed(2) + ' KB'; + }, + + _formatBitrate: function (bits) { + if (typeof bits !== 'number') { + return ''; + } + if (bits >= 1000000000) { + return (bits / 1000000000).toFixed(2) + ' Gbit/s'; + } + if (bits >= 1000000) { + return (bits / 1000000).toFixed(2) + ' Mbit/s'; + } + if (bits >= 1000) { + return (bits / 1000).toFixed(2) + ' kbit/s'; + } + return bits.toFixed(2) + ' bit/s'; + }, + + _formatTime: function (seconds) { + var date = new Date(seconds * 1000), + days = Math.floor(seconds / 86400); + days = days ? days + 'd ' : ''; + return days + + ('0' + date.getUTCHours()).slice(-2) + ':' + + ('0' + date.getUTCMinutes()).slice(-2) + ':' + + ('0' + date.getUTCSeconds()).slice(-2); + }, + + _formatPercentage: function (floatValue) { + return (floatValue * 100).toFixed(2) + ' %'; + }, + + _renderExtendedProgress: function (data) { + return this._formatBitrate(data.bitrate) + ' | ' + + this._formatTime( + (data.total - data.loaded) * 8 / data.bitrate + ) + ' | ' + + this._formatPercentage( + data.loaded / data.total + ) + ' | ' + + this._formatFileSize(data.loaded) + ' / ' + + this._formatFileSize(data.total); + }, + + _renderTemplate: function (func, files) { + if (!func) { + return $(); + } + var result = func({ + files: files, + formatFileSize: this._formatFileSize, + options: this.options + }); + if (result instanceof $) { + return result; + } + return $(this.options.templatesContainer).html(result).children(); + }, + + _renderPreviews: function (data) { + data.context.find('.preview').each(function (index, elm) { + $(elm).append(data.files[index].preview); + }); + }, + + _renderUpload: function (files) { + return this._renderTemplate( + this.options.uploadTemplate, + files + ); + }, + + _renderDownload: function (files) { + return this._renderTemplate( + this.options.downloadTemplate, + files + ).find('a[download]').each(this._enableDragToDesktop).end(); + }, + + _startHandler: function (e) { + e.preventDefault(); + var button = $(e.currentTarget), + template = button.closest('.template-upload'), + data = template.data('data'); + button.prop('disabled', true); + if (data && data.submit) { + data.submit(); + } + }, + + _cancelHandler: function (e) { + e.preventDefault(); + var template = $(e.currentTarget) + .closest('.template-upload,.template-download'), + data = template.data('data') || {}; + data.context = data.context || template; + if (data.abort) { + data.abort(); + } else { + data.errorThrown = 'abort'; + this._trigger('fail', e, data); + } + }, + + _deleteHandler: function (e) { + e.preventDefault(); + var button = $(e.currentTarget); + this._trigger('destroy', e, $.extend({ + context: button.closest('.template-download'), + type: 'DELETE' + }, button.data())); + }, + + _forceReflow: function (node) { + return $.support.transition && node.length && + node[0].offsetWidth; + }, + + _transition: function (node) { + var dfd = $.Deferred(); + if ($.support.transition && node.hasClass('fade') && node.is(':visible')) { + node.bind( + $.support.transition.end, + function (e) { + // Make sure we don't respond to other transitions events + // in the container element, e.g. from button elements: + if (e.target === node[0]) { + node.unbind($.support.transition.end); + dfd.resolveWith(node); + } + } + ).toggleClass('in'); + } else { + node.toggleClass('in'); + dfd.resolveWith(node); + } + return dfd; + }, + + _initButtonBarEventHandlers: function () { + var fileUploadButtonBar = this.element.find('.fileupload-buttonbar'), + filesList = this.options.filesContainer; + this._on(fileUploadButtonBar.find('.start'), { + click: function (e) { + e.preventDefault(); + filesList.find('.start').click(); + } + }); + this._on(fileUploadButtonBar.find('.cancel'), { + click: function (e) { + e.preventDefault(); + filesList.find('.cancel').click(); + } + }); + this._on(fileUploadButtonBar.find('.delete'), { + click: function (e) { + e.preventDefault(); + filesList.find('.toggle:checked') + .closest('.template-download') + .find('.delete').click(); + fileUploadButtonBar.find('.toggle') + .prop('checked', false); + } + }); + this._on(fileUploadButtonBar.find('.toggle'), { + change: function (e) { + filesList.find('.toggle').prop( + 'checked', + $(e.currentTarget).is(':checked') + ); + } + }); + }, + + _destroyButtonBarEventHandlers: function () { + this._off( + this.element.find('.fileupload-buttonbar') + .find('.start, .cancel, .delete'), + 'click' + ); + this._off( + this.element.find('.fileupload-buttonbar .toggle'), + 'change.' + ); + }, + + _initEventHandlers: function () { + this._super(); + this._on(this.options.filesContainer, { + 'click .start': this._startHandler, + 'click .cancel': this._cancelHandler, + 'click .delete': this._deleteHandler + }); + this._initButtonBarEventHandlers(); + }, + + _destroyEventHandlers: function () { + this._destroyButtonBarEventHandlers(); + this._off(this.options.filesContainer, 'click'); + this._super(); + }, + + _enableFileInputButton: function () { + this.element.find('.fileinput-button input') + .prop('disabled', false) + .parent().removeClass('disabled'); + }, + + _disableFileInputButton: function () { + this.element.find('.fileinput-button input') + .prop('disabled', true) + .parent().addClass('disabled'); + }, + + _initTemplates: function () { + var options = this.options; + options.templatesContainer = this.document[0].createElement( + options.filesContainer.prop('nodeName') + ); + if (tmpl) { + if (options.uploadTemplateId) { + options.uploadTemplate = tmpl(options.uploadTemplateId); + } + if (options.downloadTemplateId) { + options.downloadTemplate = tmpl(options.downloadTemplateId); + } + } + }, + + _initFilesContainer: function () { + var options = this.options; + if (options.filesContainer === undefined) { + options.filesContainer = this.element.find('.files'); + } else if (!(options.filesContainer instanceof $)) { + options.filesContainer = $(options.filesContainer); + } + }, + + _initSpecialOptions: function () { + this._super(); + this._initFilesContainer(); + this._initTemplates(); + }, + + _create: function () { + this._super(); + this._resetFinishedDeferreds(); + if (!$.support.fileInput) { + this._disableFileInputButton(); + } + }, + + enable: function () { + var wasDisabled = false; + if (this.options.disabled) { + wasDisabled = true; + } + this._super(); + if (wasDisabled) { + this.element.find('input, button').prop('disabled', false); + this._enableFileInputButton(); + } + }, + + disable: function () { + if (!this.options.disabled) { + this.element.find('input, button').prop('disabled', true); + this._disableFileInputButton(); + } + this._super(); + } + + }); + +})); diff --git a/libraries/filemanager-9.14.1/js/jquery.fileupload-validate.js b/libraries/filemanager-9.14.1/js/jquery.fileupload-validate.js new file mode 100644 index 0000000..eebeb37 --- /dev/null +++ b/libraries/filemanager-9.14.1/js/jquery.fileupload-validate.js @@ -0,0 +1,125 @@ +/* + * jQuery File Upload Validation Plugin + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2013, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * https://opensource.org/licenses/MIT + */ + +/* global define, require, window */ + +;(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define([ + 'jquery', + './jquery.fileupload-process' + ], factory); + } else if (typeof exports === 'object') { + // Node/CommonJS: + factory( + require('jquery'), + require('./jquery.fileupload-process') + ); + } else { + // Browser globals: + factory( + window.jQuery + ); + } +}(function ($) { + 'use strict'; + + // Append to the default processQueue: + $.blueimp.fileupload.prototype.options.processQueue.push( + { + action: 'validate', + // Always trigger this action, + // even if the previous action was rejected: + always: true, + // Options taken from the global options map: + acceptFileTypes: '@', + maxFileSize: '@', + minFileSize: '@', + maxNumberOfFiles: '@', + disabled: '@disableValidation' + } + ); + + // The File Upload Validation plugin extends the fileupload widget + // with file validation functionality: + $.widget('blueimp.fileupload', $.blueimp.fileupload, { + + options: { + /* + // The regular expression for allowed file types, matches + // against either file type or file name: + acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i, + // The maximum allowed file size in bytes: + maxFileSize: 10000000, // 10 MB + // The minimum allowed file size in bytes: + minFileSize: undefined, // No minimal file size + // The limit of files to be uploaded: + maxNumberOfFiles: 10, + */ + + // Function returning the current number of files, + // has to be overriden for maxNumberOfFiles validation: + getNumberOfFiles: $.noop, + + // Error and info messages: + messages: { + maxNumberOfFiles: 'Maximum number of files exceeded', + acceptFileTypes: 'File type not allowed', + maxFileSize: 'File is too large', + minFileSize: 'File is too small' + } + }, + + processActions: { + + validate: function (data, options) { + if (options.disabled) { + return data; + } + var dfd = $.Deferred(), + settings = this.options, + file = data.files[data.index], + fileSize; + if (options.minFileSize || options.maxFileSize) { + fileSize = file.size; + } + if ($.type(options.maxNumberOfFiles) === 'number' && + (settings.getNumberOfFiles() || 0) + data.files.length > + options.maxNumberOfFiles) { + file.error = settings.i18n('maxNumberOfFiles'); + } else if (options.acceptFileTypes && + !(options.acceptFileTypes.test(file.type) || + options.acceptFileTypes.test(file.name))) { + file.error = settings.i18n('acceptFileTypes'); + } else if (fileSize > options.maxFileSize) { + file.error = settings.i18n('maxFileSize'); + } else if ($.type(fileSize) === 'number' && + fileSize < options.minFileSize) { + file.error = settings.i18n('minFileSize'); + } else { + delete file.error; + } + if (file.error || data.files.error) { + data.files.error = true; + dfd.rejectWith(this, [data]); + } else { + dfd.resolveWith(this, [data]); + } + return dfd.promise(); + } + + } + + }); + +})); diff --git a/libraries/filemanager-9.14.1/js/jquery.fileupload-video.js b/libraries/filemanager-9.14.1/js/jquery.fileupload-video.js new file mode 100644 index 0000000..aedcec2 --- /dev/null +++ b/libraries/filemanager-9.14.1/js/jquery.fileupload-video.js @@ -0,0 +1,113 @@ +/* + * jQuery File Upload Video Preview Plugin + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2013, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * https://opensource.org/licenses/MIT + */ + +/* jshint nomen:false */ +/* global define, require, window, document */ + +;(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define([ + 'jquery', + 'load-image', + './jquery.fileupload-process' + ], factory); + } else if (typeof exports === 'object') { + // Node/CommonJS: + factory( + require('jquery'), + require('blueimp-load-image/js/load-image'), + require('./jquery.fileupload-process') + ); + } else { + // Browser globals: + factory( + window.jQuery, + window.loadImage + ); + } +}(function ($, loadImage) { + 'use strict'; + + // Prepend to the default processQueue: + $.blueimp.fileupload.prototype.options.processQueue.unshift( + { + action: 'loadVideo', + // Use the action as prefix for the "@" options: + prefix: true, + fileTypes: '@', + maxFileSize: '@', + disabled: '@disableVideoPreview' + }, + { + action: 'setVideo', + name: '@videoPreviewName', + disabled: '@disableVideoPreview' + } + ); + + // The File Upload Video Preview plugin extends the fileupload widget + // with video preview functionality: + $.widget('blueimp.fileupload', $.blueimp.fileupload, { + + options: { + // The regular expression for the types of video files to load, + // matched against the file type: + loadVideoFileTypes: /^video\/.*$/ + }, + + _videoElement: document.createElement('video'), + + processActions: { + + // Loads the video file given via data.files and data.index + // as video element if the browser supports playing it. + // Accepts the options fileTypes (regular expression) + // and maxFileSize (integer) to limit the files to load: + loadVideo: function (data, options) { + if (options.disabled) { + return data; + } + var file = data.files[data.index], + url, + video; + if (this._videoElement.canPlayType && + this._videoElement.canPlayType(file.type) && + ($.type(options.maxFileSize) !== 'number' || + file.size <= options.maxFileSize) && + (!options.fileTypes || + options.fileTypes.test(file.type))) { + url = loadImage.createObjectURL(file); + if (url) { + video = this._videoElement.cloneNode(false); + video.src = url; + video.controls = true; + data.video = video; + return data; + } + } + return data; + }, + + // Sets the video element as a property of the file object: + setVideo: function (data, options) { + if (data.video && !options.disabled) { + data.files[data.index][options.name || 'preview'] = data.video; + } + return data; + } + + } + + }); + +})); diff --git a/libraries/filemanager-9.14.1/js/jquery.fileupload.js b/libraries/filemanager-9.14.1/js/jquery.fileupload.js new file mode 100644 index 0000000..700f901 --- /dev/null +++ b/libraries/filemanager-9.14.1/js/jquery.fileupload.js @@ -0,0 +1,1502 @@ +/* + * jQuery File Upload Plugin + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2010, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * https://opensource.org/licenses/MIT + */ + +/* jshint nomen:false */ +/* global define, require, window, document, location, Blob, FormData */ + +;(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define([ + 'jquery', + 'jquery-ui/ui/widget' + ], factory); + } else if (typeof exports === 'object') { + // Node/CommonJS: + factory( + require('jquery'), + require('./vendor/jquery.ui.widget') + ); + } else { + // Browser globals: + factory(window.jQuery); + } +}(function ($) { + 'use strict'; + + // Detect file input support, based on + // http://viljamis.com/blog/2012/file-upload-support-on-mobile/ + $.support.fileInput = !(new RegExp( + // Handle devices which give false positives for the feature detection: + '(Android (1\\.[0156]|2\\.[01]))' + + '|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)' + + '|(w(eb)?OSBrowser)|(webOS)' + + '|(Kindle/(1\\.0|2\\.[05]|3\\.0))' + ).test(window.navigator.userAgent) || + // Feature detection for all other devices: + $('').prop('disabled')); + + // The FileReader API is not actually used, but works as feature detection, + // as some Safari versions (5?) support XHR file uploads via the FormData API, + // but not non-multipart XHR file uploads. + // window.XMLHttpRequestUpload is not available on IE10, so we check for + // window.ProgressEvent instead to detect XHR2 file upload capability: + $.support.xhrFileUpload = !!(window.ProgressEvent && window.FileReader); + $.support.xhrFormDataFileUpload = !!window.FormData; + + // Detect support for Blob slicing (required for chunked uploads): + $.support.blobSlice = window.Blob && (Blob.prototype.slice || + Blob.prototype.webkitSlice || Blob.prototype.mozSlice); + + // Helper function to create drag handlers for dragover/dragenter/dragleave: + function getDragHandler(type) { + var isDragOver = type === 'dragover'; + return function (e) { + e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer; + var dataTransfer = e.dataTransfer; + if (dataTransfer && $.inArray('Files', dataTransfer.types) !== -1 && + this._trigger( + type, + $.Event(type, {delegatedEvent: e}) + ) !== false) { + e.preventDefault(); + if (isDragOver) { + dataTransfer.dropEffect = 'copy'; + } + } + }; + } + + // The fileupload widget listens for change events on file input fields defined + // via fileInput setting and paste or drop events of the given dropZone. + // In addition to the default jQuery Widget methods, the fileupload widget + // exposes the "add" and "send" methods, to add or directly send files using + // the fileupload API. + // By default, files added via file input selection, paste, drag & drop or + // "add" method are uploaded immediately, but it is possible to override + // the "add" callback option to queue file uploads. + $.widget('blueimp.fileupload', { + + options: { + // The drop target element(s), by the default the complete document. + // Set to null to disable drag & drop support: + dropZone: $(document), + // The paste target element(s), by the default undefined. + // Set to a DOM node or jQuery object to enable file pasting: + pasteZone: undefined, + // The file input field(s), that are listened to for change events. + // If undefined, it is set to the file input fields inside + // of the widget element on plugin initialization. + // Set to null to disable the change listener. + fileInput: undefined, + // By default, the file input field is replaced with a clone after + // each input field change event. This is required for iframe transport + // queues and allows change events to be fired for the same file + // selection, but can be disabled by setting the following option to false: + replaceFileInput: true, + // The parameter name for the file form data (the request argument name). + // If undefined or empty, the name property of the file input field is + // used, or "files[]" if the file input name property is also empty, + // can be a string or an array of strings: + paramName: undefined, + // By default, each file of a selection is uploaded using an individual + // request for XHR type uploads. Set to false to upload file + // selections in one request each: + singleFileUploads: true, + // To limit the number of files uploaded with one XHR request, + // set the following option to an integer greater than 0: + limitMultiFileUploads: undefined, + // The following option limits the number of files uploaded with one + // XHR request to keep the request size under or equal to the defined + // limit in bytes: + limitMultiFileUploadSize: undefined, + // Multipart file uploads add a number of bytes to each uploaded file, + // therefore the following option adds an overhead for each file used + // in the limitMultiFileUploadSize configuration: + limitMultiFileUploadSizeOverhead: 512, + // Set the following option to true to issue all file upload requests + // in a sequential order: + sequentialUploads: false, + // To limit the number of concurrent uploads, + // set the following option to an integer greater than 0: + limitConcurrentUploads: undefined, + // Set the following option to true to force iframe transport uploads: + forceIframeTransport: false, + // Set the following option to the location of a redirect url on the + // origin server, for cross-domain iframe transport uploads: + redirect: undefined, + // The parameter name for the redirect url, sent as part of the form + // data and set to 'redirect' if this option is empty: + redirectParamName: undefined, + // Set the following option to the location of a postMessage window, + // to enable postMessage transport uploads: + postMessage: undefined, + // By default, XHR file uploads are sent as multipart/form-data. + // The iframe transport is always using multipart/form-data. + // Set to false to enable non-multipart XHR uploads: + multipart: true, + // To upload large files in smaller chunks, set the following option + // to a preferred maximum chunk size. If set to 0, null or undefined, + // or the browser does not support the required Blob API, files will + // be uploaded as a whole. + maxChunkSize: undefined, + // When a non-multipart upload or a chunked multipart upload has been + // aborted, this option can be used to resume the upload by setting + // it to the size of the already uploaded bytes. This option is most + // useful when modifying the options object inside of the "add" or + // "send" callbacks, as the options are cloned for each file upload. + uploadedBytes: undefined, + // By default, failed (abort or error) file uploads are removed from the + // global progress calculation. Set the following option to false to + // prevent recalculating the global progress data: + recalculateProgress: true, + // Interval in milliseconds to calculate and trigger progress events: + progressInterval: 100, + // Interval in milliseconds to calculate progress bitrate: + bitrateInterval: 500, + // By default, uploads are started automatically when adding files: + autoUpload: true, + + // Error and info messages: + messages: { + uploadedBytes: 'Uploaded bytes exceed file size' + }, + + // Translation function, gets the message key to be translated + // and an object with context specific data as arguments: + i18n: function (message, context) { + message = this.messages[message] || message.toString(); + if (context) { + $.each(context, function (key, value) { + message = message.replace('{' + key + '}', value); + }); + } + return message; + }, + + // Additional form data to be sent along with the file uploads can be set + // using this option, which accepts an array of objects with name and + // value properties, a function returning such an array, a FormData + // object (for XHR file uploads), or a simple object. + // The form of the first fileInput is given as parameter to the function: + formData: function (form) { + return form.serializeArray(); + }, + + // The add callback is invoked as soon as files are added to the fileupload + // widget (via file input selection, drag & drop, paste or add API call). + // If the singleFileUploads option is enabled, this callback will be + // called once for each file in the selection for XHR file uploads, else + // once for each file selection. + // + // The upload starts when the submit method is invoked on the data parameter. + // The data object contains a files property holding the added files + // and allows you to override plugin options as well as define ajax settings. + // + // Listeners for this callback can also be bound the following way: + // .bind('fileuploadadd', func); + // + // data.submit() returns a Promise object and allows to attach additional + // handlers using jQuery's Deferred callbacks: + // data.submit().done(func).fail(func).always(func); + add: function (e, data) { + if (e.isDefaultPrevented()) { + return false; + } + if (data.autoUpload || (data.autoUpload !== false && + $(this).fileupload('option', 'autoUpload'))) { + data.process().done(function () { + data.submit(); + }); + } + }, + + // Other callbacks: + + // Callback for the submit event of each file upload: + // submit: function (e, data) {}, // .bind('fileuploadsubmit', func); + + // Callback for the start of each file upload request: + // send: function (e, data) {}, // .bind('fileuploadsend', func); + + // Callback for successful uploads: + // done: function (e, data) {}, // .bind('fileuploaddone', func); + + // Callback for failed (abort or error) uploads: + // fail: function (e, data) {}, // .bind('fileuploadfail', func); + + // Callback for completed (success, abort or error) requests: + // always: function (e, data) {}, // .bind('fileuploadalways', func); + + // Callback for upload progress events: + // progress: function (e, data) {}, // .bind('fileuploadprogress', func); + + // Callback for global upload progress events: + // progressall: function (e, data) {}, // .bind('fileuploadprogressall', func); + + // Callback for uploads start, equivalent to the global ajaxStart event: + // start: function (e) {}, // .bind('fileuploadstart', func); + + // Callback for uploads stop, equivalent to the global ajaxStop event: + // stop: function (e) {}, // .bind('fileuploadstop', func); + + // Callback for change events of the fileInput(s): + // change: function (e, data) {}, // .bind('fileuploadchange', func); + + // Callback for paste events to the pasteZone(s): + // paste: function (e, data) {}, // .bind('fileuploadpaste', func); + + // Callback for drop events of the dropZone(s): + // drop: function (e, data) {}, // .bind('fileuploaddrop', func); + + // Callback for dragover events of the dropZone(s): + // dragover: function (e) {}, // .bind('fileuploaddragover', func); + + // Callback before the start of each chunk upload request (before form data initialization): + // chunkbeforesend: function (e, data) {}, // .bind('fileuploadchunkbeforesend', func); + + // Callback for the start of each chunk upload request: + // chunksend: function (e, data) {}, // .bind('fileuploadchunksend', func); + + // Callback for successful chunk uploads: + // chunkdone: function (e, data) {}, // .bind('fileuploadchunkdone', func); + + // Callback for failed (abort or error) chunk uploads: + // chunkfail: function (e, data) {}, // .bind('fileuploadchunkfail', func); + + // Callback for completed (success, abort or error) chunk upload requests: + // chunkalways: function (e, data) {}, // .bind('fileuploadchunkalways', func); + + // The plugin options are used as settings object for the ajax calls. + // The following are jQuery ajax settings required for the file uploads: + processData: false, + contentType: false, + cache: false, + timeout: 0 + }, + + // A list of options that require reinitializing event listeners and/or + // special initialization code: + _specialOptions: [ + 'fileInput', + 'dropZone', + 'pasteZone', + 'multipart', + 'forceIframeTransport' + ], + + _blobSlice: $.support.blobSlice && function () { + var slice = this.slice || this.webkitSlice || this.mozSlice; + return slice.apply(this, arguments); + }, + + _BitrateTimer: function () { + this.timestamp = ((Date.now) ? Date.now() : (new Date()).getTime()); + this.loaded = 0; + this.bitrate = 0; + this.getBitrate = function (now, loaded, interval) { + var timeDiff = now - this.timestamp; + if (!this.bitrate || !interval || timeDiff > interval) { + this.bitrate = (loaded - this.loaded) * (1000 / timeDiff) * 8; + this.loaded = loaded; + this.timestamp = now; + } + return this.bitrate; + }; + }, + + _isXHRUpload: function (options) { + return !options.forceIframeTransport && + ((!options.multipart && $.support.xhrFileUpload) || + $.support.xhrFormDataFileUpload); + }, + + _getFormData: function (options) { + var formData; + if ($.type(options.formData) === 'function') { + return options.formData(options.form); + } + if ($.isArray(options.formData)) { + return options.formData; + } + if ($.type(options.formData) === 'object') { + formData = []; + $.each(options.formData, function (name, value) { + formData.push({name: name, value: value}); + }); + return formData; + } + return []; + }, + + _getTotal: function (files) { + var total = 0; + $.each(files, function (index, file) { + total += file.size || 1; + }); + return total; + }, + + _initProgressObject: function (obj) { + var progress = { + loaded: 0, + total: 0, + bitrate: 0 + }; + if (obj._progress) { + $.extend(obj._progress, progress); + } else { + obj._progress = progress; + } + }, + + _initResponseObject: function (obj) { + var prop; + if (obj._response) { + for (prop in obj._response) { + if (obj._response.hasOwnProperty(prop)) { + delete obj._response[prop]; + } + } + } else { + obj._response = {}; + } + }, + + _onProgress: function (e, data) { + if (e.lengthComputable) { + var now = ((Date.now) ? Date.now() : (new Date()).getTime()), + loaded; + if (data._time && data.progressInterval && + (now - data._time < data.progressInterval) && + e.loaded !== e.total) { + return; + } + data._time = now; + loaded = Math.floor( + e.loaded / e.total * (data.chunkSize || data._progress.total) + ) + (data.uploadedBytes || 0); + // Add the difference from the previously loaded state + // to the global loaded counter: + this._progress.loaded += (loaded - data._progress.loaded); + this._progress.bitrate = this._bitrateTimer.getBitrate( + now, + this._progress.loaded, + data.bitrateInterval + ); + data._progress.loaded = data.loaded = loaded; + data._progress.bitrate = data.bitrate = data._bitrateTimer.getBitrate( + now, + loaded, + data.bitrateInterval + ); + // Trigger a custom progress event with a total data property set + // to the file size(s) of the current upload and a loaded data + // property calculated accordingly: + this._trigger( + 'progress', + $.Event('progress', {delegatedEvent: e}), + data + ); + // Trigger a global progress event for all current file uploads, + // including ajax calls queued for sequential file uploads: + this._trigger( + 'progressall', + $.Event('progressall', {delegatedEvent: e}), + this._progress + ); + } + }, + + _initProgressListener: function (options) { + var that = this, + xhr = options.xhr ? options.xhr() : $.ajaxSettings.xhr(); + // Accesss to the native XHR object is required to add event listeners + // for the upload progress event: + if (xhr.upload) { + $(xhr.upload).bind('progress', function (e) { + var oe = e.originalEvent; + // Make sure the progress event properties get copied over: + e.lengthComputable = oe.lengthComputable; + e.loaded = oe.loaded; + e.total = oe.total; + that._onProgress(e, options); + }); + options.xhr = function () { + return xhr; + }; + } + }, + + _deinitProgressListener: function (options) { + var xhr = options.xhr ? options.xhr() : $.ajaxSettings.xhr(); + if (xhr.upload) { + $(xhr.upload).unbind('progress'); + } + }, + + _isInstanceOf: function (type, obj) { + // Cross-frame instanceof check + return Object.prototype.toString.call(obj) === '[object ' + type + ']'; + }, + + _initXHRData: function (options) { + var that = this, + formData, + file = options.files[0], + // Ignore non-multipart setting if not supported: + multipart = options.multipart || !$.support.xhrFileUpload, + paramName = $.type(options.paramName) === 'array' ? + options.paramName[0] : options.paramName; + options.headers = $.extend({}, options.headers); + if (options.contentRange) { + options.headers['Content-Range'] = options.contentRange; + } + if (!multipart || options.blob || !this._isInstanceOf('File', file)) { + options.headers['Content-Disposition'] = 'attachment; filename="' + + encodeURI(file.uploadName || file.name) + '"'; + } + if (!multipart) { + options.contentType = file.type || 'application/octet-stream'; + options.data = options.blob || file; + } else if ($.support.xhrFormDataFileUpload) { + if (options.postMessage) { + // window.postMessage does not allow sending FormData + // objects, so we just add the File/Blob objects to + // the formData array and let the postMessage window + // create the FormData object out of this array: + formData = this._getFormData(options); + if (options.blob) { + formData.push({ + name: paramName, + value: options.blob + }); + } else { + $.each(options.files, function (index, file) { + formData.push({ + name: ($.type(options.paramName) === 'array' && + options.paramName[index]) || paramName, + value: file + }); + }); + } + } else { + if (that._isInstanceOf('FormData', options.formData)) { + formData = options.formData; + } else { + formData = new FormData(); + $.each(this._getFormData(options), function (index, field) { + formData.append(field.name, field.value); + }); + } + if (options.blob) { + formData.append( + paramName, + options.blob, + file.uploadName || file.name + ); + } else { + $.each(options.files, function (index, file) { + // This check allows the tests to run with + // dummy objects: + if (that._isInstanceOf('File', file) || + that._isInstanceOf('Blob', file)) { + formData.append( + ($.type(options.paramName) === 'array' && + options.paramName[index]) || paramName, + file, + file.uploadName || file.name + ); + } + }); + } + } + options.data = formData; + } + // Blob reference is not needed anymore, free memory: + options.blob = null; + }, + + _initIframeSettings: function (options) { + var targetHost = $('').prop('href', options.url).prop('host'); + // Setting the dataType to iframe enables the iframe transport: + options.dataType = 'iframe ' + (options.dataType || ''); + // The iframe transport accepts a serialized array as form data: + options.formData = this._getFormData(options); + // Add redirect url to form data on cross-domain uploads: + if (options.redirect && targetHost && targetHost !== location.host) { + options.formData.push({ + name: options.redirectParamName || 'redirect', + value: options.redirect + }); + } + }, + + _initDataSettings: function (options) { + if (this._isXHRUpload(options)) { + if (!this._chunkedUpload(options, true)) { + if (!options.data) { + this._initXHRData(options); + } + this._initProgressListener(options); + } + if (options.postMessage) { + // Setting the dataType to postmessage enables the + // postMessage transport: + options.dataType = 'postmessage ' + (options.dataType || ''); + } + } else { + this._initIframeSettings(options); + } + }, + + _getParamName: function (options) { + var fileInput = $(options.fileInput), + paramName = options.paramName; + if (!paramName) { + paramName = []; + fileInput.each(function () { + var input = $(this), + name = input.prop('name') || 'files[]', + i = (input.prop('files') || [1]).length; + while (i) { + paramName.push(name); + i -= 1; + } + }); + if (!paramName.length) { + paramName = [fileInput.prop('name') || 'files[]']; + } + } else if (!$.isArray(paramName)) { + paramName = [paramName]; + } + return paramName; + }, + + _initFormSettings: function (options) { + // Retrieve missing options from the input field and the + // associated form, if available: + if (!options.form || !options.form.length) { + options.form = $(options.fileInput.prop('form')); + // If the given file input doesn't have an associated form, + // use the default widget file input's form: + if (!options.form.length) { + options.form = $(this.options.fileInput.prop('form')); + } + } + options.paramName = this._getParamName(options); + if (!options.url) { + options.url = options.form.prop('action') || location.href; + } + // The HTTP request method must be "POST" or "PUT": + options.type = (options.type || + ($.type(options.form.prop('method')) === 'string' && + options.form.prop('method')) || '' + ).toUpperCase(); + if (options.type !== 'POST' && options.type !== 'PUT' && + options.type !== 'PATCH') { + options.type = 'POST'; + } + if (!options.formAcceptCharset) { + options.formAcceptCharset = options.form.attr('accept-charset'); + } + }, + + _getAJAXSettings: function (data) { + var options = $.extend({}, this.options, data); + this._initFormSettings(options); + this._initDataSettings(options); + return options; + }, + + // jQuery 1.6 doesn't provide .state(), + // while jQuery 1.8+ removed .isRejected() and .isResolved(): + _getDeferredState: function (deferred) { + if (deferred.state) { + return deferred.state(); + } + if (deferred.isResolved()) { + return 'resolved'; + } + if (deferred.isRejected()) { + return 'rejected'; + } + return 'pending'; + }, + + // Maps jqXHR callbacks to the equivalent + // methods of the given Promise object: + _enhancePromise: function (promise) { + promise.success = promise.done; + promise.error = promise.fail; + promise.complete = promise.always; + return promise; + }, + + // Creates and returns a Promise object enhanced with + // the jqXHR methods abort, success, error and complete: + _getXHRPromise: function (resolveOrReject, context, args) { + var dfd = $.Deferred(), + promise = dfd.promise(); + context = context || this.options.context || promise; + if (resolveOrReject === true) { + dfd.resolveWith(context, args); + } else if (resolveOrReject === false) { + dfd.rejectWith(context, args); + } + promise.abort = dfd.promise; + return this._enhancePromise(promise); + }, + + // Adds convenience methods to the data callback argument: + _addConvenienceMethods: function (e, data) { + var that = this, + getPromise = function (args) { + return $.Deferred().resolveWith(that, args).promise(); + }; + data.process = function (resolveFunc, rejectFunc) { + if (resolveFunc || rejectFunc) { + data._processQueue = this._processQueue = + (this._processQueue || getPromise([this])).then( + function () { + if (data.errorThrown) { + return $.Deferred() + .rejectWith(that, [data]).promise(); + } + return getPromise(arguments); + } + ).then(resolveFunc, rejectFunc); + } + return this._processQueue || getPromise([this]); + }; + data.submit = function () { + if (this.state() !== 'pending') { + data.jqXHR = this.jqXHR = + (that._trigger( + 'submit', + $.Event('submit', {delegatedEvent: e}), + this + ) !== false) && that._onSend(e, this); + } + return this.jqXHR || that._getXHRPromise(); + }; + data.abort = function () { + if (this.jqXHR) { + return this.jqXHR.abort(); + } + this.errorThrown = 'abort'; + that._trigger('fail', null, this); + return that._getXHRPromise(false); + }; + data.state = function () { + if (this.jqXHR) { + return that._getDeferredState(this.jqXHR); + } + if (this._processQueue) { + return that._getDeferredState(this._processQueue); + } + }; + data.processing = function () { + return !this.jqXHR && this._processQueue && that + ._getDeferredState(this._processQueue) === 'pending'; + }; + data.progress = function () { + return this._progress; + }; + data.response = function () { + return this._response; + }; + }, + + // Parses the Range header from the server response + // and returns the uploaded bytes: + _getUploadedBytes: function (jqXHR) { + var range = jqXHR.getResponseHeader('Range'), + parts = range && range.split('-'), + upperBytesPos = parts && parts.length > 1 && + parseInt(parts[1], 10); + return upperBytesPos && upperBytesPos + 1; + }, + + // Uploads a file in multiple, sequential requests + // by splitting the file up in multiple blob chunks. + // If the second parameter is true, only tests if the file + // should be uploaded in chunks, but does not invoke any + // upload requests: + _chunkedUpload: function (options, testOnly) { + options.uploadedBytes = options.uploadedBytes || 0; + var that = this, + file = options.files[0], + fs = file.size, + ub = options.uploadedBytes, + mcs = options.maxChunkSize || fs, + slice = this._blobSlice, + dfd = $.Deferred(), + promise = dfd.promise(), + jqXHR, + upload; + if (!(this._isXHRUpload(options) && slice && (ub || ($.type(mcs) === 'function' ? mcs(options) : mcs) < fs)) || + options.data) { + return false; + } + if (testOnly) { + return true; + } + if (ub >= fs) { + file.error = options.i18n('uploadedBytes'); + return this._getXHRPromise( + false, + options.context, + [null, 'error', file.error] + ); + } + // The chunk upload method: + upload = function () { + // Clone the options object for each chunk upload: + var o = $.extend({}, options), + currentLoaded = o._progress.loaded; + o.blob = slice.call( + file, + ub, + ub + ($.type(mcs) === 'function' ? mcs(o) : mcs), + file.type + ); + // Store the current chunk size, as the blob itself + // will be dereferenced after data processing: + o.chunkSize = o.blob.size; + // Expose the chunk bytes position range: + o.contentRange = 'bytes ' + ub + '-' + + (ub + o.chunkSize - 1) + '/' + fs; + // Trigger chunkbeforesend to allow form data to be updated for this chunk + that._trigger('chunkbeforesend', null, o); + // Process the upload data (the blob and potential form data): + that._initXHRData(o); + // Add progress listeners for this chunk upload: + that._initProgressListener(o); + jqXHR = ((that._trigger('chunksend', null, o) !== false && $.ajax(o)) || + that._getXHRPromise(false, o.context)) + .done(function (result, textStatus, jqXHR) { + ub = that._getUploadedBytes(jqXHR) || + (ub + o.chunkSize); + // Create a progress event if no final progress event + // with loaded equaling total has been triggered + // for this chunk: + if (currentLoaded + o.chunkSize - o._progress.loaded) { + that._onProgress($.Event('progress', { + lengthComputable: true, + loaded: ub - o.uploadedBytes, + total: ub - o.uploadedBytes + }), o); + } + options.uploadedBytes = o.uploadedBytes = ub; + o.result = result; + o.textStatus = textStatus; + o.jqXHR = jqXHR; + that._trigger('chunkdone', null, o); + that._trigger('chunkalways', null, o); + if (ub < fs) { + // File upload not yet complete, + // continue with the next chunk: + upload(); + } else { + dfd.resolveWith( + o.context, + [result, textStatus, jqXHR] + ); + } + }) + .fail(function (jqXHR, textStatus, errorThrown) { + o.jqXHR = jqXHR; + o.textStatus = textStatus; + o.errorThrown = errorThrown; + that._trigger('chunkfail', null, o); + that._trigger('chunkalways', null, o); + dfd.rejectWith( + o.context, + [jqXHR, textStatus, errorThrown] + ); + }) + .always(function () { + that._deinitProgressListener(o); + }); + }; + this._enhancePromise(promise); + promise.abort = function () { + return jqXHR.abort(); + }; + upload(); + return promise; + }, + + _beforeSend: function (e, data) { + if (this._active === 0) { + // the start callback is triggered when an upload starts + // and no other uploads are currently running, + // equivalent to the global ajaxStart event: + this._trigger('start'); + // Set timer for global bitrate progress calculation: + this._bitrateTimer = new this._BitrateTimer(); + // Reset the global progress values: + this._progress.loaded = this._progress.total = 0; + this._progress.bitrate = 0; + } + // Make sure the container objects for the .response() and + // .progress() methods on the data object are available + // and reset to their initial state: + this._initResponseObject(data); + this._initProgressObject(data); + data._progress.loaded = data.loaded = data.uploadedBytes || 0; + data._progress.total = data.total = this._getTotal(data.files) || 1; + data._progress.bitrate = data.bitrate = 0; + this._active += 1; + // Initialize the global progress values: + this._progress.loaded += data.loaded; + this._progress.total += data.total; + }, + + _onDone: function (result, textStatus, jqXHR, options) { + var total = options._progress.total, + response = options._response; + if (options._progress.loaded < total) { + // Create a progress event if no final progress event + // with loaded equaling total has been triggered: + this._onProgress($.Event('progress', { + lengthComputable: true, + loaded: total, + total: total + }), options); + } + response.result = options.result = result; + response.textStatus = options.textStatus = textStatus; + response.jqXHR = options.jqXHR = jqXHR; + this._trigger('done', null, options); + }, + + _onFail: function (jqXHR, textStatus, errorThrown, options) { + var response = options._response; + if (options.recalculateProgress) { + // Remove the failed (error or abort) file upload from + // the global progress calculation: + this._progress.loaded -= options._progress.loaded; + this._progress.total -= options._progress.total; + } + response.jqXHR = options.jqXHR = jqXHR; + response.textStatus = options.textStatus = textStatus; + response.errorThrown = options.errorThrown = errorThrown; + this._trigger('fail', null, options); + }, + + _onAlways: function (jqXHRorResult, textStatus, jqXHRorError, options) { + // jqXHRorResult, textStatus and jqXHRorError are added to the + // options object via done and fail callbacks + this._trigger('always', null, options); + }, + + _onSend: function (e, data) { + if (!data.submit) { + this._addConvenienceMethods(e, data); + } + var that = this, + jqXHR, + aborted, + slot, + pipe, + options = that._getAJAXSettings(data), + send = function () { + that._sending += 1; + // Set timer for bitrate progress calculation: + options._bitrateTimer = new that._BitrateTimer(); + jqXHR = jqXHR || ( + ((aborted || that._trigger( + 'send', + $.Event('send', {delegatedEvent: e}), + options + ) === false) && + that._getXHRPromise(false, options.context, aborted)) || + that._chunkedUpload(options) || $.ajax(options) + ).done(function (result, textStatus, jqXHR) { + that._onDone(result, textStatus, jqXHR, options); + }).fail(function (jqXHR, textStatus, errorThrown) { + that._onFail(jqXHR, textStatus, errorThrown, options); + }).always(function (jqXHRorResult, textStatus, jqXHRorError) { + that._deinitProgressListener(options); + that._onAlways( + jqXHRorResult, + textStatus, + jqXHRorError, + options + ); + that._sending -= 1; + that._active -= 1; + if (options.limitConcurrentUploads && + options.limitConcurrentUploads > that._sending) { + // Start the next queued upload, + // that has not been aborted: + var nextSlot = that._slots.shift(); + while (nextSlot) { + if (that._getDeferredState(nextSlot) === 'pending') { + nextSlot.resolve(); + break; + } + nextSlot = that._slots.shift(); + } + } + if (that._active === 0) { + // The stop callback is triggered when all uploads have + // been completed, equivalent to the global ajaxStop event: + that._trigger('stop'); + } + }); + return jqXHR; + }; + this._beforeSend(e, options); + if (this.options.sequentialUploads || + (this.options.limitConcurrentUploads && + this.options.limitConcurrentUploads <= this._sending)) { + if (this.options.limitConcurrentUploads > 1) { + slot = $.Deferred(); + this._slots.push(slot); + pipe = slot.then(send); + } else { + this._sequence = this._sequence.then(send, send); + pipe = this._sequence; + } + // Return the piped Promise object, enhanced with an abort method, + // which is delegated to the jqXHR object of the current upload, + // and jqXHR callbacks mapped to the equivalent Promise methods: + pipe.abort = function () { + aborted = [undefined, 'abort', 'abort']; + if (!jqXHR) { + if (slot) { + slot.rejectWith(options.context, aborted); + } + return send(); + } + return jqXHR.abort(); + }; + return this._enhancePromise(pipe); + } + return send(); + }, + + _onAdd: function (e, data) { + var that = this, + result = true, + options = $.extend({}, this.options, data), + files = data.files, + filesLength = files.length, + limit = options.limitMultiFileUploads, + limitSize = options.limitMultiFileUploadSize, + overhead = options.limitMultiFileUploadSizeOverhead, + batchSize = 0, + paramName = this._getParamName(options), + paramNameSet, + paramNameSlice, + fileSet, + i, + j = 0; + if (!filesLength) { + return false; + } + if (limitSize && files[0].size === undefined) { + limitSize = undefined; + } + if (!(options.singleFileUploads || limit || limitSize) || + !this._isXHRUpload(options)) { + fileSet = [files]; + paramNameSet = [paramName]; + } else if (!(options.singleFileUploads || limitSize) && limit) { + fileSet = []; + paramNameSet = []; + for (i = 0; i < filesLength; i += limit) { + fileSet.push(files.slice(i, i + limit)); + paramNameSlice = paramName.slice(i, i + limit); + if (!paramNameSlice.length) { + paramNameSlice = paramName; + } + paramNameSet.push(paramNameSlice); + } + } else if (!options.singleFileUploads && limitSize) { + fileSet = []; + paramNameSet = []; + for (i = 0; i < filesLength; i = i + 1) { + batchSize += files[i].size + overhead; + if (i + 1 === filesLength || + ((batchSize + files[i + 1].size + overhead) > limitSize) || + (limit && i + 1 - j >= limit)) { + fileSet.push(files.slice(j, i + 1)); + paramNameSlice = paramName.slice(j, i + 1); + if (!paramNameSlice.length) { + paramNameSlice = paramName; + } + paramNameSet.push(paramNameSlice); + j = i + 1; + batchSize = 0; + } + } + } else { + paramNameSet = paramName; + } + data.originalFiles = files; + $.each(fileSet || files, function (index, element) { + var newData = $.extend({}, data); + newData.files = fileSet ? element : [element]; + newData.paramName = paramNameSet[index]; + that._initResponseObject(newData); + that._initProgressObject(newData); + that._addConvenienceMethods(e, newData); + result = that._trigger( + 'add', + $.Event('add', {delegatedEvent: e}), + newData + ); + return result; + }); + return result; + }, + + _replaceFileInput: function (data) { + var input = data.fileInput, + inputClone = input.clone(true), + restoreFocus = input.is(document.activeElement); + // Add a reference for the new cloned file input to the data argument: + data.fileInputClone = inputClone; + $('
    ').append(inputClone)[0].reset(); + // Detaching allows to insert the fileInput on another form + // without loosing the file input value: + input.after(inputClone).detach(); + // If the fileInput had focus before it was detached, + // restore focus to the inputClone. + if (restoreFocus) { + inputClone.focus(); + } + // Avoid memory leaks with the detached file input: + $.cleanData(input.unbind('remove')); + // Replace the original file input element in the fileInput + // elements set with the clone, which has been copied including + // event handlers: + this.options.fileInput = this.options.fileInput.map(function (i, el) { + if (el === input[0]) { + return inputClone[0]; + } + return el; + }); + // If the widget has been initialized on the file input itself, + // override this.element with the file input clone: + if (input[0] === this.element[0]) { + this.element = inputClone; + } + }, + + _handleFileTreeEntry: function (entry, path) { + var that = this, + dfd = $.Deferred(), + entries = [], + dirReader, + errorHandler = function (e) { + if (e && !e.entry) { + e.entry = entry; + } + // Since $.when returns immediately if one + // Deferred is rejected, we use resolve instead. + // This allows valid files and invalid items + // to be returned together in one set: + dfd.resolve([e]); + }, + successHandler = function (entries) { + that._handleFileTreeEntries( + entries, + path + entry.name + '/' + ).done(function (files) { + dfd.resolve(files); + }).fail(errorHandler); + }, + readEntries = function () { + dirReader.readEntries(function (results) { + if (!results.length) { + successHandler(entries); + } else { + entries = entries.concat(results); + readEntries(); + } + }, errorHandler); + }; + path = path || ''; + if (entry.isFile) { + if (entry._file) { + // Workaround for Chrome bug #149735 + entry._file.relativePath = path; + dfd.resolve(entry._file); + } else { + entry.file(function (file) { + file.relativePath = path; + dfd.resolve(file); + }, errorHandler); + } + } else if (entry.isDirectory) { + dirReader = entry.createReader(); + readEntries(); + } else { + // Return an empty list for file system items + // other than files or directories: + dfd.resolve([]); + } + return dfd.promise(); + }, + + _handleFileTreeEntries: function (entries, path) { + var that = this; + return $.when.apply( + $, + $.map(entries, function (entry) { + return that._handleFileTreeEntry(entry, path); + }) + ).then(function () { + return Array.prototype.concat.apply( + [], + arguments + ); + }); + }, + + _getDroppedFiles: function (dataTransfer) { + dataTransfer = dataTransfer || {}; + var items = dataTransfer.items; + if (items && items.length && (items[0].webkitGetAsEntry || + items[0].getAsEntry)) { + return this._handleFileTreeEntries( + $.map(items, function (item) { + var entry; + if (item.webkitGetAsEntry) { + entry = item.webkitGetAsEntry(); + if (entry) { + // Workaround for Chrome bug #149735: + entry._file = item.getAsFile(); + } + return entry; + } + return item.getAsEntry(); + }) + ); + } + return $.Deferred().resolve( + $.makeArray(dataTransfer.files) + ).promise(); + }, + + _getSingleFileInputFiles: function (fileInput) { + fileInput = $(fileInput); + var entries = fileInput.prop('webkitEntries') || + fileInput.prop('entries'), + files, + value; + if (entries && entries.length) { + return this._handleFileTreeEntries(entries); + } + files = $.makeArray(fileInput.prop('files')); + if (!files.length) { + value = fileInput.prop('value'); + if (!value) { + return $.Deferred().resolve([]).promise(); + } + // If the files property is not available, the browser does not + // support the File API and we add a pseudo File object with + // the input value as name with path information removed: + files = [{name: value.replace(/^.*\\/, '')}]; + } else if (files[0].name === undefined && files[0].fileName) { + // File normalization for Safari 4 and Firefox 3: + $.each(files, function (index, file) { + file.name = file.fileName; + file.size = file.fileSize; + }); + } + return $.Deferred().resolve(files).promise(); + }, + + _getFileInputFiles: function (fileInput) { + if (!(fileInput instanceof $) || fileInput.length === 1) { + return this._getSingleFileInputFiles(fileInput); + } + return $.when.apply( + $, + $.map(fileInput, this._getSingleFileInputFiles) + ).then(function () { + return Array.prototype.concat.apply( + [], + arguments + ); + }); + }, + + _onChange: function (e) { + var that = this, + data = { + fileInput: $(e.target), + form: $(e.target.form) + }; + this._getFileInputFiles(data.fileInput).always(function (files) { + data.files = files; + if (that.options.replaceFileInput) { + that._replaceFileInput(data); + } + if (that._trigger( + 'change', + $.Event('change', {delegatedEvent: e}), + data + ) !== false) { + that._onAdd(e, data); + } + }); + }, + + _onPaste: function (e) { + var items = e.originalEvent && e.originalEvent.clipboardData && + e.originalEvent.clipboardData.items, + data = {files: []}; + if (items && items.length) { + $.each(items, function (index, item) { + var file = item.getAsFile && item.getAsFile(); + if (file) { + data.files.push(file); + } + }); + if (this._trigger( + 'paste', + $.Event('paste', {delegatedEvent: e}), + data + ) !== false) { + this._onAdd(e, data); + } + } + }, + + _onDrop: function (e) { + e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer; + var that = this, + dataTransfer = e.dataTransfer, + data = {}; + if (dataTransfer && dataTransfer.files && dataTransfer.files.length) { + e.preventDefault(); + this._getDroppedFiles(dataTransfer).always(function (files) { + data.files = files; + if (that._trigger( + 'drop', + $.Event('drop', {delegatedEvent: e}), + data + ) !== false) { + that._onAdd(e, data); + } + }); + } + }, + + _onDragOver: getDragHandler('dragover'), + + _onDragEnter: getDragHandler('dragenter'), + + _onDragLeave: getDragHandler('dragleave'), + + _initEventHandlers: function () { + if (this._isXHRUpload(this.options)) { + this._on(this.options.dropZone, { + dragover: this._onDragOver, + drop: this._onDrop, + // event.preventDefault() on dragenter is required for IE10+: + dragenter: this._onDragEnter, + // dragleave is not required, but added for completeness: + dragleave: this._onDragLeave + }); + this._on(this.options.pasteZone, { + paste: this._onPaste + }); + } + if ($.support.fileInput) { + this._on(this.options.fileInput, { + change: this._onChange + }); + } + }, + + _destroyEventHandlers: function () { + this._off(this.options.dropZone, 'dragenter dragleave dragover drop'); + this._off(this.options.pasteZone, 'paste'); + this._off(this.options.fileInput, 'change'); + }, + + _destroy: function () { + this._destroyEventHandlers(); + }, + + _setOption: function (key, value) { + var reinit = $.inArray(key, this._specialOptions) !== -1; + if (reinit) { + this._destroyEventHandlers(); + } + this._super(key, value); + if (reinit) { + this._initSpecialOptions(); + this._initEventHandlers(); + } + }, + + _initSpecialOptions: function () { + var options = this.options; + if (options.fileInput === undefined) { + options.fileInput = this.element.is('input[type="file"]') ? + this.element : this.element.find('input[type="file"]'); + } else if (!(options.fileInput instanceof $)) { + options.fileInput = $(options.fileInput); + } + if (!(options.dropZone instanceof $)) { + options.dropZone = $(options.dropZone); + } + if (!(options.pasteZone instanceof $)) { + options.pasteZone = $(options.pasteZone); + } + }, + + _getRegExp: function (str) { + var parts = str.split('/'), + modifiers = parts.pop(); + parts.shift(); + return new RegExp(parts.join('/'), modifiers); + }, + + _isRegExpOption: function (key, value) { + return key !== 'url' && $.type(value) === 'string' && + /^\/.*\/[igm]{0,3}$/.test(value); + }, + + _initDataAttributes: function () { + var that = this, + options = this.options, + data = this.element.data(); + // Initialize options set via HTML5 data-attributes: + $.each( + this.element[0].attributes, + function (index, attr) { + var key = attr.name.toLowerCase(), + value; + if (/^data-/.test(key)) { + // Convert hyphen-ated key to camelCase: + key = key.slice(5).replace(/-[a-z]/g, function (str) { + return str.charAt(1).toUpperCase(); + }); + value = data[key]; + if (that._isRegExpOption(key, value)) { + value = that._getRegExp(value); + } + options[key] = value; + } + } + ); + }, + + _create: function () { + this._initDataAttributes(); + this._initSpecialOptions(); + this._slots = []; + this._sequence = this._getXHRPromise(true); + this._sending = this._active = 0; + this._initProgressObject(this); + this._initEventHandlers(); + }, + + // This method is exposed to the widget API and allows to query + // the number of active uploads: + active: function () { + return this._active; + }, + + // This method is exposed to the widget API and allows to query + // the widget upload progress. + // It returns an object with loaded, total and bitrate properties + // for the running uploads: + progress: function () { + return this._progress; + }, + + // This method is exposed to the widget API and allows adding files + // using the fileupload API. The data parameter accepts an object which + // must have a files property and can contain additional options: + // .fileupload('add', {files: filesList}); + add: function (data) { + var that = this; + if (!data || this.options.disabled) { + return; + } + if (data.fileInput && !data.files) { + this._getFileInputFiles(data.fileInput).always(function (files) { + data.files = files; + that._onAdd(null, data); + }); + } else { + data.files = $.makeArray(data.files); + this._onAdd(null, data); + } + }, + + // This method is exposed to the widget API and allows sending files + // using the fileupload API. The data parameter accepts an object which + // must have a files or fileInput property and can contain additional options: + // .fileupload('send', {files: filesList}); + // The method returns a Promise object for the file upload call. + send: function (data) { + if (data && !this.options.disabled) { + if (data.fileInput && !data.files) { + var that = this, + dfd = $.Deferred(), + promise = dfd.promise(), + jqXHR, + aborted; + promise.abort = function () { + aborted = true; + if (jqXHR) { + return jqXHR.abort(); + } + dfd.reject(null, 'abort', 'abort'); + return promise; + }; + this._getFileInputFiles(data.fileInput).always( + function (files) { + if (aborted) { + return; + } + if (!files.length) { + dfd.reject(); + return; + } + data.files = files; + jqXHR = that._onSend(null, data); + jqXHR.then( + function (result, textStatus, jqXHR) { + dfd.resolve(result, textStatus, jqXHR); + }, + function (jqXHR, textStatus, errorThrown) { + dfd.reject(jqXHR, textStatus, errorThrown); + } + ); + } + ); + return this._enhancePromise(promise); + } + data.files = $.makeArray(data.files); + if (data.files.length) { + return this._onSend(null, data); + } + } + return this._getXHRPromise(false, data && data.context); + } + + }); + +})); diff --git a/libraries/filemanager-9.14.1/js/jquery.iframe-transport.js b/libraries/filemanager-9.14.1/js/jquery.iframe-transport.js new file mode 100644 index 0000000..8d25c46 --- /dev/null +++ b/libraries/filemanager-9.14.1/js/jquery.iframe-transport.js @@ -0,0 +1,224 @@ +/* + * jQuery Iframe Transport Plugin + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2011, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * https://opensource.org/licenses/MIT + */ + +/* global define, require, window, document, JSON */ + +;(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define(['jquery'], factory); + } else if (typeof exports === 'object') { + // Node/CommonJS: + factory(require('jquery')); + } else { + // Browser globals: + factory(window.jQuery); + } +}(function ($) { + 'use strict'; + + // Helper variable to create unique names for the transport iframes: + var counter = 0, + jsonAPI = $, + jsonParse = 'parseJSON'; + + if ('JSON' in window && 'parse' in JSON) { + jsonAPI = JSON; + jsonParse = 'parse'; + } + + // The iframe transport accepts four additional options: + // options.fileInput: a jQuery collection of file input fields + // options.paramName: the parameter name for the file form data, + // overrides the name property of the file input field(s), + // can be a string or an array of strings. + // options.formData: an array of objects with name and value properties, + // equivalent to the return data of .serializeArray(), e.g.: + // [{name: 'a', value: 1}, {name: 'b', value: 2}] + // options.initialIframeSrc: the URL of the initial iframe src, + // by default set to "javascript:false;" + $.ajaxTransport('iframe', function (options) { + if (options.async) { + // javascript:false as initial iframe src + // prevents warning popups on HTTPS in IE6: + /*jshint scripturl: true */ + var initialIframeSrc = options.initialIframeSrc || 'javascript:false;', + /*jshint scripturl: false */ + form, + iframe, + addParamChar; + return { + send: function (_, completeCallback) { + form = $('
    '); + form.attr('accept-charset', options.formAcceptCharset); + addParamChar = /\?/.test(options.url) ? '&' : '?'; + // XDomainRequest only supports GET and POST: + if (options.type === 'DELETE') { + options.url = options.url + addParamChar + '_method=DELETE'; + options.type = 'POST'; + } else if (options.type === 'PUT') { + options.url = options.url + addParamChar + '_method=PUT'; + options.type = 'POST'; + } else if (options.type === 'PATCH') { + options.url = options.url + addParamChar + '_method=PATCH'; + options.type = 'POST'; + } + // IE versions below IE8 cannot set the name property of + // elements that have already been added to the DOM, + // so we set the name along with the iframe HTML markup: + counter += 1; + iframe = $( + '' + ).bind('load', function () { + var fileInputClones, + paramNames = $.isArray(options.paramName) ? + options.paramName : [options.paramName]; + iframe + .unbind('load') + .bind('load', function () { + var response; + // Wrap in a try/catch block to catch exceptions thrown + // when trying to access cross-domain iframe contents: + try { + response = iframe.contents(); + // Google Chrome and Firefox do not throw an + // exception when calling iframe.contents() on + // cross-domain requests, so we unify the response: + if (!response.length || !response[0].firstChild) { + throw new Error(); + } + } catch (e) { + response = undefined; + } + // The complete callback returns the + // iframe content document as response object: + completeCallback( + 200, + 'success', + {'iframe': response} + ); + // Fix for IE endless progress bar activity bug + // (happens on form submits to iframe targets): + $('') + .appendTo(form); + window.setTimeout(function () { + // Removing the form in a setTimeout call + // allows Chrome's developer tools to display + // the response result + form.remove(); + }, 0); + }); + form + .prop('target', iframe.prop('name')) + .prop('action', options.url) + .prop('method', options.type); + if (options.formData) { + $.each(options.formData, function (index, field) { + $('') + .prop('name', field.name) + .val(field.value) + .appendTo(form); + }); + } + if (options.fileInput && options.fileInput.length && + options.type === 'POST') { + fileInputClones = options.fileInput.clone(); + // Insert a clone for each file input field: + options.fileInput.after(function (index) { + return fileInputClones[index]; + }); + if (options.paramName) { + options.fileInput.each(function (index) { + $(this).prop( + 'name', + paramNames[index] || options.paramName + ); + }); + } + // Appending the file input fields to the hidden form + // removes them from their original location: + form + .append(options.fileInput) + .prop('enctype', 'multipart/form-data') + // enctype must be set as encoding for IE: + .prop('encoding', 'multipart/form-data'); + // Remove the HTML5 form attribute from the input(s): + options.fileInput.removeAttr('form'); + } + form.submit(); + // Insert the file input fields at their original location + // by replacing the clones with the originals: + if (fileInputClones && fileInputClones.length) { + options.fileInput.each(function (index, input) { + var clone = $(fileInputClones[index]); + // Restore the original name and form properties: + $(input) + .prop('name', clone.prop('name')) + .attr('form', clone.attr('form')); + clone.replaceWith(input); + }); + } + }); + form.append(iframe).appendTo(document.body); + }, + abort: function () { + if (iframe) { + // javascript:false as iframe src aborts the request + // and prevents warning popups on HTTPS in IE6. + // concat is used to avoid the "Script URL" JSLint error: + iframe + .unbind('load') + .prop('src', initialIframeSrc); + } + if (form) { + form.remove(); + } + } + }; + } + }); + + // The iframe transport returns the iframe content document as response. + // The following adds converters from iframe to text, json, html, xml + // and script. + // Please note that the Content-Type for JSON responses has to be text/plain + // or text/html, if the browser doesn't include application/json in the + // Accept header, else IE will show a download dialog. + // The Content-Type for XML responses on the other hand has to be always + // application/xml or text/xml, so IE properly parses the XML response. + // See also + // https://github.com/blueimp/jQuery-File-Upload/wiki/Setup#content-type-negotiation + $.ajaxSetup({ + converters: { + 'iframe text': function (iframe) { + return iframe && $(iframe[0].body).text(); + }, + 'iframe json': function (iframe) { + return iframe && jsonAPI[jsonParse]($(iframe[0].body).text()); + }, + 'iframe html': function (iframe) { + return iframe && $(iframe[0].body).html(); + }, + 'iframe xml': function (iframe) { + var xmlDoc = iframe && iframe[0]; + return xmlDoc && $.isXMLDoc(xmlDoc) ? xmlDoc : + $.parseXML((xmlDoc.XMLDocument && xmlDoc.XMLDocument.xml) || + $(xmlDoc.body).html()); + }, + 'iframe script': function (iframe) { + return iframe && $.globalEval($(iframe[0].body).text()); + } + } + }); + +})); diff --git a/libraries/filemanager-9.14.1/js/modernizr.custom.js b/libraries/filemanager-9.14.1/js/modernizr.custom.js new file mode 100644 index 0000000..2ec5cd3 --- /dev/null +++ b/libraries/filemanager-9.14.1/js/modernizr.custom.js @@ -0,0 +1,4 @@ +/* Modernizr 2.7.1 (Custom Build) | MIT & BSD + * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-flexboxlegacy-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-shiv-cssclasses-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load + */ +;window.Modernizr=function(a,b,c){function B(a){j.cssText=a}function C(a,b){return B(n.join(a+";")+(b||""))}function D(a,b){return typeof a===b}function E(a,b){return!!~(""+a).indexOf(b)}function F(a,b){for(var d in a){var e=a[d];if(!E(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function G(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:D(f,"function")?f.bind(d||b):f}return!1}function H(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return D(b,"string")||D(b,"undefined")?F(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),G(e,b,c))}function I(){e.input=function(c){for(var d=0,e=c.length;d',a,""].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},y=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=D(e[d],"function"),D(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),z={}.hasOwnProperty,A;!D(z,"undefined")&&!D(z.call,"undefined")?A=function(a,b){return z.call(a,b)}:A=function(a,b){return b in a&&D(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=v.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(v.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(v.call(arguments)))};return e}),r.flexbox=function(){return H("flexWrap")},r.flexboxlegacy=function(){return H("boxDirection")},r.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},r.canvastext=function(){return!!e.canvas&&!!D(b.createElement("canvas").getContext("2d").fillText,"function")},r.postmessage=function(){return!!a.postMessage},r.websqldatabase=function(){return!!a.openDatabase},r.indexedDB=function(){return!!H("indexedDB",a)},r.hashchange=function(){return y("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},r.history=function(){return!!a.history&&!!history.pushState},r.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},r.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},r.rgba=function(){return B("background-color:rgba(150,255,150,.5)"),E(j.backgroundColor,"rgba")},r.hsla=function(){return B("background-color:hsla(120,40%,100%,.5)"),E(j.backgroundColor,"rgba")||E(j.backgroundColor,"hsla")},r.multiplebgs=function(){return B("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},r.backgroundsize=function(){return H("backgroundSize")},r.borderimage=function(){return H("borderImage")},r.borderradius=function(){return H("borderRadius")},r.boxshadow=function(){return H("boxShadow")},r.textshadow=function(){return b.createElement("div").style.textShadow===""},r.opacity=function(){return C("opacity:.55"),/^0.55$/.test(j.opacity)},r.cssanimations=function(){return H("animationName")},r.csscolumns=function(){return H("columnCount")},r.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return B((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),E(j.backgroundImage,"gradient")},r.cssreflections=function(){return H("boxReflect")},r.csstransforms=function(){return!!H("transform")},r.csstransforms3d=function(){var a=!!H("perspective");return a&&"webkitPerspective"in g.style&&x("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},r.csstransitions=function(){return H("transition")},r.fontface=function(){var a;return x('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},r.generatedcontent=function(){var a;return x(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},r.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},r.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},r.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},r.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},r.webworkers=function(){return!!a.Worker},r.applicationcache=function(){return!!a.applicationCache};for(var J in r)A(r,J)&&(w=J.toLowerCase(),e[w]=r[J](),u.push((e[w]?"":"no-")+w));return e.input||I(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)A(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},B(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.hasEvent=y,e.testProp=function(a){return F([a])},e.testAllProps=H,e.testStyles=x,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+u.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f=n-r?"bottom":null!=s&&o<=s&&"top"),this.affixed!==t&&(this.affixed=t,this.unpin="bottom"==t?i.top-o:null,this.$element.removeClass(c).addClass("affix"+(t?"-"+t:"")))}};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var o=e(this),i=o.data("affix"),a="object"==typeof n&&n;i||o.data("affix",i=new t(this,a)),"string"==typeof n&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery),!function(e){"use strict";function t(){e(".dropdown-backdrop").remove(),e(o).each(function(){n(e(this)).removeClass("open")})}function n(t){var n,o=t.attr("data-target");return o||(o=t.attr("href"),o=o&&/#/.test(o)&&o.replace(/.*(?=#[^\s]*$)/,"")),n=o&&e(o),n&&n.length||(n=t.parent()),n}var o="[data-toggle=dropdown]",i=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};i.prototype={constructor:i,toggle:function(o){var i,a,r=e(this);if(!r.is(".disabled, :disabled"))return i=n(r),a=i.hasClass("open"),t(),a||("ontouchstart"in document.documentElement&&e('