Imported Upstream version 3.4.0
This commit is contained in:
64
functions/Autoloader.php
Normal file
64
functions/Autoloader.php
Normal file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// NagiosQL
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (c) 2005-2018 by Martin Willisegger
|
||||
//
|
||||
// Project : NagiosQL
|
||||
// Component : Autoloader Class
|
||||
// Website : https://sourceforge.net/projects/nagiosql/
|
||||
// Version : 3.4.0
|
||||
// GIT Repo : https://gitlab.com/wizonet/NagiosQL
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
namespace functions;
|
||||
|
||||
class Autoloader
|
||||
{
|
||||
// Define class variables
|
||||
public $preBasePath = DIRECTORY_SEPARATOR;
|
||||
|
||||
/**
|
||||
* Autoloader constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
spl_autoload_register(array($this, 'loadClass'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $strBasePath Base path of project
|
||||
*/
|
||||
public static function register($strBasePath)
|
||||
{
|
||||
$object = new Autoloader();
|
||||
$object->preBasePath = $strBasePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load class from path
|
||||
* @param string $strClassName Class name
|
||||
*/
|
||||
public function loadClass($strClassName)
|
||||
{
|
||||
$className = ltrim($strClassName, '\\');
|
||||
$fileName = '';
|
||||
$lastNsPos = strrpos($className, '\\');
|
||||
if ($lastNsPos != 0) {
|
||||
$namespace = substr($className, 0, $lastNsPos);
|
||||
$className = substr($className, $lastNsPos + 1);
|
||||
$fileName = str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
|
||||
}
|
||||
$fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
|
||||
$strFilePath1 = $this->preBasePath.$fileName;
|
||||
$strFilePath2 = $this->preBasePath.'install/'.$fileName;
|
||||
if (file_exists($strFilePath1) && is_readable($strFilePath1)) {
|
||||
require_once $strFilePath1;
|
||||
}
|
||||
if (file_exists($strFilePath2) && is_readable($strFilePath2)) {
|
||||
require_once $strFilePath2;
|
||||
}
|
||||
}
|
||||
}
|
||||
412
functions/MysqliDbClass.php
Normal file
412
functions/MysqliDbClass.php
Normal file
@@ -0,0 +1,412 @@
|
||||
<?php
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Common utilities
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (c) 2005-2018 by Martin Willisegger
|
||||
//
|
||||
// Project : Common scripts
|
||||
// Component : MySQLi data processing class
|
||||
// Website : https://sourceforge.net/projects/nagiosql/
|
||||
// Version : 3.4.0
|
||||
// GIT Repo : https://gitlab.com/wizonet/NagiosQL
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Class: Common database functions for MySQL (mysqli database module)
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Includes any functions to communicate with an MySQL database server
|
||||
//
|
||||
// Name: MysqliDbClass
|
||||
//
|
||||
// Class variables: $arrParams Array including the server settings
|
||||
// ---------------- $strErrorMessage Database error string
|
||||
// $error Boolean - Error true/false
|
||||
// $strDBId Database connection id
|
||||
// $intLastId ID of last dataset
|
||||
// $intAffectedRows Counter variable of all affected data dows
|
||||
// $booSSLuse Use SSL connection
|
||||
//
|
||||
// Parameters: $arrParams['server'] -> DB server name
|
||||
// ----------- $arrParams['port'] -> DB server port
|
||||
// $arrParams['user'] -> DB server username
|
||||
// $arrParams['password'] -> DB server password
|
||||
// $arrParams['database'] -> DB server database name
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
namespace functions;
|
||||
|
||||
class MysqliDbClass
|
||||
{
|
||||
// Define class variables
|
||||
public $error = false; // Will be filled in functions
|
||||
public $strDBId; // Will be filled in functions
|
||||
public $intLastId = 0; // Will be filled in functions
|
||||
public $intAffectedRows = 0; // Will be filled in functions
|
||||
public $strErrorMessage = ''; // Will be filled in functions
|
||||
public $booSSLuse = false; // Defines if SSL is used or not
|
||||
public $arrParams = array(); // Must be filled in while initialization
|
||||
|
||||
/**
|
||||
* MysqliDbClass constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->arrParams['server'] = '';
|
||||
$this->arrParams['port'] = 0;
|
||||
$this->arrParams['username'] = '';
|
||||
$this->arrParams['password'] = '';
|
||||
$this->arrParams['database'] = '';
|
||||
}
|
||||
|
||||
/**
|
||||
* MysqliDbClass destructor.
|
||||
*/
|
||||
public function __destruct()
|
||||
{
|
||||
$this->dbDisconnect();
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens a connection to the database server and select a database
|
||||
* @param int $intMode 1 = connect only / 0 = connect + dbselect
|
||||
* @return bool true = successful / false = error
|
||||
* Status messages are stored in class variable
|
||||
*/
|
||||
public function hasDBConnection($intMode = 0)
|
||||
{
|
||||
$booReturn = true;
|
||||
$this->dbconnect();
|
||||
if ($this->error == true) {
|
||||
$booReturn = false;
|
||||
}
|
||||
if (($booReturn == true) && ($intMode == 0)) {
|
||||
$this->dbselect();
|
||||
if ($this->error == true) {
|
||||
$booReturn = false;
|
||||
}
|
||||
}
|
||||
return $booReturn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends an SQL statement to the server and returns the result of the first data field
|
||||
* @param string $strSQL SQL Statement
|
||||
* @return string <data> = successful / <empty> = error
|
||||
* Status messages are stored in class variable
|
||||
*/
|
||||
public function getFieldData($strSQL)
|
||||
{
|
||||
// Reset error variables
|
||||
$this->strErrorMessage = '';
|
||||
$this->error = false;
|
||||
$strReturn = '';
|
||||
// Send the SQL statement to the server
|
||||
$resQuery = mysqli_query($this->strDBId, $strSQL);
|
||||
// Error processing
|
||||
if ($resQuery && (mysqli_num_rows($resQuery) != 0) && (mysqli_error($this->strDBId) == '')) {
|
||||
// Return the field value from position 0/0
|
||||
$arrDataset = mysqli_fetch_array($resQuery, MYSQLI_NUM);
|
||||
$strReturn = $arrDataset[0];
|
||||
} elseif (mysqli_error($this->strDBId) != '') {
|
||||
$this->strErrorMessage .= mysqli_error($this->strDBId). '::';
|
||||
$this->error = true;
|
||||
}
|
||||
return $strReturn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends an SQL statement to the server and returns the result of the first data set
|
||||
* @param string $strSQL SQL Statement
|
||||
* @param array|null $arrDataset Result array (by reference)
|
||||
* @return bool true = successful / false = error
|
||||
* Status messages are stored in class variable
|
||||
*/
|
||||
public function hasSingleDataset($strSQL, &$arrDataset)
|
||||
{
|
||||
//$arrDataset = array();
|
||||
$booReturn = true;
|
||||
// Reset error variables
|
||||
$this->strErrorMessage = '';
|
||||
$this->error = false;
|
||||
// Send the SQL statement to the server
|
||||
$resQuery = mysqli_query($this->strDBId, $strSQL);
|
||||
// Error processing
|
||||
if ($resQuery && (mysqli_num_rows($resQuery) != 0) && (mysqli_error($this->strDBId) == '')) {
|
||||
// Put the values into the array
|
||||
$arrDataset = mysqli_fetch_array($resQuery, MYSQLI_ASSOC);
|
||||
} elseif (mysqli_error($this->strDBId) != '') {
|
||||
$this->strErrorMessage .= mysqli_error($this->strDBId). '::';
|
||||
$this->error = true;
|
||||
$booReturn = false;
|
||||
}
|
||||
return $booReturn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends an SQL statement to the server and returns the result of all dataset in a data array
|
||||
* @param string $strSQL SQL Statement
|
||||
* @param array $arrDataset Result array (by reference)
|
||||
* @param int $intDataCount Number of data result sets
|
||||
* @return bool true = successful / false = error
|
||||
* Status messages are stored in class variable
|
||||
*/
|
||||
public function hasDataArray($strSQL, &$arrDataset, &$intDataCount)
|
||||
{
|
||||
$arrDataset = array();
|
||||
$intDataCount = 0;
|
||||
$booReturn = true;
|
||||
// Reset error variables
|
||||
$this->strErrorMessage = '';
|
||||
$this->error = false;
|
||||
// Send the SQL statement to the server
|
||||
$resQuery = mysqli_query($this->strDBId, $strSQL);
|
||||
// Error processing
|
||||
if ($resQuery && (mysqli_num_rows($resQuery) != 0) && (mysqli_error($this->strDBId) == '')) {
|
||||
$intDataCount = mysqli_num_rows($resQuery);
|
||||
$intCount = 0;
|
||||
// Put the values into the array
|
||||
while ($arrDataTemp = mysqli_fetch_array($resQuery, MYSQLI_ASSOC)) {
|
||||
foreach ($arrDataTemp as $key => $value) {
|
||||
$arrDataset[$intCount][$key] = $value;
|
||||
}
|
||||
$intCount++;
|
||||
}
|
||||
} elseif (mysqli_error($this->strDBId) != '') {
|
||||
$this->strErrorMessage .= mysqli_error($this->strDBId). '::';
|
||||
$this->error = true;
|
||||
$booReturn = false;
|
||||
}
|
||||
return $booReturn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert/update or delete data
|
||||
* @param string $strSQL SQL Statement
|
||||
* @return bool true = successful / false = error
|
||||
* Status messages are stored in class variable
|
||||
*/
|
||||
public function insertData($strSQL)
|
||||
{
|
||||
// Reset error variables
|
||||
$this->strErrorMessage = '';
|
||||
$this->error = false;
|
||||
$booReturn = false;
|
||||
// Send the SQL statement to the server
|
||||
if ($strSQL != '') {
|
||||
mysqli_query($this->strDBId, $strSQL);
|
||||
// Error processing
|
||||
if (mysqli_error($this->strDBId) == '') {
|
||||
$this->intLastId = mysqli_insert_id($this->strDBId);
|
||||
$this->intAffectedRows = mysqli_affected_rows($this->strDBId);
|
||||
$booReturn = true;
|
||||
} else {
|
||||
$this->strErrorMessage .= mysqli_error($this->strDBId) . '::';
|
||||
$this->error = true;
|
||||
}
|
||||
}
|
||||
return $booReturn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Count the sum of data records
|
||||
* @param string $strSQL SQL Statement
|
||||
* @return int <number> = successful / 0 = no dataset or error
|
||||
* Status messages are stored in class variable
|
||||
*/
|
||||
public function countRows($strSQL)
|
||||
{
|
||||
// Reset error variables
|
||||
$this->strErrorMessage = '';
|
||||
$this->error = false;
|
||||
$intReturn = 0;
|
||||
// Send the SQL statement to the server
|
||||
$resQuery = mysqli_query($this->strDBId, $strSQL);
|
||||
// Error processing
|
||||
if ($resQuery && (mysqli_error($this->strDBId) == '')) {
|
||||
$intReturn = mysqli_num_rows($resQuery);
|
||||
} else {
|
||||
$this->strErrorMessage .= mysqli_error($this->strDBId);
|
||||
$this->error = true;
|
||||
}
|
||||
return $intReturn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a safe insert string for database manipulations
|
||||
* @param string $strInput Input String
|
||||
* @return string Output String
|
||||
*/
|
||||
public function realEscape($strInput)
|
||||
{
|
||||
return mysqli_real_escape_string($this->strDBId, $strInput);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize a mysql database connection
|
||||
* @return bool true = successful / false = error
|
||||
*/
|
||||
private function dbinit()
|
||||
{
|
||||
$this->strDBId = mysqli_init();
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Connect to database server
|
||||
* @param string $dbserver Server name
|
||||
* @param int $dbport TCP port
|
||||
* @param string $dbuser Database user
|
||||
* @param string $dbpasswd Database password
|
||||
* @return bool true = successful / false = error
|
||||
* Status messages are stored in class variable
|
||||
*/
|
||||
private function dbconnect($dbserver = null, $dbport = null, $dbuser = null, $dbpasswd = null)
|
||||
{
|
||||
// Reset error variables
|
||||
$this->strErrorMessage = '';
|
||||
$this->error = false;
|
||||
$booReturn = true;
|
||||
// Get parameters
|
||||
if ($dbserver == null) {
|
||||
$dbserver = $this->arrParams['server'];
|
||||
}
|
||||
if ($dbport == null) {
|
||||
$dbport = $this->arrParams['port'];
|
||||
}
|
||||
if ($dbuser == null) {
|
||||
$dbuser = $this->arrParams['username'];
|
||||
}
|
||||
if ($dbpasswd == null) {
|
||||
$dbpasswd = $this->arrParams['password'];
|
||||
}
|
||||
// Not all parameters available
|
||||
if (($dbserver == '') || ($dbuser == '') || ($dbpasswd == '')) {
|
||||
$this->strErrorMessage .= gettext('Missing server connection parameter!'). '::';
|
||||
$this->error = true;
|
||||
$booReturn = false;
|
||||
}
|
||||
if ($booReturn == true) {
|
||||
$this->dbinit();
|
||||
//if ($this->booSSLuse == true) {
|
||||
// TO BE DEFINED
|
||||
//}
|
||||
$intErrorReporting = error_reporting();
|
||||
error_reporting(0);
|
||||
if ($dbport == 0) {
|
||||
$booReturn = mysqli_real_connect($this->strDBId, $dbserver, $dbuser, $dbpasswd);
|
||||
} else {
|
||||
$booReturn = mysqli_real_connect($this->strDBId, $dbserver, $dbuser, $dbpasswd, null, $dbport);
|
||||
}
|
||||
error_reporting($intErrorReporting);
|
||||
// Connection fails
|
||||
if ($booReturn == false) {
|
||||
$this->strErrorMessage = '[' .$dbserver. '] ' .gettext('Connection to the database server has failed '
|
||||
. 'by reason:'). ' ::';
|
||||
$strError = mysqli_connect_error();
|
||||
$this->strErrorMessage .= $strError. '::';
|
||||
$this->error = true;
|
||||
}
|
||||
}
|
||||
return $booReturn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Select a database
|
||||
* @param string $database Database name
|
||||
* @return bool true = successful / false = error
|
||||
* Status messages are stored in class variable
|
||||
*/
|
||||
private function dbselect($database = null)
|
||||
{
|
||||
// Reset error variables
|
||||
$this->strErrorMessage = '';
|
||||
$this->error = false;
|
||||
$booReturn = true;
|
||||
// Get parameters
|
||||
if ($database == null) {
|
||||
$database = $this->arrParams['database'];
|
||||
}
|
||||
// Not all parameters available
|
||||
if ($database == '') {
|
||||
$this->strErrorMessage .= gettext('Missing database connection parameter!'). '::';
|
||||
$this->error = true;
|
||||
$booReturn = false;
|
||||
}
|
||||
if ($booReturn == true) {
|
||||
$bolConnect = mysqli_select_db($this->strDBId, $database);
|
||||
// Session cannot be etablished
|
||||
if (!$bolConnect) {
|
||||
$this->strErrorMessage .= '[' .$database. '] ' .
|
||||
gettext('Connection to the database has failed by reason:'). ' ::';
|
||||
$this->strErrorMessage .= mysqli_error($this->strDBId). '::';
|
||||
$this->error = true;
|
||||
$booReturn = false;
|
||||
}
|
||||
}
|
||||
if ($booReturn == true) {
|
||||
mysqli_query($this->strDBId, "set names 'utf8'");
|
||||
if (mysqli_error($this->strDBId) != '') {
|
||||
$this->strErrorMessage .= mysqli_error($this->strDBId). '::';
|
||||
$this->error = true;
|
||||
$booReturn = false;
|
||||
}
|
||||
}
|
||||
if ($booReturn == true) {
|
||||
mysqli_query($this->strDBId, "set session sql_mode = 'NO_ENGINE_SUBSTITUTION'");
|
||||
if (mysqli_error($this->strDBId) != '') {
|
||||
$this->strErrorMessage .= mysqli_error($this->strDBId). '::';
|
||||
$this->error = true;
|
||||
$booReturn = false;
|
||||
}
|
||||
}
|
||||
return $booReturn;
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Set SSL connection parameters
|
||||
* @param string $sslkey SSL key
|
||||
* @param string $sslcert SSL certificate
|
||||
* @param string $sslca SSL CA file (optional)
|
||||
* @param string $sslpath SSL certificate path (optional)
|
||||
* @param string $sslcypher SSL cypher (optional)
|
||||
* @return bool true = successful
|
||||
* Status messages are stored in class variable
|
||||
*/
|
||||
/*
|
||||
private function dbsetssl($sslkey, $sslcert, $sslca = null, $sslpath = null, $sslcypher = null)
|
||||
{
|
||||
// Reset error variables
|
||||
$this->strErrorMessage = "";
|
||||
$this->error = false;
|
||||
$booReturn = true;
|
||||
// Values are missing
|
||||
if (($sslkey == "") || ($sslcert == "")) {
|
||||
$this->strErrorMessage = gettext("Missing MySQL SSL parameter!")."::";
|
||||
$this->error = true;
|
||||
$booReturn = false;
|
||||
}
|
||||
if ($booReturn == true) {
|
||||
mysqli_ssl_set($this->strDBId, $sslkey, $sslcert, $sslca, $sslpath, $sslcypher);
|
||||
}
|
||||
return($booReturn);
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Close database server connectuon
|
||||
* @return bool true = successful / false = error
|
||||
*/
|
||||
private function dbDisconnect()
|
||||
{
|
||||
mysqli_close($this->strDBId);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
2448
functions/NagConfigClass.php
Normal file
2448
functions/NagConfigClass.php
Normal file
File diff suppressed because it is too large
Load Diff
645
functions/NagContentClass.php
Normal file
645
functions/NagContentClass.php
Normal file
@@ -0,0 +1,645 @@
|
||||
<?php
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// NagiosQL
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (c) 2005-2018 by Martin Willisegger
|
||||
//
|
||||
// Project : NagiosQL
|
||||
// Component : Content Class
|
||||
// Website : https://sourceforge.net/projects/nagiosql/
|
||||
// Version : 3.4.0
|
||||
// GIT Repo : https://gitlab.com/wizonet/NagiosQL
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Class: Common content functions
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Includes all functions used to display the application data
|
||||
//
|
||||
// Name: nagcontent
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
namespace functions;
|
||||
|
||||
class NagContentClass
|
||||
{
|
||||
// Define class variables
|
||||
private $arrSettings = array(); // Array includes all global settings
|
||||
//
|
||||
public $arrSession = array(); // Session content
|
||||
public $arrDescription = array(); // Text values from fieldvars.php
|
||||
public $intLimit = 15; // Data limit value
|
||||
public $intDomainId = 0; // Configuration domain ID
|
||||
public $intSortBy = -1; // Sort by field id
|
||||
public $intGlobalWriteAccess = -1; // Global write access id
|
||||
public $intVersion = 0; // Nagios version id
|
||||
public $intGroupAdm = 0; // Group admin enabled/disabled
|
||||
public $intWriteAccessId = 0; // Write access id
|
||||
public $strTableName = ''; // Data table name
|
||||
public $strSearchSession = ''; // Search session name
|
||||
public $strErrorMessage = ''; // String including error messages
|
||||
public $strSortDir = 'ASC'; // SQL sort direction (ASC/DESC)
|
||||
public $strBrowser = ''; // Browser string
|
||||
|
||||
// Class includes
|
||||
/** @var MysqliDbClass */
|
||||
public $myDBClass; // Database class reference
|
||||
/** @var NagConfigClass */
|
||||
public $myConfigClass; // NagiosQL configuration class object
|
||||
/** @var NagVisualClass */
|
||||
public $myVisClass; // NagiosQL visual class object
|
||||
|
||||
/**
|
||||
* NagContentClass constructor.
|
||||
* @param array $arrSession PHP Session array
|
||||
*/
|
||||
public function __construct($arrSession)
|
||||
{
|
||||
if (isset($arrSession['SETS'])) {
|
||||
// Read global settings
|
||||
$this->arrSettings = $arrSession['SETS'];
|
||||
}
|
||||
if (isset($arrSession['domain'])) {
|
||||
$this->intDomainId = $arrSession['domain'];
|
||||
}
|
||||
$this->arrSession = $arrSession;
|
||||
}
|
||||
|
||||
/**
|
||||
* Data list view - form initialization
|
||||
* @param \HTML_Template_IT $objTemplate Form template object
|
||||
*/
|
||||
public function listViewInit($objTemplate)
|
||||
{
|
||||
// Language text replacements from fieldvars.php file
|
||||
foreach ($this->arrDescription as $elem) {
|
||||
$objTemplate->setVariable($elem['name'], $elem['string']);
|
||||
}
|
||||
// Some single replacements
|
||||
$objTemplate->setVariable('LIMIT', $this->intLimit);
|
||||
$objTemplate->setVariable('ACTION_MODIFY', filter_input(INPUT_SERVER, 'PHP_SELF', FILTER_SANITIZE_STRING));
|
||||
$objTemplate->setVariable('TABLE_NAME', $this->strTableName);
|
||||
if (isset($this->arrSession['search'][$this->strSearchSession])) {
|
||||
$objTemplate->setVariable('DAT_SEARCH', $this->arrSession['search'][$this->strSearchSession]);
|
||||
}
|
||||
$objTemplate->setVariable('MAX_ID', '0');
|
||||
$objTemplate->setVariable('MIN_ID', '0');
|
||||
}
|
||||
|
||||
/**
|
||||
* Data list view - value insertions
|
||||
* @param \HTML_Template_IT $objTemplate Form template object
|
||||
* @param array $arrData Database values
|
||||
* @param int $intDLCount1 Total count of data lines for one page
|
||||
* @param int $intDLCount2 Total count of data lines (all data)
|
||||
* @param string $strField1 Field name for data field 1
|
||||
* @param string $strField2 Field name for data field 2
|
||||
* @param int $intLimit Actual data char limit for field 2
|
||||
*/
|
||||
public function listData(
|
||||
$objTemplate,
|
||||
$arrData,
|
||||
$intDLCount1,
|
||||
$intDLCount2,
|
||||
$strField1,
|
||||
$strField2,
|
||||
$intLimit = 0
|
||||
) {
|
||||
// Template block names
|
||||
$strTplPart = 'datatable';
|
||||
$strTplRow = 'datarow';
|
||||
if ($this->strTableName == 'tbl_host') {
|
||||
$strTplPart = 'datatablehost';
|
||||
$strTplRow = 'datarowhost';
|
||||
}
|
||||
if ($this->strTableName == 'tbl_service') {
|
||||
$strTplPart = 'datatableservice';
|
||||
$strTplRow = 'datarowservice';
|
||||
}
|
||||
if (($this->strTableName == 'tbl_user') || ($this->strTableName == 'tbl_group') ||
|
||||
($this->strTableName == 'tbl_datadomain') || ($this->strTableName == 'tbl_configtarget')) {
|
||||
$strTplPart = 'datatablecommon';
|
||||
$strTplRow = 'datarowcommon';
|
||||
}
|
||||
// Some single replacements
|
||||
$objTemplate->setVariable('IMAGE_PATH_HEAD', $this->arrSettings['path']['base_url']. 'images/');
|
||||
$objTemplate->setVariable('CELLCLASS_L', 'tdlb');
|
||||
$objTemplate->setVariable('CELLCLASS_M', 'tdmb');
|
||||
$objTemplate->setVariable('DISABLED', 'disabled');
|
||||
$objTemplate->setVariable('DATA_FIELD_1', translate('No data'));
|
||||
$objTemplate->setVariable('DATA_FIELD_2', ' ');
|
||||
$objTemplate->setVariable('DATA_REGISTERED', ' ');
|
||||
$objTemplate->setVariable('DATA_ACTIVE', ' ');
|
||||
$objTemplate->setVariable('DATA_FILE', ' ');
|
||||
$objTemplate->setVariable('PICTURE_CLASS', 'elementHide');
|
||||
$objTemplate->setVariable('DOMAIN_SPECIAL', ' ');
|
||||
$objTemplate->setVariable('SORT_BY', $this->intSortBy);
|
||||
// Inserting data values
|
||||
if ($intDLCount1 != 0) {
|
||||
$intMinID = 0;
|
||||
$intMaxID = 0;
|
||||
for ($i=0; $i<$intDLCount1; $i++) {
|
||||
// Get biggest and smalest value
|
||||
if ($i == 0) {
|
||||
$intMinID = $arrData[$i]['id'];
|
||||
$intMaxID = $arrData[$i]['id'];
|
||||
}
|
||||
if ($arrData[$i]['id'] < $intMinID) {
|
||||
$intMinID = $arrData[$i]['id'];
|
||||
}
|
||||
if ($arrData[$i]['id'] > $intMaxID) {
|
||||
$intMaxID = $arrData[$i]['id'];
|
||||
}
|
||||
$objTemplate->setVariable('MAX_ID', $intMaxID);
|
||||
$objTemplate->setVariable('MIN_ID', $intMinID);
|
||||
// Line colours
|
||||
$strClassL = 'tdld';
|
||||
$strClassM = 'tdmd';
|
||||
if ($i%2 == 1) {
|
||||
$strClassL = 'tdlb';
|
||||
$strClassM = 'tdmb';
|
||||
}
|
||||
if (isset($arrData[$i]['register']) && ($arrData[$i]['register'] == 0)) {
|
||||
$strRegister = translate('No');
|
||||
} else {
|
||||
$strRegister = translate('Yes');
|
||||
}
|
||||
if ($arrData[$i]['active'] == 0) {
|
||||
$strActive = translate('No');
|
||||
} else {
|
||||
$strActive = translate('Yes');
|
||||
}
|
||||
// Get file date for hosts and services
|
||||
$intTimeInfo = 0;
|
||||
$arrTimeData = array();
|
||||
if ($this->strTableName == 'tbl_host') {
|
||||
$intReturn = $this->myConfigClass->lastModifiedDir(
|
||||
$this->strTableName,
|
||||
$arrData[$i]['host_name'],
|
||||
$arrData[$i]['id'],
|
||||
$arrTimeData,
|
||||
$intTimeInfo
|
||||
);
|
||||
if ($intReturn == 1) {
|
||||
$this->strErrorMessage = $this->myConfigClass->strErrorMessage;
|
||||
}
|
||||
}
|
||||
if ($this->strTableName == 'tbl_service') {
|
||||
$intReturn = $this->myConfigClass->lastModifiedDir(
|
||||
$this->strTableName,
|
||||
$arrData[$i]['config_name'],
|
||||
$arrData[$i]['id'],
|
||||
$arrTimeData,
|
||||
$intTimeInfo
|
||||
);
|
||||
if ($intReturn == 1) {
|
||||
$this->strErrorMessage = $this->myConfigClass->strErrorMessage;
|
||||
}
|
||||
}
|
||||
// Set datafields
|
||||
foreach ($this->arrDescription as $elem) {
|
||||
$objTemplate->setVariable($elem['name'], $elem['string']);
|
||||
}
|
||||
if ($arrData[$i][$strField1] == '') {
|
||||
$arrData[$i][$strField1] = 'NOT DEFINED - ' .$arrData[$i]['id'];
|
||||
}
|
||||
$objTemplate->setVariable('DATA_FIELD_1', htmlentities($arrData[$i][$strField1], ENT_COMPAT, 'UTF-8'));
|
||||
$objTemplate->setVariable('DATA_FIELD_1S', addslashes(htmlentities(
|
||||
$arrData[$i][$strField1],
|
||||
ENT_COMPAT,
|
||||
'UTF-8'
|
||||
)));
|
||||
if ($strField2 == 'process_field') {
|
||||
$arrData[$i]['process_field'] = $this->processField($arrData[$i], $this->strTableName);
|
||||
} else {
|
||||
$objTemplate->setVariable('DATA_FIELD_2S', addslashes(htmlentities(
|
||||
$arrData[$i][$strField2],
|
||||
ENT_COMPAT,
|
||||
'UTF-8'
|
||||
)));
|
||||
}
|
||||
if ($intLimit != 0) {
|
||||
if (\strlen($arrData[$i][$strField2]) > $intLimit) {
|
||||
$strAdd = ' ...';
|
||||
} else {
|
||||
$strAdd = '';
|
||||
}
|
||||
$objTemplate->setVariable('DATA_FIELD_2', htmlentities(substr(
|
||||
$arrData[$i][$strField2],
|
||||
0,
|
||||
$intLimit
|
||||
), ENT_COMPAT, 'UTF-8').$strAdd);
|
||||
} else {
|
||||
$objTemplate->setVariable('DATA_FIELD_2', htmlentities(
|
||||
$arrData[$i][$strField2],
|
||||
ENT_COMPAT,
|
||||
'UTF-8'
|
||||
));
|
||||
}
|
||||
$objTemplate->setVariable('DATA_REGISTERED', $strRegister);
|
||||
if (substr_count($this->strTableName, 'template') != 0) {
|
||||
$objTemplate->setVariable('DATA_REGISTERED', '-');
|
||||
}
|
||||
$objTemplate->setVariable('DATA_ACTIVE', $strActive);
|
||||
$objTemplate->setVariable('DATA_FILE', '<span class="redmessage">'.translate('out-of-date').'</span>');
|
||||
if ($intTimeInfo == 4) {
|
||||
$objTemplate->setVariable('DATA_FILE', translate('no target'));
|
||||
}
|
||||
if ($intTimeInfo == 3) {
|
||||
$objTemplate->setVariable('DATA_FILE', '<span class="greenmessage">'.translate('missed').'</span>');
|
||||
}
|
||||
if ($intTimeInfo == 2) {
|
||||
$objTemplate->setVariable('DATA_FILE', '<span class="redmessage">'.translate('missed').'</span>');
|
||||
}
|
||||
if ($intTimeInfo == 0) {
|
||||
$objTemplate->setVariable('DATA_FILE', translate('up-to-date'));
|
||||
}
|
||||
$objTemplate->setVariable('LINE_ID', $arrData[$i]['id']);
|
||||
$objTemplate->setVariable('CELLCLASS_L', $strClassL);
|
||||
$objTemplate->setVariable('CELLCLASS_M', $strClassM);
|
||||
$objTemplate->setVariable('IMAGE_PATH', $this->arrSettings['path']['base_url']. 'images/');
|
||||
$objTemplate->setVariable('PICTURE_CLASS', 'elementShow');
|
||||
$objTemplate->setVariable('DOMAIN_SPECIAL', '');
|
||||
$objTemplate->setVariable('DISABLED', '');
|
||||
// Disable common domain objects
|
||||
if (isset($arrData[$i]['config_id'])) {
|
||||
if ($arrData[$i]['config_id'] != $this->intDomainId) {
|
||||
$objTemplate->setVariable('PICTURE_CLASS', 'elementHide');
|
||||
$objTemplate->setVariable('DOMAIN_SPECIAL', ' [common]');
|
||||
$objTemplate->setVariable('DISABLED', 'disabled');
|
||||
} else {
|
||||
// Inactive items should not be written/downloaded
|
||||
if ($arrData[$i]['active'] == 0) {
|
||||
$objTemplate->setVariable('ACTIVE_CONTROL', 'elementHide');
|
||||
}
|
||||
}
|
||||
}
|
||||
// Check access rights for list objects
|
||||
if (isset($arrData[$i]['access_group'])) {
|
||||
if ($this->myVisClass->checkAccountGroup($arrData[$i]['access_group'], 'write') != 0) {
|
||||
$objTemplate->setVariable('LINE_CONTROL', 'elementHide');
|
||||
}
|
||||
} else {
|
||||
if ($this->intGlobalWriteAccess != 0) {
|
||||
$objTemplate->setVariable('LINE_CONTROL', 'elementHide');
|
||||
}
|
||||
}
|
||||
// Check global access rights for list objects
|
||||
if ($this->intGlobalWriteAccess != 0) {
|
||||
$objTemplate->setVariable('LINE_CONTROL', 'elementHide');
|
||||
}
|
||||
$objTemplate->parse($strTplRow);
|
||||
}
|
||||
} else {
|
||||
$objTemplate->setVariable('IMAGE_PATH', $this->arrSettings['path']['base_url']. 'images/');
|
||||
$objTemplate->parse($strTplRow);
|
||||
}
|
||||
$objTemplate->setVariable('BUTTON_CLASS', 'elementShow');
|
||||
if ($this->intDomainId == 0) {
|
||||
$objTemplate->setVariable('BUTTON_CLASS', 'elementHide');
|
||||
}
|
||||
// Check access rights for adding new objects
|
||||
if ($this->intGlobalWriteAccess != 0) {
|
||||
$objTemplate->setVariable('ADD_CONTROL', 'disabled="disabled"');
|
||||
}
|
||||
// Show page numbers
|
||||
$objTemplate->setVariable('PAGES', $this->myVisClass->buildPageLinks(filter_input(
|
||||
INPUT_SERVER,
|
||||
'PHP_SELF',
|
||||
FILTER_SANITIZE_STRING
|
||||
), $intDLCount2, $this->intLimit, $this->intSortBy, $this->strSortDir));
|
||||
$objTemplate->parse($strTplPart);
|
||||
$objTemplate->show($strTplPart);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display information messages
|
||||
* @param \HTML_Template_IT $objTemplate Form template object
|
||||
* @param string $strErrorMessage Error messages
|
||||
* @param string $strInfoMessage Information messages
|
||||
* @param string $strConsistMessage Consistency messages
|
||||
* @param array $arrTimeData Time data array
|
||||
* @param string $strTimeInfoString Time information message
|
||||
* @param int $intNoTime Status value for showing time information (0 = show time)
|
||||
*/
|
||||
public function showMessages(
|
||||
$objTemplate,
|
||||
$strErrorMessage,
|
||||
$strInfoMessage,
|
||||
$strConsistMessage,
|
||||
$arrTimeData,
|
||||
$strTimeInfoString,
|
||||
$intNoTime = 0
|
||||
) {
|
||||
// Display info messages
|
||||
if ($strInfoMessage != '') {
|
||||
$objTemplate->setVariable('INFOMESSAGE', $strInfoMessage);
|
||||
$objTemplate->parse('infomessage');
|
||||
}
|
||||
// Display error messages
|
||||
if ($strErrorMessage != '') {
|
||||
$objTemplate->setVariable('ERRORMESSAGE', $strErrorMessage);
|
||||
$objTemplate->parse('errormessage');
|
||||
}
|
||||
// Display time informations
|
||||
if (($this->intDomainId != 0) && ($intNoTime == 0)) {
|
||||
foreach ($arrTimeData as $key => $elem) {
|
||||
if ($key == 'table') {
|
||||
$objTemplate->setVariable('LAST_MODIFIED_TABLE', translate('Last database update:'). ' <b>' .
|
||||
$elem. '</b>');
|
||||
$objTemplate->parse('table_time');
|
||||
} else {
|
||||
$objTemplate->setVariable('LAST_MODIFIED_FILE', translate('Last file change of the configuration '.
|
||||
'target '). ' <i>' .$key. '</i>: <b>' .$elem. '</b>');
|
||||
$objTemplate->parse('file_time');
|
||||
}
|
||||
}
|
||||
if ($strTimeInfoString != '') {
|
||||
$objTemplate->setVariable('MODIFICATION_STATUS', $strTimeInfoString);
|
||||
$objTemplate->parse('modification_status');
|
||||
}
|
||||
}
|
||||
// Display consistency messages
|
||||
if ($strConsistMessage != '') {
|
||||
$objTemplate->setVariable('CONSIST_USAGE', $strConsistMessage);
|
||||
$objTemplate->parse('consistency');
|
||||
}
|
||||
$objTemplate->parse('msgfooter');
|
||||
$objTemplate->show('msgfooter');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display page footer
|
||||
* @param \HTML_Template_IT $objTemplate Form template object
|
||||
* @param string $setFileVersion NagiosQL version
|
||||
*/
|
||||
public function showFooter($objTemplate, $setFileVersion)
|
||||
{
|
||||
$objTemplate->setVariable('VERSION_INFO', "<a href='https://sourceforge.net/projects/nagiosql/' ".
|
||||
"target='_blank'>NagiosQL</a> $setFileVersion");
|
||||
$objTemplate->parse('footer');
|
||||
$objTemplate->show('footer');
|
||||
}
|
||||
|
||||
/**
|
||||
* Single data form initialization
|
||||
* @param \HTML_Template_IT $objTemplate Form template object
|
||||
* @param string $strChbFields Comma separated string of checkbox value names
|
||||
*/
|
||||
public function addFormInit($objTemplate, $strChbFields = '')
|
||||
{
|
||||
// Language text replacements from fieldvars.php file
|
||||
foreach ($this->arrDescription as $elem) {
|
||||
$objTemplate->setVariable($elem['name'], $elem['string']);
|
||||
}
|
||||
// Some single replacements
|
||||
$objTemplate->setVariable('ACTION_INSERT', filter_input(INPUT_SERVER, 'PHP_SELF', FILTER_SANITIZE_STRING));
|
||||
$objTemplate->setVariable('IMAGE_PATH', $this->arrSettings['path']['base_url']. 'images/');
|
||||
$objTemplate->setVariable('DOCUMENT_ROOT', $this->arrSettings['path']['base_url']);
|
||||
$objTemplate->setVariable('ACT_CHECKED', 'checked');
|
||||
$objTemplate->setVariable('REG_CHECKED', 'checked');
|
||||
$objTemplate->setVariable('MODUS', 'insert');
|
||||
$objTemplate->setVariable('VERSION', $this->intVersion);
|
||||
$objTemplate->setVariable('LIMIT', $this->intLimit);
|
||||
$objTemplate->setVariable('RELATION_CLASS', 'elementHide');
|
||||
$objTemplate->setVariable('IFRAME_SRC', $this->arrSettings['path']['base_url']. 'admin/commandline.php');
|
||||
// Some conditional replacements
|
||||
if ($this->strBrowser != 'msie') {
|
||||
$objTemplate->setVariable('MSIE_DISABLED', 'disabled="disabled"');
|
||||
}
|
||||
if ($this->intGroupAdm == 0) {
|
||||
$objTemplate->setVariable('RESTRICT_GROUP_ADMIN', 'class="elementHide"');
|
||||
}
|
||||
if ($this->arrSettings['common']['seldisable'] == 0) {
|
||||
$objTemplate->setVariable('MSIE_DISABLED', '');
|
||||
}
|
||||
if ($this->arrSettings['common']['tplcheck'] == 0) {
|
||||
$objTemplate->setVariable('CHECK_BYPASS', 'return true;');
|
||||
$objTemplate->setVariable('CHECK_BYPASS_NEW', '1');
|
||||
} else {
|
||||
$objTemplate->setVariable('CHECK_BYPASS_NEW', '0');
|
||||
}
|
||||
// Some replacements based on nagios version
|
||||
if ($this->intVersion < 3) {
|
||||
$objTemplate->setVariable('VERSION_20_VISIBLE', 'elementShow');
|
||||
$objTemplate->setVariable('VERSION_30_VISIBLE', 'elementHide');
|
||||
$objTemplate->setVariable('VERSION_40_VISIBLE', 'elementHide');
|
||||
$objTemplate->setVariable('VERSION_20_MUST', 'inpmust');
|
||||
$objTemplate->setVariable('VERSION_30_MUST', '');
|
||||
$objTemplate->setVariable('VERSION_40_MUST', '');
|
||||
$objTemplate->setVariable('VERSION_20_STAR', '*');
|
||||
$objTemplate->setVariable('NAGIOS_VERSION', '2');
|
||||
}
|
||||
if ($this->intVersion >= 3) {
|
||||
$objTemplate->setVariable('VERSION_20_VISIBLE', 'elementHide');
|
||||
$objTemplate->setVariable('VERSION_30_VISIBLE', 'elementShow');
|
||||
$objTemplate->setVariable('VERSION_40_VISIBLE', 'elementHide');
|
||||
$objTemplate->setVariable('VERSION_20_MUST', '');
|
||||
$objTemplate->setVariable('VERSION_30_MUST', 'inpmust');
|
||||
$objTemplate->setVariable('VERSION_40_MUST', '');
|
||||
$objTemplate->setVariable('VERSION_20_STAR', '');
|
||||
$objTemplate->setVariable('NAGIOS_VERSION', '3');
|
||||
}
|
||||
if ($this->intVersion >= 4) {
|
||||
$objTemplate->setVariable('VERSION_40_VISIBLE', 'elementShow');
|
||||
$objTemplate->setVariable('VERSION_40_MUST', 'inpmust');
|
||||
$objTemplate->setVariable('NAGIOS_VERSION', '4');
|
||||
}
|
||||
// Checkbox and radio field value replacements
|
||||
if ($strChbFields != '') {
|
||||
foreach (explode(',', $strChbFields) as $elem) {
|
||||
$objTemplate->setVariable('DAT_' .$elem. '0_CHECKED', '');
|
||||
$objTemplate->setVariable('DAT_' .$elem. '1_CHECKED', '');
|
||||
$objTemplate->setVariable('DAT_' .$elem. '2_CHECKED', 'checked');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Single data form - value insertion
|
||||
* @param \HTML_Template_IT $objTemplate Form template object
|
||||
* @param array $arrModifyData Database values
|
||||
* @param int $intLocked Data is locked (0 = no / 1 = yes)
|
||||
* @param string $strInfo Information string
|
||||
* @param string $strChbFields Comma separated string of checkbox value names
|
||||
*/
|
||||
public function addInsertData($objTemplate, $arrModifyData, $intLocked, $strInfo, $strChbFields = '')
|
||||
{
|
||||
// Insert text data values
|
||||
foreach ($arrModifyData as $key => $value) {
|
||||
if (($key == 'active') || ($key == 'register') || ($key == 'last_modified') || ($key == 'access_rights')) {
|
||||
continue;
|
||||
}
|
||||
$objTemplate->setVariable('DAT_' .strtoupper($key), htmlentities($value, ENT_QUOTES, 'UTF-8'));
|
||||
}
|
||||
// Insert checkbox data values
|
||||
if (isset($arrModifyData['active']) && ($arrModifyData['active'] != 1)) {
|
||||
$objTemplate->setVariable('ACT_CHECKED', '');
|
||||
}
|
||||
if (isset($arrModifyData['register']) && ($arrModifyData['register'] != 1)) {
|
||||
$objTemplate->setVariable('REG_CHECKED', '');
|
||||
}
|
||||
// Deselect any checkboxes
|
||||
if ($strChbFields != '') {
|
||||
foreach (explode(',', $strChbFields) as $elem) {
|
||||
$objTemplate->setVariable('DAT_' .$elem. '0_CHECKED', '');
|
||||
$objTemplate->setVariable('DAT_' .$elem. '1_CHECKED', '');
|
||||
$objTemplate->setVariable('DAT_' .$elem. '2_CHECKED', '');
|
||||
}
|
||||
}
|
||||
// Change some status values in locked data sets
|
||||
if ($intLocked != 0) {
|
||||
$objTemplate->setVariable('ACT_DISABLED', 'disabled');
|
||||
$objTemplate->setVariable('ACT_CHECKED', 'checked');
|
||||
$objTemplate->setVariable('ACTIVE', '1');
|
||||
$objTemplate->setVariable('CHECK_MUST_DATA', $strInfo);
|
||||
$objTemplate->setVariable('RELATION_CLASS', 'elementShow');
|
||||
}
|
||||
// Change mode to modify
|
||||
$objTemplate->setVariable('MODUS', 'modify');
|
||||
// Check write permission
|
||||
if ($this->intWriteAccessId == 1) {
|
||||
$objTemplate->setVariable('DISABLE_SAVE', 'disabled="disabled"');
|
||||
}
|
||||
if ($this->intGlobalWriteAccess == 1) {
|
||||
$objTemplate->setVariable('DISABLE_SAVE', 'disabled="disabled"');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Process field view
|
||||
* @param array $arrData Data array
|
||||
* @param string $strTableName Table name
|
||||
* @return string String includung field data
|
||||
*/
|
||||
public function processField($arrData, $strTableName)
|
||||
{
|
||||
$strField = '';
|
||||
$arrDataHosts = array();
|
||||
$arrDataHostgroups = array();
|
||||
$arrDataService = array();
|
||||
$arrDataServices = array();
|
||||
// Hostdependency table
|
||||
if ($strTableName == 'tbl_hostdependency') {
|
||||
if ($arrData['dependent_host_name'] != 0) {
|
||||
$strSQLHost = 'SELECT `host_name`, `exclude` FROM `tbl_host` ' .
|
||||
'LEFT JOIN `tbl_lnkHostdependencyToHost_DH` ON `id`=`idSlave` ' .
|
||||
'WHERE `idMaster`=' .$arrData['id']. ' ORDER BY `host_name`';
|
||||
$this->myDBClass->hasDataArray($strSQLHost, $arrDataHosts, $intDCHost);
|
||||
if ($intDCHost != 0) {
|
||||
foreach ($arrDataHosts as $elem) {
|
||||
if ($elem['exclude'] == 1) {
|
||||
$strField .= 'H:!' .$elem['host_name']. ',';
|
||||
} else {
|
||||
$strField .= 'H:' .$elem['host_name']. ',';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($arrData['dependent_hostgroup_name'] != 0) {
|
||||
$strSQLHost = 'SELECT `hostgroup_name`, `exclude` FROM `tbl_hostgroup` ' .
|
||||
'LEFT JOIN `tbl_lnkHostdependencyToHostgroup_DH` ON `id`=`idSlave` ' .
|
||||
'WHERE `idMaster`=' .$arrData['id']. ' ORDER BY `hostgroup_name`';
|
||||
$this->myDBClass->hasDataArray($strSQLHost, $arrDataHostgroups, $intDCHostgroup);
|
||||
if ($intDCHostgroup != 0) {
|
||||
foreach ($arrDataHostgroups as $elem) {
|
||||
if ($elem['exclude'] == 1) {
|
||||
$strField .= 'HG:!' .$elem['hostgroup_name']. ',';
|
||||
} else {
|
||||
$strField .= 'HG:' .$elem['hostgroup_name']. ',';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Hostescalation table
|
||||
if ($strTableName == 'tbl_hostescalation') {
|
||||
if ($arrData['host_name'] != 0) {
|
||||
$strSQLHost = 'SELECT `host_name` FROM `tbl_host` ' .
|
||||
'LEFT JOIN `tbl_lnkHostescalationToHost` ON `id`=`idSlave` ' .
|
||||
'WHERE `idMaster`=' .$arrData['id']. ' ORDER BY `host_name`';
|
||||
$this->myDBClass->hasDataArray($strSQLHost, $arrDataHosts, $intDCHost);
|
||||
if ($intDCHost != 0) {
|
||||
foreach ($arrDataHosts as $elem) {
|
||||
$strField .= 'H:' .$elem['host_name']. ',';
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($arrData['hostgroup_name'] != 0) {
|
||||
$strSQLHost = 'SELECT `hostgroup_name` FROM `tbl_hostgroup` ' .
|
||||
'LEFT JOIN `tbl_lnkHostescalationToHostgroup` ON `id`=`idSlave` ' .
|
||||
'WHERE `idMaster`=' .$arrData['id']. ' ORDER BY `hostgroup_name`';
|
||||
$this->myDBClass->hasDataArray($strSQLHost, $arrDataHostgroups, $intDCHostgroup);
|
||||
if ($intDCHostgroup != 0) {
|
||||
foreach ($arrDataHostgroups as $elem) {
|
||||
$strField .= 'HG:' .$elem['hostgroup_name']. ',';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Servicedependency table
|
||||
if ($strTableName == 'tbl_servicedependency') {
|
||||
if ($arrData['dependent_service_description'] == 2) {
|
||||
$strField .= '*';
|
||||
} elseif ($arrData['dependent_service_description'] != 0) {
|
||||
$strSQLService = 'SELECT `strSlave` FROM `tbl_lnkServicedependencyToService_DS` ' .
|
||||
'WHERE `idMaster`=' .$arrData['id']. ' ORDER BY `strSlave`';
|
||||
$this->myDBClass->hasDataArray($strSQLService, $arrDataService, $intDCService);
|
||||
if ($intDCService != 0) {
|
||||
foreach ($arrDataService as $elem) {
|
||||
$strField .= $elem['strSlave']. ',';
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($strField == '') {
|
||||
$strSQLService = 'SELECT `servicegroup_name` FROM `tbl_servicegroup` ' .
|
||||
'LEFT JOIN `tbl_lnkServicedependencyToServicegroup_DS` ON `idSlave`=`id` ' .
|
||||
'WHERE `idMaster`=' .$arrData['id']. ' ORDER BY `servicegroup_name`';
|
||||
$this->myDBClass->hasDataArray($strSQLService, $arrDataService, $intDCService);
|
||||
if ($intDCService != 0) {
|
||||
foreach ($arrDataService as $elem) {
|
||||
$strField .= $elem['servicegroup_name']. ',';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Serviceescalation table
|
||||
if ($strTableName == 'tbl_serviceescalation') {
|
||||
if ($arrData['service_description'] == 2) {
|
||||
$strField .= '*';
|
||||
} elseif ($arrData['service_description'] != 0) {
|
||||
$strSQLService = 'SELECT `strSlave` FROM `tbl_lnkServiceescalationToService` ' .
|
||||
'WHERE `idMaster`=' .$arrData['id'];
|
||||
$this->myDBClass->hasDataArray($strSQLService, $arrDataServices, $intDCServices);
|
||||
if ($intDCServices != 0) {
|
||||
foreach ($arrDataServices as $elem) {
|
||||
$strField .= $elem['strSlave']. ',';
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($strField == '') {
|
||||
$strSQLService = 'SELECT `servicegroup_name` FROM `tbl_servicegroup` ' .
|
||||
'LEFT JOIN `tbl_lnkServiceescalationToServicegroup` ON `idSlave`=`id` ' .
|
||||
'WHERE `idMaster`=' .$arrData['id']. ' ORDER BY `servicegroup_name`';
|
||||
$this->myDBClass->hasDataArray($strSQLService, $arrDataService, $intDCService);
|
||||
if ($intDCService != 0) {
|
||||
foreach ($arrDataService as $elem) {
|
||||
$strField .= $elem['servicegroup_name']. ',';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Some string manipulations - remove comma on line end
|
||||
if (substr($strField, -1) == ',') {
|
||||
$strField = substr($strField, 0, -1);
|
||||
}
|
||||
return $strField;
|
||||
}
|
||||
}
|
||||
1600
functions/NagDataClass.php
Normal file
1600
functions/NagDataClass.php
Normal file
File diff suppressed because it is too large
Load Diff
1946
functions/NagImportClass.php
Normal file
1946
functions/NagImportClass.php
Normal file
File diff suppressed because it is too large
Load Diff
1452
functions/NagVisualClass.php
Normal file
1452
functions/NagVisualClass.php
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,435 +1,460 @@
|
||||
popup = false;
|
||||
/*
|
||||
(c) 2005-2018 by Martin Willisegger
|
||||
Project : NagiosQL
|
||||
Component : common JavaScript functions
|
||||
Website : https://sourceforge.net/projects/nagiosql/
|
||||
Version : 3.4.0
|
||||
GIT Repo : https://gitlab.com/wizonet/NagiosQL
|
||||
*/
|
||||
let popup = false;
|
||||
function info(key1,key2,ver) {
|
||||
if(popup&&popup.closed==false) popup.close();
|
||||
var top = (screen.availHeight - 240) / 2;
|
||||
var left = (screen.availWidth - 320) / 2;
|
||||
popup = window.open("info.php?key1=" + key1 + "&key2=" + key2 + "&version=" + ver,
|
||||
"Information",
|
||||
"width=320, height=240, top=" + top + ", left=" + left + ", SCROLLBARS=YES, MERNUBAR=NO, DEPENDENT=YES");
|
||||
popup.focus();
|
||||
if(popup && popup.closed === false) popup.close();
|
||||
const top = (screen.availHeight - 240) / 2;
|
||||
const left = (screen.availWidth - 320) / 2;
|
||||
popup = window.open("info.php?key1=" + key1 + "&key2=" + key2 + "&version=" + ver,
|
||||
"Information",
|
||||
"width=320, height=240, top=" + top + ", left=" + left + ", SCROLLBARS=YES, MERNUBAR=NO, DEPENDENT=YES");
|
||||
popup.focus();
|
||||
}
|
||||
var myFocusObject = new Object();
|
||||
|
||||
const myFocusObject = {};
|
||||
|
||||
function checkfields(fields,frm,object) {
|
||||
var error = false;
|
||||
var ar_field = fields.split(",");
|
||||
for (i=0;i<ar_field.length;i++){
|
||||
if (frm[ar_field[i]].value == "") {
|
||||
//frm[ar_field[i]].focus();
|
||||
object.myValue = frm[ar_field[i]];
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
const ar_field = fields.split(",");
|
||||
for (let i=0;i<ar_field.length;i++){
|
||||
if (frm[ar_field[i]].value === "") {
|
||||
//frm[ar_field[i]].focus();
|
||||
object.myValue = frm[ar_field[i]];
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function checkfields2(fields,frm,object) {
|
||||
var error = false;
|
||||
var ar_field = fields.split(",");
|
||||
for (i=0;i<ar_field.length;i++){
|
||||
if ((frm[ar_field[i]].value == "") || (frm[ar_field[i]].value == "0")) {
|
||||
//frm[ar_field[i]].focus();
|
||||
object.myValue = frm[ar_field[i]];
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
const ar_field = fields.split(",");
|
||||
for (let i=0;i<ar_field.length;i++){
|
||||
if ((frm[ar_field[i]].value === "") || (frm[ar_field[i]].value === "0")) {
|
||||
//frm[ar_field[i]].focus();
|
||||
object.myValue = frm[ar_field[i]];
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function checkboxes(fields,frm) {
|
||||
var retval = false;
|
||||
var ar_field = fields.split(",");
|
||||
|
||||
for (i=0;i<ar_field.length;i++){
|
||||
if (frm[ar_field[i]].checked == true) {
|
||||
retval = true;
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
let retval = false;
|
||||
const ar_field = fields.split(",");
|
||||
for (let i=0;i<ar_field.length;i++){
|
||||
if (frm[ar_field[i]].checked === true) {
|
||||
retval = true;
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
<!-- YUI message box -->
|
||||
function msginit(msg,header,type) {
|
||||
YAHOO.namespace("msg.container");
|
||||
var handleOK = function() {
|
||||
this.hide();
|
||||
//myFocusObject.myValue.focus();
|
||||
};
|
||||
if (type == 1) {
|
||||
var iconobj = YAHOO.widget.SimpleDialog.ICON_WARN;
|
||||
}
|
||||
if (type == 2) {
|
||||
var iconobj = YAHOO.widget.SimpleDialog.ICON_HELP;
|
||||
}
|
||||
YAHOO.msg.container.domainmsg = new YAHOO.widget.SimpleDialog("domainmsg",
|
||||
{ width: "300px",
|
||||
fixedcenter: true,
|
||||
visible: false,
|
||||
draggable: false,
|
||||
close: true,
|
||||
text: msg,
|
||||
modal: true,
|
||||
icon: iconobj,
|
||||
constraintoviewport: true,
|
||||
buttons: [ { text:"Ok", handler:handleOK, isDefault:true } ]
|
||||
} );
|
||||
YAHOO.msg.container.domainmsg.setHeader(header);
|
||||
YAHOO.msg.container.domainmsg.render("msgcontainer");
|
||||
YAHOO.msg.container.domainmsg.show();
|
||||
let iconobj;
|
||||
YAHOO.namespace("msg.container");
|
||||
const handleOK = function () {
|
||||
this.hide();
|
||||
//myFocusObject.myValue.focus();
|
||||
};
|
||||
if (type === 1) {
|
||||
iconobj = YAHOO.widget.SimpleDialog.ICON_WARN;
|
||||
}
|
||||
if (type === 2) {
|
||||
iconobj = YAHOO.widget.SimpleDialog.ICON_HELP;
|
||||
}
|
||||
YAHOO.msg.container.domainmsg = new YAHOO.widget.SimpleDialog("domainmsg",
|
||||
{ width: "300px",
|
||||
fixedcenter: true,
|
||||
visible: false,
|
||||
draggable: false,
|
||||
close: true,
|
||||
text: msg,
|
||||
modal: true,
|
||||
icon: iconobj,
|
||||
constraintoviewport: true,
|
||||
buttons: [ { text:"Ok", handler:handleOK, isDefault:true } ]
|
||||
} );
|
||||
YAHOO.msg.container.domainmsg.setHeader(header);
|
||||
YAHOO.msg.container.domainmsg.render("msgcontainer");
|
||||
YAHOO.msg.container.domainmsg.show();
|
||||
}
|
||||
|
||||
<!-- YUI confirm box -->
|
||||
function confirminit(msg,header,type,yes,no,key) {
|
||||
YAHOO.namespace("question.container");
|
||||
var handleYes = function() {
|
||||
confOpenerYes(key);
|
||||
this.hide();
|
||||
};
|
||||
var handleNo = function() {
|
||||
this.hide();
|
||||
};
|
||||
if (type == 1) {
|
||||
var iconobj = YAHOO.widget.SimpleDialog.ICON_WARN;
|
||||
}
|
||||
YAHOO.question.container.domainmsg = new YAHOO.widget.SimpleDialog("confirm1",
|
||||
{ width: "400px",
|
||||
fixedcenter: true,
|
||||
visible: false,
|
||||
draggable: false,
|
||||
close: true,
|
||||
text: msg,
|
||||
modal: true,
|
||||
icon: iconobj,
|
||||
constraintoviewport: true,
|
||||
buttons: [ { text:yes, handler:handleYes, isDefault:true },
|
||||
{ text:no, handler:handleNo }]
|
||||
} );
|
||||
YAHOO.question.container.domainmsg.setHeader(header);
|
||||
YAHOO.question.container.domainmsg.render("confirmcontainer");
|
||||
YAHOO.question.container.domainmsg.show();
|
||||
let iconobj;
|
||||
YAHOO.namespace("question.container");
|
||||
const handleYes = function () {
|
||||
// noinspection JSUnresolvedFunction
|
||||
confOpenerYes(key);
|
||||
this.hide();
|
||||
};
|
||||
const handleNo = function () {
|
||||
this.hide();
|
||||
};
|
||||
if (type === 1) {
|
||||
iconobj = YAHOO.widget.SimpleDialog.ICON_WARN;
|
||||
}
|
||||
YAHOO.question.container.domainmsg = new YAHOO.widget.SimpleDialog("confirm1",
|
||||
{ width: "400px",
|
||||
fixedcenter: true,
|
||||
visible: false,
|
||||
draggable: false,
|
||||
close: true,
|
||||
text: msg,
|
||||
modal: true,
|
||||
icon: iconobj,
|
||||
constraintoviewport: true,
|
||||
buttons: [ { text:yes, handler:handleYes, isDefault:true },
|
||||
{ text:no, handler:handleNo }]
|
||||
} );
|
||||
YAHOO.question.container.domainmsg.setHeader(header);
|
||||
YAHOO.question.container.domainmsg.render("confirmcontainer");
|
||||
YAHOO.question.container.domainmsg.show();
|
||||
}
|
||||
|
||||
|
||||
<!-- YUI dialog box -->
|
||||
function dialoginit(key1,key2,ver,header) {
|
||||
YAHOO.namespace("dialog.container");
|
||||
YAHOO.namespace("dialog.container");
|
||||
|
||||
var handleCancel = function() {
|
||||
this.cancel();
|
||||
};
|
||||
var handleSuccess = function(o){
|
||||
if(o.responseText !== undefined){
|
||||
document.getElementById('dialogcontent').innerHTML = o.responseText;
|
||||
}
|
||||
}
|
||||
var handleFailure = function(o){
|
||||
if(o.responseText !== undefined){
|
||||
document.getElementById('dialogcontent').innerHTML = "No information found";
|
||||
}
|
||||
}
|
||||
var callback = {
|
||||
success:handleSuccess,
|
||||
failure: handleFailure
|
||||
};
|
||||
if (key2 == "updInfo") {
|
||||
sUrl = "admin/info.php?key1=" + key1 + "&key2=" + key2 + "&version=" + ver;
|
||||
} else {
|
||||
sUrl = "info.php?key1=" + key1 + "&key2=" + key2 + "&version=" + ver;
|
||||
}
|
||||
var request = YAHOO.util.Connect.asyncRequest('GET', sUrl, callback);
|
||||
|
||||
if (typeof YAHOO.dialog.container.infodialog == "undefined") {
|
||||
YAHOO.dialog.container.infodialog = new YAHOO.widget.Dialog("infodialog",
|
||||
{ width : "50em",
|
||||
visible : false,
|
||||
draggable: true,
|
||||
fixedcenter: true,
|
||||
constraintoviewport : true,
|
||||
buttons : [ { text:"Ok", handler:handleCancel, isDefault:true } ]
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
YAHOO.dialog.container.infodialog.setHeader(header);
|
||||
YAHOO.dialog.container.infodialog.render();
|
||||
YAHOO.dialog.container.infodialog.show();
|
||||
const handleCancel = function () {
|
||||
this.cancel();
|
||||
};
|
||||
const handleSuccess = function (o) {
|
||||
if (o.responseText !== undefined) {
|
||||
document.getElementById('dialogcontent').innerHTML = o.responseText;
|
||||
}
|
||||
};
|
||||
const handleFailure = function (o) {
|
||||
if (o.responseText !== undefined) {
|
||||
document.getElementById('dialogcontent').innerHTML = "No information found";
|
||||
}
|
||||
};
|
||||
const callback = {
|
||||
success: handleSuccess,
|
||||
failure: handleFailure
|
||||
};
|
||||
let sUrl;
|
||||
if (key2 === "updInfo") {
|
||||
sUrl = "admin/info.php?key1=" + key1 + "&key2=" + key2 + "&version=" + ver;
|
||||
} else {
|
||||
sUrl = "info.php?key1=" + key1 + "&key2=" + key2 + "&version=" + ver;
|
||||
}
|
||||
|
||||
YAHOO.util.Connect.asyncRequest('GET', sUrl, callback);
|
||||
|
||||
if (typeof YAHOO.dialog.container.infodialog === "undefined") {
|
||||
YAHOO.dialog.container.infodialog = new YAHOO.widget.Dialog("infodialog",
|
||||
{ width : "50em",
|
||||
visible : false,
|
||||
draggable: true,
|
||||
fixedcenter: true,
|
||||
constraintoviewport : true,
|
||||
buttons : [ { text:"Ok", handler:handleCancel, isDefault:true } ]
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
YAHOO.dialog.container.infodialog.setHeader(header);
|
||||
YAHOO.dialog.container.infodialog.render();
|
||||
YAHOO.dialog.container.infodialog.show();
|
||||
}
|
||||
|
||||
<!-- YUI calendar -->
|
||||
function calendarinit(lang,start,field,key,cont,obj) {
|
||||
YAHOO.util.Event.onDOMReady(function(){
|
||||
function calendarinit(lang,start,field,key,cont,obj) {
|
||||
YAHOO.util.Event.onDOMReady(function(){
|
||||
|
||||
var dialog, calendar;
|
||||
|
||||
calendar = new YAHOO.widget.Calendar(obj, {
|
||||
iframe:false,
|
||||
hide_blank_weeks:true,
|
||||
START_WEEKDAY:start
|
||||
});
|
||||
if (lang == "de_DE") {
|
||||
calendar.cfg.setProperty("MONTHS_LONG", ["Januar", "Februar", "M\u00E4rz", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"]);
|
||||
calendar.cfg.setProperty("WEEKDAYS_SHORT", ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"]);
|
||||
}
|
||||
|
||||
function cancelHandler() {
|
||||
this.hide();
|
||||
}
|
||||
|
||||
function handleSelect(type,args,obj) {
|
||||
var dates = args[0];
|
||||
var date = dates[0];
|
||||
var year = date[0], month = date[1], day = date[2];
|
||||
|
||||
var txtDate1 = document.getElementById(field);
|
||||
if (month < 10) { month = "0" + month;}
|
||||
if (day < 10) { day = "0" + day;}
|
||||
txtDate1.value = year + "-" + month + "-" + day;
|
||||
dialog.hide();
|
||||
}
|
||||
|
||||
dialog = new YAHOO.widget.Dialog(cont, {
|
||||
context:[field, "tl", "bl"],
|
||||
width:"16em",
|
||||
draggable:true,
|
||||
close:true
|
||||
});
|
||||
calendar.render();
|
||||
dialog.render();
|
||||
dialog.hide();
|
||||
|
||||
calendar.renderEvent.subscribe(function() {
|
||||
dialog.fireEvent("changeContent");
|
||||
});
|
||||
calendar.selectEvent.subscribe(handleSelect, calendar.cal1, true);
|
||||
|
||||
YAHOO.util.Event.on(key, "click", dialog.show, dialog, true);
|
||||
});
|
||||
let dialog, calendar;
|
||||
|
||||
calendar = new YAHOO.widget.Calendar(obj, {
|
||||
iframe:false,
|
||||
hide_blank_weeks:true,
|
||||
START_WEEKDAY:start
|
||||
});
|
||||
if (lang === "de_DE") {
|
||||
calendar.cfg.setProperty("MONTHS_LONG", ["Januar", "Februar", "M\u00E4rz", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"]);
|
||||
calendar.cfg.setProperty("WEEKDAYS_SHORT", ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"]);
|
||||
}
|
||||
|
||||
//function cancelHandler() {
|
||||
// this.hide();
|
||||
//}
|
||||
|
||||
//function handleSelect(type,args,obj) {
|
||||
function handleSelect(type,args) {
|
||||
const dates = args[0];
|
||||
const date = dates[0];
|
||||
const year = date[0];
|
||||
let month = date[1], day = date[2];
|
||||
|
||||
const txtDate1 = document.getElementById(field);
|
||||
if (month < 10) { month = "0" + month;}
|
||||
if (day < 10) { day = "0" + day;}
|
||||
// noinspection JSUndefinedPropertyAssignment
|
||||
txtDate1.value = year + "-" + month + "-" + day;
|
||||
dialog.hide();
|
||||
}
|
||||
|
||||
dialog = new YAHOO.widget.Dialog(cont, {
|
||||
context:[field, "tl", "bl"],
|
||||
width:"16em",
|
||||
draggable:true,
|
||||
close:true
|
||||
});
|
||||
calendar.render();
|
||||
dialog.render();
|
||||
dialog.hide();
|
||||
|
||||
calendar.renderEvent.subscribe(function() {
|
||||
dialog.fireEvent("changeContent");
|
||||
});
|
||||
// noinspection JSUnresolvedVariable
|
||||
calendar.selectEvent.subscribe(handleSelect, calendar.cal1, true);
|
||||
|
||||
YAHOO.util.Event.on(key, "click", dialog.show, dialog, true);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// Open edit dialog for list boxes
|
||||
function openMutDlgInit(field,divbox,header,key,langkey1,langkey2,exclude) {
|
||||
|
||||
YAHOO.util.Event.onDOMReady(function(){
|
||||
|
||||
var mutdialog;
|
||||
|
||||
var handleSuccess = function(o){
|
||||
if(o.responseText !== undefined){
|
||||
document.getElementById(divbox+'content').innerHTML = o.responseText;
|
||||
}
|
||||
}
|
||||
var handleFailure = function(o){
|
||||
if(o.responseText !== undefined){
|
||||
document.getElementById(divbox+'content').innerHTML = "No information found";
|
||||
}
|
||||
}
|
||||
var callback = {
|
||||
success:handleSuccess,
|
||||
failure: handleFailure
|
||||
};
|
||||
sUrl = "mutdialog.php?object=" + field + "&exclude=" + exclude;
|
||||
var request = YAHOO.util.Connect.asyncRequest('GET', sUrl, callback);
|
||||
|
||||
var handleSave = function() {
|
||||
var source = document.getElementById(field);
|
||||
var targetSelect = document.getElementById(field+'Selected');
|
||||
var targetAvail = document.getElementById(field+'Avail');
|
||||
for (i = 0; i < targetSelect.length; ++i) {
|
||||
targetSelect.options[i].selected = true;
|
||||
}
|
||||
for (i = 0; i < source.length; ++i) {
|
||||
source.options[i].selected = false;
|
||||
source.options[i].className = source.options[i].className.replace(/ ieselected/g , '');
|
||||
}
|
||||
for (i = 0; i < targetSelect.length; ++i) {
|
||||
for (y = 0; y < source.length; ++y) {
|
||||
var value1 = targetSelect.options[i].value.replace(/^e/g , '');
|
||||
var value2 = "e"+value1;
|
||||
if ((source.options[y].value == value1) || (source.options[y].value == value2)) {
|
||||
source.options[y].selected = true;
|
||||
source.options[y].value = targetSelect.options[i].value;
|
||||
source.options[y].text = targetSelect.options[i].text;
|
||||
source.options[y].className = source.options[y].className+" ieselected";
|
||||
}
|
||||
}
|
||||
}
|
||||
this.cancel();
|
||||
if ((typeof(update) == 'number') && (update == 1)) {
|
||||
updateForm(field);
|
||||
}
|
||||
};
|
||||
var handleCancel = function() {
|
||||
this.cancel();
|
||||
};
|
||||
mutdialog = new YAHOO.widget.Dialog(divbox,
|
||||
{ width : "60em",
|
||||
fixedcenter : true,
|
||||
visible : false,
|
||||
draggable: true,
|
||||
modal: true,
|
||||
constraintoviewport : true,
|
||||
buttons : [ { text:langkey1, handler:handleSave, isDefault:true },
|
||||
{ text:langkey2, handler:handleCancel } ]
|
||||
});
|
||||
|
||||
mutdialog.setHeader(header);
|
||||
mutdialog.render();
|
||||
mutdialog.hide();
|
||||
mutdialog.beforeShowEvent.subscribe(function() {
|
||||
getData(field);
|
||||
});
|
||||
|
||||
YAHOO.util.Event.on(key, "click", mutdialog.show, mutdialog, true);
|
||||
});
|
||||
YAHOO.util.Event.onDOMReady(function(){
|
||||
|
||||
let mutdialog;
|
||||
|
||||
const handleSuccess = function (o) {
|
||||
if (o.responseText !== undefined) {
|
||||
document.getElementById(divbox + 'content').innerHTML = o.responseText;
|
||||
}
|
||||
};
|
||||
const handleFailure = function (o) {
|
||||
if (o.responseText !== undefined) {
|
||||
document.getElementById(divbox + 'content').innerHTML = "No information found";
|
||||
}
|
||||
};
|
||||
const callback = {
|
||||
success: handleSuccess,
|
||||
failure: handleFailure
|
||||
};
|
||||
let sUrl;
|
||||
sUrl = "mutdialog.php?object=" + field + "&exclude=" + exclude;
|
||||
YAHOO.util.Connect.asyncRequest('GET', sUrl, callback);
|
||||
|
||||
const handleSave = function () {
|
||||
const source = document.getElementById(field);
|
||||
const targetSelect = document.getElementById(field + 'Selected');
|
||||
//const targetAvail = document.getElementById(field + 'Avail');
|
||||
for (let i = 0; i < targetSelect.length; ++i) {
|
||||
targetSelect.options[i].selected = true;
|
||||
}
|
||||
for (let i = 0; i < source.length; ++i) {
|
||||
source.options[i].selected = false;
|
||||
source.options[i].className = source.options[i].className.replace(/ ieselected/g, '');
|
||||
}
|
||||
for (let i = 0; i < targetSelect.length; ++i) {
|
||||
for (let y = 0; y < source.length; ++y) {
|
||||
const value1 = targetSelect.options[i].value.replace(/^e/g, '');
|
||||
const value2 = "e" + value1;
|
||||
if ((source.options[y].value === value1) || (source.options[y].value === value2)) {
|
||||
source.options[y].selected = true;
|
||||
source.options[y].value = targetSelect.options[i].value;
|
||||
source.options[y].text = targetSelect.options[i].text;
|
||||
source.options[y].className = source.options[y].className + " ieselected";
|
||||
}
|
||||
}
|
||||
}
|
||||
this.cancel();
|
||||
// noinspection JSUnresolvedVariable
|
||||
if ((typeof(update) === 'number') && (update === 1)) {
|
||||
// noinspection JSUnresolvedFunction
|
||||
updateForm(field);
|
||||
}
|
||||
};
|
||||
const handleCancel = function () {
|
||||
this.cancel();
|
||||
};
|
||||
mutdialog = new YAHOO.widget.Dialog(divbox,
|
||||
{ width : "60em",
|
||||
fixedcenter : true,
|
||||
visible : false,
|
||||
draggable: true,
|
||||
modal: true,
|
||||
constraintoviewport : true,
|
||||
buttons : [ { text:langkey1, handler:handleSave, isDefault:true },
|
||||
{ text:langkey2, handler:handleCancel } ]
|
||||
});
|
||||
|
||||
mutdialog.setHeader(header);
|
||||
mutdialog.render();
|
||||
mutdialog.hide();
|
||||
mutdialog.beforeShowEvent.subscribe(function() {
|
||||
getData(field);
|
||||
});
|
||||
|
||||
YAHOO.util.Event.on(key, "click", mutdialog.show, mutdialog, true);
|
||||
});
|
||||
}
|
||||
|
||||
// Additional functions for edit dialog
|
||||
function getData(field) {
|
||||
var source = document.getElementById(field);
|
||||
var targetSelect = document.getElementById(field+'Selected');
|
||||
var targetAvail = document.getElementById(field+'Avail');
|
||||
for (i=0; i < targetSelect.length; i++) {
|
||||
targetSelect.options[i] = null;
|
||||
}
|
||||
targetSelect.length = 0;
|
||||
for (i=0; i < targetAvail.length; i++) {
|
||||
targetAvail.options[i] = null;
|
||||
}
|
||||
targetAvail.length = 0;
|
||||
for (i = 0; i < source.length; ++i) {
|
||||
if (source.options[i].selected == true) {
|
||||
NeuerEintrag1 = new Option(source.options[i].text, source.options[i].value, false, false);
|
||||
NeuerEintrag1.className = source.options[i].className.replace(/ ieselected/g , '');
|
||||
NeuerEintrag1.className = NeuerEintrag1.className.replace(/ inpmust/g , '');
|
||||
targetSelect.options[targetSelect.length] = NeuerEintrag1;
|
||||
}
|
||||
if (source.options[i].selected == false) {
|
||||
if (source.options[i].text != "") {
|
||||
NeuerEintrag2 = new Option(source.options[i].text, source.options[i].value, false, false);
|
||||
NeuerEintrag2.className = source.options[i].className.replace(/ ieselected/g , '');
|
||||
NeuerEintrag2.className = NeuerEintrag2.className.replace(/ inpmust/g , '');
|
||||
targetAvail.options[targetAvail.length] = NeuerEintrag2;
|
||||
}
|
||||
}
|
||||
}
|
||||
const source = document.getElementById(field);
|
||||
const targetSelect = document.getElementById(field + 'Selected');
|
||||
const targetAvail = document.getElementById(field + 'Avail');
|
||||
for (let i=0; i < targetSelect.length; i++) {
|
||||
targetSelect.options[i] = null;
|
||||
}
|
||||
// noinspection JSUndefinedPropertyAssignment
|
||||
targetSelect.length = 0;
|
||||
for (let i=0; i < targetAvail.length; i++) {
|
||||
targetAvail.options[i] = null;
|
||||
}
|
||||
// noinspection JSUndefinedPropertyAssignment
|
||||
targetAvail.length = 0;
|
||||
let NeuerEintrag1;
|
||||
let NeuerEintrag2;
|
||||
for (let i = 0; i < source.length; ++i) {
|
||||
if (source.options[i].selected === true) {
|
||||
NeuerEintrag1 = new Option(source.options[i].text, source.options[i].value, false, false);
|
||||
NeuerEintrag1.className = source.options[i].className.replace(/ ieselected/g, '');
|
||||
NeuerEintrag1.className = NeuerEintrag1.className.replace(/ inpmust/g, '');
|
||||
targetSelect.options[targetSelect.length] = NeuerEintrag1;
|
||||
}
|
||||
if (source.options[i].selected === false) {
|
||||
if (source.options[i].text !== "") {
|
||||
NeuerEintrag2 = new Option(source.options[i].text, source.options[i].value, false, false);
|
||||
NeuerEintrag2.className = source.options[i].className.replace(/ ieselected/g, '');
|
||||
NeuerEintrag2.className = NeuerEintrag2.className.replace(/ inpmust/g, '');
|
||||
targetAvail.options[targetAvail.length] = NeuerEintrag2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Insert selection
|
||||
function selValue(field) {
|
||||
var targetSelect = document.getElementById(field+'Selected');
|
||||
var targetAvail = document.getElementById(field+'Avail');
|
||||
if (targetAvail.selectedIndex != -1) {
|
||||
var DelOptions = new Array();
|
||||
for (i = 0; i < targetAvail.length; ++i) {
|
||||
if (targetAvail.options[i].selected == true) {
|
||||
NeuerEintrag = new Option(targetAvail.options[i].text, targetAvail.options[i].value, false, false);
|
||||
NeuerEintrag.className = targetAvail.options[i].className;
|
||||
targetSelect.options[targetSelect.length] = NeuerEintrag;
|
||||
DelOptions.push(i);
|
||||
}
|
||||
}
|
||||
sort(targetSelect);
|
||||
DelOptions.reverse();
|
||||
for (var i = 0; i < DelOptions.length; ++i) {
|
||||
targetAvail.options[DelOptions[i]] = null;
|
||||
}
|
||||
}
|
||||
const targetSelect = document.getElementById(field + 'Selected');
|
||||
const targetAvail = document.getElementById(field + 'Avail');
|
||||
let NeuerEintrag;
|
||||
if (targetAvail.selectedIndex !== -1) {
|
||||
const DelOptions = [];
|
||||
for (let i = 0; i < targetAvail.length; ++i) {
|
||||
if (targetAvail.options[i].selected === true) {
|
||||
NeuerEintrag = new Option(targetAvail.options[i].text, targetAvail.options[i].value, false, false);
|
||||
NeuerEintrag.className = targetAvail.options[i].className;
|
||||
targetSelect.options[targetSelect.length] = NeuerEintrag;
|
||||
DelOptions.push(i);
|
||||
}
|
||||
}
|
||||
sort(targetSelect);
|
||||
DelOptions.reverse();
|
||||
for (let i=0; i<DelOptions.length; ++i) {
|
||||
targetAvail.options[DelOptions[i]] = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Insert selection (exclude variant)
|
||||
function selValueEx(field) {
|
||||
var targetSelect = document.getElementById(field+'Selected');
|
||||
var targetAvail = document.getElementById(field+'Avail');
|
||||
if (targetAvail.selectedIndex != -1) {
|
||||
var DelOptions = new Array();
|
||||
for (i = 0; i < targetAvail.length; ++i) {
|
||||
if (targetAvail.options[i].selected == true) {
|
||||
if ((targetAvail.options[i].text != '*') && (targetAvail.options[i].value != '0')) {
|
||||
NeuerEintrag = new Option("!"+targetAvail.options[i].text, "e"+targetAvail.options[i].value, false, false);
|
||||
} else {
|
||||
NeuerEintrag = new Option(targetAvail.options[i].text, targetAvail.options[i].value, false, false);
|
||||
}
|
||||
NeuerEintrag.className = targetAvail.options[i].className;
|
||||
targetSelect.options[targetSelect.length] = NeuerEintrag;
|
||||
DelOptions.push(i);
|
||||
}
|
||||
}
|
||||
sort(targetSelect);
|
||||
DelOptions.reverse();
|
||||
for (var i = 0; i < DelOptions.length; ++i) {
|
||||
targetAvail.options[DelOptions[i]] = null;
|
||||
}
|
||||
}
|
||||
const targetSelect = document.getElementById(field + 'Selected');
|
||||
const targetAvail = document.getElementById(field + 'Avail');
|
||||
let NeuerEintrag;
|
||||
if (targetAvail.selectedIndex !== -1) {
|
||||
const DelOptions = [];
|
||||
for (let i = 0; i < targetAvail.length; ++i) {
|
||||
if (targetAvail.options[i].selected === true) {
|
||||
if ((targetAvail.options[i].text !== '*') && (targetAvail.options[i].value !== '0')) {
|
||||
NeuerEintrag = new Option("!" + targetAvail.options[i].text, "e" + targetAvail.options[i].value, false, false);
|
||||
} else {
|
||||
NeuerEintrag = new Option(targetAvail.options[i].text, targetAvail.options[i].value, false, false);
|
||||
}
|
||||
NeuerEintrag.className = targetAvail.options[i].className;
|
||||
targetSelect.options[targetSelect.length] = NeuerEintrag;
|
||||
DelOptions.push(i);
|
||||
}
|
||||
}
|
||||
sort(targetSelect);
|
||||
DelOptions.reverse();
|
||||
for (let i = 0; i < DelOptions.length; ++i) {
|
||||
targetAvail.options[DelOptions[i]] = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Remove selection
|
||||
function desValue(field) {
|
||||
var targetSelect = document.getElementById(field+'Selected');
|
||||
var targetAvail = document.getElementById(field+'Avail');
|
||||
if (targetSelect.selectedIndex != -1) {
|
||||
var DelOptions = new Array();
|
||||
for (i = 0; i < targetSelect.length; ++i) {
|
||||
if (targetSelect.options[i].selected == true) {
|
||||
var text = targetSelect.options[i].text.replace(/^!/g , '');
|
||||
var value = targetSelect.options[i].value.replace(/^e/g , '');
|
||||
NeuerEintrag = new Option(text, value, false, false);
|
||||
NeuerEintrag.className = targetSelect.options[i].className;
|
||||
targetAvail.options[targetAvail.length] = NeuerEintrag;
|
||||
DelOptions.push(i);
|
||||
}
|
||||
}
|
||||
sort(targetAvail);
|
||||
DelOptions.reverse();
|
||||
for (var i = 0; i < DelOptions.length; ++i) {
|
||||
targetSelect.options[DelOptions[i]] = null;
|
||||
}
|
||||
}
|
||||
const targetSelect = document.getElementById(field + 'Selected');
|
||||
const targetAvail = document.getElementById(field + 'Avail');
|
||||
let NeuerEintrag;
|
||||
if (targetSelect.selectedIndex !== -1) {
|
||||
const DelOptions = [];
|
||||
for (let i = 0; i < targetSelect.length; ++i) {
|
||||
if (targetSelect.options[i].selected === true) {
|
||||
const text = targetSelect.options[i].text.replace(/^!/g, '');
|
||||
const value = targetSelect.options[i].value.replace(/^e/g, '');
|
||||
NeuerEintrag = new Option(text, value, false, false);
|
||||
NeuerEintrag.className = targetSelect.options[i].className;
|
||||
targetAvail.options[targetAvail.length] = NeuerEintrag;
|
||||
DelOptions.push(i);
|
||||
}
|
||||
}
|
||||
sort(targetAvail);
|
||||
DelOptions.reverse();
|
||||
for (let i = 0; i < DelOptions.length; ++i) {
|
||||
targetSelect.options[DelOptions[i]] = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Sort entries
|
||||
function sort(obj){
|
||||
var sortieren = new Array();
|
||||
var list = new Array();
|
||||
var i;
|
||||
const sortieren = [];
|
||||
const list = [];
|
||||
let i;
|
||||
|
||||
// Insert list to array
|
||||
for (i=0; i < obj.options.length; i++) {
|
||||
list[i] = new Array();
|
||||
list[i]["text"] = obj.options[i].text;
|
||||
list[i]["value"] = obj.options[i].value;
|
||||
list[i]["className"] = obj.options[i].className;
|
||||
}
|
||||
// Insert list to array
|
||||
for (i=0; i < obj.options.length; i++) {
|
||||
list[i] = [];
|
||||
list[i]["text"] = obj.options[i].text;
|
||||
list[i]["value"] = obj.options[i].value;
|
||||
list[i]["className"] = obj.options[i].className;
|
||||
}
|
||||
|
||||
// Sort into a single dimension array
|
||||
for (i=0; i < obj.length; i++){
|
||||
sortieren[i]=list[i]["text"]+";"+list[i]["value"]+";"+list[i]["className"];
|
||||
}
|
||||
// Sort into a single dimension array
|
||||
for (i=0; i < obj.length; i++){
|
||||
sortieren[i]=list[i]["text"]+";"+list[i]["value"]+";"+list[i]["className"];
|
||||
}
|
||||
|
||||
// Real sort
|
||||
sortieren.sort();
|
||||
// Real sort
|
||||
sortieren.sort();
|
||||
|
||||
// Make array to list
|
||||
for (i=0; i < sortieren.length; i++) {
|
||||
var felder = sortieren[i].split(";");
|
||||
list[i]["text"] = felder[0];
|
||||
list[i]["value"] = felder[1];
|
||||
list[i]["className"] = felder[2];
|
||||
}
|
||||
// Make array to list
|
||||
for (i=0; i < sortieren.length; i++) {
|
||||
const felder = sortieren[i].split(";");
|
||||
list[i]["text"] = felder[0];
|
||||
list[i]["value"] = felder[1];
|
||||
list[i]["className"] = felder[2];
|
||||
}
|
||||
|
||||
// Remove list field
|
||||
for (i=0; i < obj.options.length; i++) {
|
||||
obj.options[i] = null;
|
||||
}
|
||||
// Remove list field
|
||||
for (i=0; i < obj.options.length; i++) {
|
||||
obj.options[i] = null;
|
||||
}
|
||||
|
||||
// insert list to dialog
|
||||
for (i=0; i < list.length; i++){
|
||||
NeuerEintrag = new Option(list[i]["text"], list[i]["value"], false, false);
|
||||
NeuerEintrag.className = list[i]["className"];
|
||||
obj.options[i] = NeuerEintrag;
|
||||
}
|
||||
// insert list to dialog
|
||||
let NeuerEintrag;
|
||||
for (i = 0; i < list.length; i++) {
|
||||
NeuerEintrag = new Option(list[i]["text"], list[i]["value"], false, false);
|
||||
NeuerEintrag.className = list[i]["className"];
|
||||
obj.options[i] = NeuerEintrag;
|
||||
}
|
||||
}
|
||||
// Show relation data
|
||||
function showRelationData(option) {
|
||||
if (option == 1) {
|
||||
document.getElementById("rel_text").className = "elementHide";
|
||||
document.getElementById("rel_info").className = "elementShow";
|
||||
} else {
|
||||
document.getElementById("rel_text").className = "elementShow";
|
||||
document.getElementById("rel_info").className = "elementHide";
|
||||
}
|
||||
if (option === 1) {
|
||||
document.getElementById("rel_text").className = "elementHide";
|
||||
document.getElementById("rel_info").className = "elementShow";
|
||||
} else {
|
||||
document.getElementById("rel_text").className = "elementShow";
|
||||
document.getElementById("rel_info").className = "elementHide";
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,509 +0,0 @@
|
||||
<?php
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// NagiosQL
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (c) 2005-2017 by Martin Willisegger
|
||||
//
|
||||
// Project : NagiosQL
|
||||
// Component : Content Class
|
||||
// Website : http://www.nagiosql.org
|
||||
// Date : $LastChangedDate: 2017-06-22 09:29:35 +0200 (Thu, 22 Jun 2017) $
|
||||
// Author : $LastChangedBy: martin $
|
||||
// Version : 3.3.0
|
||||
// Revision : $LastChangedRevision: 2 $
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Class: Common content functions
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Includes all functions used to display the application data
|
||||
//
|
||||
// Name: nagcontent
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
class nagcontent {
|
||||
// Define class variables
|
||||
var $arrSettings; // Array includes all global settings
|
||||
var $myVisClass; // NagiosQL visual class object
|
||||
var $myDBClass; // NagiosQL data base class object
|
||||
var $myConfigClass; // NagiosQL configuration class object
|
||||
var $intLimit; // Data limit value
|
||||
var $intVersion; // Nagios version id
|
||||
var $strBrowser; // Browser string
|
||||
var $intGroupAdm; // Group admin enabled/disabled
|
||||
var $intWriteAccessId; // Write access id
|
||||
var $intGlobalWriteAccess; // Global write access id
|
||||
var $arrDescription; // Language field values from fieldvars.php
|
||||
var $strTableName; // Data table name
|
||||
var $strSearchSession; // Search session name
|
||||
var $intSortBy; // Sort by field id
|
||||
var $strSortDir; // SQL sort direction (ASC/DESC)
|
||||
var $intDomainId = 0; // Domain id value
|
||||
var $strErrorMessage = ""; // String including error messages
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Class constructor
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Activities during class initialization
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
function __construct() {
|
||||
// Read global settings
|
||||
$this->arrSettings = $_SESSION['SETS'];
|
||||
if (isset($_SESSION['domain'])) $this->intDomainId = $_SESSION['domain'];
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Function: Single data form initialization
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Parameter: $objTemplate Form template object
|
||||
// $strChbFields Comma separated string of checkbox value names
|
||||
//
|
||||
// Return values: none
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
function addFormInit($objTemplate,$strChbFields='') {
|
||||
// Language text replacements from fieldvars.php file
|
||||
foreach($this->arrDescription AS $elem) {
|
||||
$objTemplate->setVariable($elem['name'],$elem['string']);
|
||||
}
|
||||
// Some single replacements
|
||||
$objTemplate->setVariable("ACTION_INSERT",filter_var($_SERVER['PHP_SELF'], FILTER_SANITIZE_STRING));
|
||||
$objTemplate->setVariable("IMAGE_PATH",$this->arrSettings['path']['base_url']."images/");
|
||||
$objTemplate->setVariable("DOCUMENT_ROOT",$this->arrSettings['path']['base_url']);
|
||||
$objTemplate->setVariable("ACT_CHECKED","checked");
|
||||
$objTemplate->setVariable("REG_CHECKED","checked");
|
||||
$objTemplate->setVariable("MODUS","insert");
|
||||
$objTemplate->setVariable("VERSION",$this->intVersion);
|
||||
$objTemplate->setVariable("LIMIT",$this->intLimit);
|
||||
$objTemplate->setVariable("RELATION_CLASS","elementHide");
|
||||
$objTemplate->setVariable("IFRAME_SRC",$this->arrSettings['path']['base_url']."admin/commandline.php");
|
||||
// Some conditional replacements
|
||||
if ($this->strBrowser != "msie") $objTemplate->setVariable("MSIE_DISABLED","disabled=\"disabled\"");
|
||||
if ($this->intGroupAdm == 0) $objTemplate->setVariable("RESTRICT_GROUP_ADMIN","class=\"elementHide\"");
|
||||
if ($this->arrSettings['common']['seldisable'] == 0) $objTemplate->setVariable("MSIE_DISABLED","");
|
||||
if ($this->arrSettings['common']['tplcheck'] == 0) $objTemplate->setVariable("CHECK_BYPASS","return true;");
|
||||
// Some replacements based on nagios version
|
||||
if ($this->intVersion == 3) {
|
||||
$objTemplate->setVariable("VERSION_20_VISIBLE","elementHide");
|
||||
$objTemplate->setVariable("VERSION_30_VISIBLE","elementShow");
|
||||
$objTemplate->setVariable("VERSION_20_MUST","");
|
||||
$objTemplate->setVariable("VERSION_30_MUST","inpmust");
|
||||
$objTemplate->setVariable("VERSION_20_STAR","");
|
||||
$objTemplate->setVariable("NAGIOS_VERSION","3");
|
||||
} else {
|
||||
$objTemplate->setVariable("VERSION_20_VISIBLE","elementShow");
|
||||
$objTemplate->setVariable("VERSION_30_VISIBLE","elementHide");
|
||||
$objTemplate->setVariable("VERSION_20_MUST","inpmust");
|
||||
$objTemplate->setVariable("VERSION_30_MUST","");
|
||||
$objTemplate->setVariable("VERSION_20_STAR","*");
|
||||
$objTemplate->setVariable("NAGIOS_VERSION","2");
|
||||
}
|
||||
// Checkbox and radio field value replacements
|
||||
if ($strChbFields != '') {
|
||||
foreach (explode(",",$strChbFields) AS $elem) {
|
||||
$objTemplate->setVariable("DAT_".$elem."0_CHECKED","");
|
||||
$objTemplate->setVariable("DAT_".$elem."1_CHECKED","");
|
||||
$objTemplate->setVariable("DAT_".$elem."2_CHECKED","checked");
|
||||
}
|
||||
}
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Function: Single data form - value insertions
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Parameter: $objTemplate Form template object
|
||||
// $arrModifyData Database values
|
||||
// $intLocked Data is locked (0=no / 1=yes)
|
||||
// $strInfo Information string
|
||||
// $strChbFields Comma separated string of checkbox value names
|
||||
//
|
||||
// Return values: none
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
function addInsertData($objTemplate,$arrModifyData,$intLocked,$strInfo,$strChbFields = '') {
|
||||
// Insert text data values
|
||||
foreach($arrModifyData AS $key => $value) {
|
||||
if (($key == "active") || ($key == "register") || ($key == "last_modified") || ($key == "access_rights")) continue;
|
||||
$objTemplate->setVariable("DAT_".strtoupper($key),htmlentities($value,ENT_QUOTES,'UTF-8'));
|
||||
}
|
||||
// Insert checkbox data values
|
||||
if ((isset($arrModifyData['active'])) && ($arrModifyData['active'] != 1)) $objTemplate->setVariable("ACT_CHECKED","");
|
||||
if ((isset($arrModifyData['register'])) && ($arrModifyData['register'] != 1)) $objTemplate->setVariable("REG_CHECKED","");
|
||||
// Deselect any checkboxes
|
||||
if ($strChbFields != '') {
|
||||
foreach (explode(",",$strChbFields) AS $elem) {
|
||||
$objTemplate->setVariable("DAT_".$elem."0_CHECKED","");
|
||||
$objTemplate->setVariable("DAT_".$elem."1_CHECKED","");
|
||||
$objTemplate->setVariable("DAT_".$elem."2_CHECKED","");
|
||||
}
|
||||
}
|
||||
// Change some status values in locked data sets
|
||||
if ($intLocked != 0) {
|
||||
$objTemplate->setVariable("ACT_DISABLED","disabled");
|
||||
$objTemplate->setVariable("ACT_CHECKED","checked");
|
||||
$objTemplate->setVariable("ACTIVE","1");
|
||||
$objTemplate->setVariable("CHECK_MUST_DATA",$strInfo);
|
||||
$objTemplate->setVariable("RELATION_CLASS","elementShow");
|
||||
}
|
||||
// Change mode to modify
|
||||
$objTemplate->setVariable("MODUS","modify");
|
||||
// Check write permission
|
||||
if ($this->intWriteAccessId == 1) $objTemplate->setVariable("DISABLE_SAVE","disabled=\"disabled\"");
|
||||
if ($this->intGlobalWriteAccess == 1) $objTemplate->setVariable("DISABLE_SAVE","disabled=\"disabled\"");
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Function: List view - form initialization
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Parameter: $objTemplate Form template object
|
||||
//
|
||||
// Return values: none
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
function listViewInit($objTemplate) {
|
||||
// Language text replacements from fieldvars.php file
|
||||
foreach($this->arrDescription AS $elem) {
|
||||
$objTemplate->setVariable($elem['name'],$elem['string']);
|
||||
}
|
||||
// Some single replacements
|
||||
$objTemplate->setVariable("LIMIT",$this->intLimit);
|
||||
$objTemplate->setVariable("ACTION_MODIFY",filter_var($_SERVER['PHP_SELF'], FILTER_SANITIZE_STRING));
|
||||
$objTemplate->setVariable("TABLE_NAME",$this->strTableName);
|
||||
$objTemplate->setVariable("DAT_SEARCH",$_SESSION['search'][$this->strSearchSession]);
|
||||
$objTemplate->setVariable("MAX_ID","0");
|
||||
$objTemplate->setVariable("MIN_ID","0");
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Function: List view - value insertions
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Parameter: $objTemplate Form template object
|
||||
// $arrData Database values
|
||||
// $intDataCount Total count of data lines for one page
|
||||
// $intLineCount Total count of data lines (all data)
|
||||
// $strField1 Field name for data field 1
|
||||
// $strField2 Field name for data field 2
|
||||
// $intLimit2 Actual data char limit for field 2
|
||||
//
|
||||
// Return values: none
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
function listData($objTemplate,$arrData,$intDataCount,$intLineCount,$strField1,$strField2,$intLimit2=0) {
|
||||
// Template block names
|
||||
$strTplPart = 'datatable';
|
||||
$strTplRow = 'datarow';
|
||||
if ($this->strTableName == "tbl_host") {
|
||||
$strTplPart = 'datatablehost';
|
||||
$strTplRow = 'datarowhost';
|
||||
}
|
||||
if ($this->strTableName == "tbl_service") {
|
||||
$strTplPart = 'datatableservice';
|
||||
$strTplRow = 'datarowservice';
|
||||
}
|
||||
if (($this->strTableName == "tbl_user") || ($this->strTableName == "tbl_group") || ($this->strTableName == "tbl_datadomain") || ($this->strTableName == "tbl_configtarget")) {
|
||||
$strTplPart = 'datatablecommon';
|
||||
$strTplRow = 'datarowcommon';
|
||||
}
|
||||
// Some single replacements
|
||||
$objTemplate->setVariable("IMAGE_PATH_HEAD",$this->arrSettings['path']['base_url']."images/");
|
||||
$objTemplate->setVariable("CELLCLASS_L","tdlb");
|
||||
$objTemplate->setVariable("CELLCLASS_M","tdmb");
|
||||
$objTemplate->setVariable("DISABLED","disabled");
|
||||
$objTemplate->setVariable("DATA_FIELD_1",translate('No data'));
|
||||
$objTemplate->setVariable("DATA_FIELD_2"," ");
|
||||
$objTemplate->setVariable("DATA_REGISTERED"," ");
|
||||
$objTemplate->setVariable("DATA_ACTIVE"," ");
|
||||
$objTemplate->setVariable("DATA_FILE"," ");
|
||||
$objTemplate->setVariable("PICTURE_CLASS","elementHide");
|
||||
$objTemplate->setVariable("DOMAIN_SPECIAL"," ");
|
||||
$objTemplate->setVariable("SORT_BY",$this->intSortBy);
|
||||
// Inserting data values
|
||||
if ($intDataCount != 0) {
|
||||
for ($i=0;$i<$intDataCount;$i++) {
|
||||
// Get biggest and smalest value
|
||||
if ($i == 0) {$y = $arrData[$i]['id']; $z = $arrData[$i]['id'];}
|
||||
if ($arrData[$i]['id'] < $y) $y = $arrData[$i]['id'];
|
||||
if ($arrData[$i]['id'] > $z) $z = $arrData[$i]['id'];
|
||||
$objTemplate->setVariable("MAX_ID",$z);
|
||||
$objTemplate->setVariable("MIN_ID",$y);
|
||||
// Line colours
|
||||
$strClassL = "tdld"; $strClassM = "tdmd";
|
||||
if ($i%2 == 1) {$strClassL = "tdlb"; $strClassM = "tdmb";}
|
||||
if ((isset($arrData[$i]['register'])) && ($arrData[$i]['register'] == 0)) {$strRegister = translate('No');} else {$strRegister = translate('Yes');}
|
||||
if ($arrData[$i]['active'] == 0) {$strActive = translate('No');} else {$strActive = translate('Yes');}
|
||||
// Get file date for hosts and services
|
||||
$intTimeInfo = 0;
|
||||
if ($this->strTableName == "tbl_host") {
|
||||
$intReturn = $this->myConfigClass->lastModifiedDir($this->strTableName,$arrData[$i]['host_name'],$arrData[$i]['id'],$arrTimeData,$intTimeInfo);
|
||||
if ($intReturn == 1) $this->strErrorMessage = $this->myConfigClass->strErrorMessage;
|
||||
}
|
||||
if ($this->strTableName == "tbl_service") {
|
||||
$intReturn = $this->myConfigClass->lastModifiedDir($this->strTableName,$arrData[$i]['config_name'],$arrData[$i]['id'],$arrTimeData,$intTimeInfo);
|
||||
if ($intReturn == 1) $this->strErrorMessage = $this->myConfigClass->strErrorMessage;
|
||||
}
|
||||
// Set datafields
|
||||
foreach($this->arrDescription AS $elem) {
|
||||
$objTemplate->setVariable($elem['name'],$elem['string']);
|
||||
}
|
||||
if ($arrData[$i][$strField1] == '') $arrData[$i][$strField1] = "NOT DEFINED - ".$arrData[$i]['id'];
|
||||
$objTemplate->setVariable("DATA_FIELD_1",htmlentities($arrData[$i][$strField1],ENT_COMPAT,'UTF-8'));
|
||||
$objTemplate->setVariable("DATA_FIELD_1S",addslashes(htmlentities($arrData[$i][$strField1],ENT_COMPAT,'UTF-8')));
|
||||
if ($strField2 == 'process_field') {
|
||||
$arrData[$i]['process_field'] = $this->processField2($arrData[$i],$this->strTableName);
|
||||
} else {
|
||||
$objTemplate->setVariable("DATA_FIELD_2S",addslashes(htmlentities($arrData[$i][$strField2],ENT_COMPAT,'UTF-8')));
|
||||
}
|
||||
if ($intLimit2 != 0) {
|
||||
if (strlen($arrData[$i][$strField2]) > $intLimit2) {$strAdd = " ...";} else {$strAdd = "";}
|
||||
$objTemplate->setVariable("DATA_FIELD_2",htmlentities(substr($arrData[$i][$strField2],0,$intLimit2),ENT_COMPAT,'UTF-8').$strAdd);
|
||||
} else {
|
||||
$objTemplate->setVariable("DATA_FIELD_2",htmlentities($arrData[$i][$strField2],ENT_COMPAT,'UTF-8'));
|
||||
}
|
||||
$objTemplate->setVariable("DATA_REGISTERED",$strRegister);
|
||||
if (substr_count($this->strTableName,'template') != 0) $objTemplate->setVariable("DATA_REGISTERED","-");
|
||||
$objTemplate->setVariable("DATA_ACTIVE",$strActive);
|
||||
$objTemplate->setVariable("DATA_FILE","<span class=\"redmessage\">".translate('out-of-date')."</span>");
|
||||
if ($intTimeInfo == 4) $objTemplate->setVariable("DATA_FILE",translate('no target'));
|
||||
if ($intTimeInfo == 3) $objTemplate->setVariable("DATA_FILE","<span class=\"greenmessage\">".translate('missed')."</span>");
|
||||
if ($intTimeInfo == 2) $objTemplate->setVariable("DATA_FILE","<span class=\"redmessage\">".translate('missed')."</span>");
|
||||
if ($intTimeInfo == 1) $objTemplate->setVariable("DATA_FILE","<span class=\"redmessage\">".translate('out-of-date')."</span>");
|
||||
if ($intTimeInfo == 0) $objTemplate->setVariable("DATA_FILE",translate('up-to-date'));
|
||||
$objTemplate->setVariable("LINE_ID",$arrData[$i]['id']);
|
||||
$objTemplate->setVariable("CELLCLASS_L",$strClassL);
|
||||
$objTemplate->setVariable("CELLCLASS_M",$strClassM);
|
||||
$objTemplate->setVariable("IMAGE_PATH",$this->arrSettings['path']['base_url']."images/");
|
||||
$objTemplate->setVariable("PICTURE_CLASS","elementShow");
|
||||
$objTemplate->setVariable("DOMAIN_SPECIAL","");
|
||||
$objTemplate->setVariable("DISABLED","");
|
||||
// Disable common domain objects
|
||||
if (isset($arrData[$i]['config_id'])) {
|
||||
if ($arrData[$i]['config_id'] != $this->intDomainId) {
|
||||
$objTemplate->setVariable("PICTURE_CLASS","elementHide");
|
||||
$objTemplate->setVariable("DOMAIN_SPECIAL"," [common]");
|
||||
$objTemplate->setVariable("DISABLED","disabled");
|
||||
} else {
|
||||
// Inactive items should not be written/downloaded
|
||||
if ($arrData[$i]['active'] == 0) $objTemplate->setVariable("ACTIVE_CONTROL","elementHide");
|
||||
}
|
||||
}
|
||||
// Check access rights for list objects
|
||||
if (isset($arrData[$i]['access_group'])) {
|
||||
if ($this->myVisClass->checkAccGroup($arrData[$i]['access_group'],'write') != 0) $objTemplate->setVariable("LINE_CONTROL","elementHide");
|
||||
} else {
|
||||
if ($this->intGlobalWriteAccess != 0) $objTemplate->setVariable("LINE_CONTROL","elementHide");
|
||||
}
|
||||
// Check global access rights for list objects
|
||||
if ($this->intGlobalWriteAccess != 0) $objTemplate->setVariable("LINE_CONTROL","elementHide");
|
||||
$objTemplate->parse($strTplRow);
|
||||
}
|
||||
} else {
|
||||
$objTemplate->setVariable("IMAGE_PATH",$this->arrSettings['path']['base_url']."images/");
|
||||
$objTemplate->parse($strTplRow);
|
||||
}
|
||||
$objTemplate->setVariable("BUTTON_CLASS","elementShow");
|
||||
if ($this->intDomainId == 0) $objTemplate->setVariable("BUTTON_CLASS","elementHide");
|
||||
// Check access rights for adding new objects
|
||||
if ($this->intGlobalWriteAccess != 0) $objTemplate->setVariable("ADD_CONTROL","disabled=\"disabled\"");
|
||||
// Show page numbers
|
||||
$objTemplate->setVariable("PAGES",$this->myVisClass->buildPageLinks(filter_var($_SERVER['PHP_SELF'], FILTER_SANITIZE_STRING),$intLineCount,$this->intLimit,$this->intSortBy,$this->strSortDir));
|
||||
$objTemplate->parse($strTplPart);
|
||||
$objTemplate->show($strTplPart);
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Function: Display information messages
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Parameter: $objTemplate Form template object
|
||||
// $strErrorMessage String including error messages
|
||||
// $strInfoMessage String including information messages
|
||||
// $strConsistMessage String including consistency messages
|
||||
// $arrTimeData Array including time data
|
||||
// $strTimeInfoString String including time information message
|
||||
// $intNoTime Status value for showing time information (0=show time)
|
||||
//
|
||||
// Return values: none
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
function showMessages($objTemplate,$strErrorMessage,$strInfoMessage,$strConsistMessage,$arrTimeData,$strTimeInfoString,$intNoTime=0) {
|
||||
// Display info messages
|
||||
if ($strInfoMessage != "") {
|
||||
$objTemplate->setVariable("INFOMESSAGE",$strInfoMessage);
|
||||
$objTemplate->parse('infomessage');
|
||||
}
|
||||
// Display error messages
|
||||
if ($strErrorMessage != "") {
|
||||
$objTemplate->setVariable("ERRORMESSAGE",$strErrorMessage);
|
||||
$objTemplate->parse('errormessage');
|
||||
}
|
||||
// Display time informations
|
||||
if (($this->intDomainId != 0) && ($intNoTime == 0)) {
|
||||
foreach($arrTimeData AS $key => $elem) {
|
||||
if ($key == 'table') {
|
||||
$objTemplate->setVariable("LAST_MODIFIED_TABLE",translate('Last database update:')." <b>".$elem."</b>");
|
||||
$objTemplate->parse('table_time');
|
||||
} else {
|
||||
$objTemplate->setVariable("LAST_MODIFIED_FILE",translate('Last file change of the configuration target ')." <i>".$key."</i>: <b>".$elem."</b>");
|
||||
$objTemplate->parse('file_time');
|
||||
}
|
||||
}
|
||||
if ($strTimeInfoString != "") {
|
||||
$objTemplate->setVariable("MODIFICATION_STATUS",$strTimeInfoString);
|
||||
$objTemplate->parse('modification_status');
|
||||
}
|
||||
}
|
||||
// Display consistency messages
|
||||
if ($strConsistMessage != "") {
|
||||
$objTemplate->setVariable("CONSIST_USAGE",$strConsistMessage);
|
||||
$objTemplate->parse('consistency');
|
||||
}
|
||||
$objTemplate->parse("msgfooter");
|
||||
$objTemplate->show("msgfooter");
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Function: Display page footer
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Parameter: $objTemplate Form template object
|
||||
// $setFileVersion NagiosQL version
|
||||
//
|
||||
// Return values: none
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
function showFooter($objTemplate,$setFileVersion) {
|
||||
$objTemplate->setVariable("VERSION_INFO","<a href='http://www.nagiosql.org' target='_blank'>NagiosQL</a> $setFileVersion");
|
||||
$objTemplate->parse("footer");
|
||||
$objTemplate->show("footer");
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// --- HELP functions ---
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Function: Process list view field 2
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Parameter: $arrData Data array
|
||||
// $strTableName Table name
|
||||
//
|
||||
// Return values: String includung field 2 data
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
function processField2($arrData,$strTableName) {
|
||||
$strField = "";
|
||||
// Hostdependency table
|
||||
if ($strTableName == "tbl_hostdependency") {
|
||||
if ($arrData['dependent_host_name'] != 0) {
|
||||
$strSQLHost = "SELECT `host_name`, `exclude` FROM `tbl_host` LEFT JOIN `tbl_lnkHostdependencyToHost_DH` ON `id`=`idSlave`
|
||||
WHERE `idMaster`=".$arrData['id']." ORDER BY `host_name`";
|
||||
$booReturn = $this->myDBClass->getDataArray($strSQLHost,$arrDataHosts,$intDCHost);
|
||||
if ($intDCHost != 0) {
|
||||
foreach($arrDataHosts AS $elem) {
|
||||
if ($elem['exclude'] == 1) {
|
||||
$strField .= "H:!".$elem['host_name'].",";
|
||||
} else {
|
||||
$strField .= "H:".$elem['host_name'].",";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($arrData['dependent_hostgroup_name'] != 0) {
|
||||
$strSQLHost = "SELECT `hostgroup_name`, `exclude` FROM `tbl_hostgroup` LEFT JOIN `tbl_lnkHostdependencyToHostgroup_DH` ON `id`=`idSlave`
|
||||
WHERE `idMaster`=".$arrData['id']." ORDER BY `hostgroup_name`";
|
||||
$booReturn = $this->myDBClass->getDataArray($strSQLHost,$arrDataHostgroups,$intDCHostgroup);
|
||||
if ($intDCHostgroup != 0) {
|
||||
foreach($arrDataHostgroups AS $elem) {
|
||||
if ($elem['exclude'] == 1) {
|
||||
$strField .= "HG:!".$elem['hostgroup_name'].",";
|
||||
} else {
|
||||
$strField .= "HG:".$elem['hostgroup_name'].",";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Hostescalation table
|
||||
if ($strTableName == "tbl_hostescalation") {
|
||||
if ($arrData['host_name'] != 0) {
|
||||
$strSQLHost = "SELECT `host_name` FROM `tbl_host` LEFT JOIN `tbl_lnkHostescalationToHost` ON `id`=`idSlave`
|
||||
WHERE `idMaster`=".$arrData['id']." ORDER BY `host_name`";
|
||||
$booReturn = $this->myDBClass->getDataArray($strSQLHost,$arrDataHosts,$intDCHost);
|
||||
if ($intDCHost != 0) {
|
||||
foreach($arrDataHosts AS $elem) {
|
||||
$strField .= "H:".$elem['host_name'].",";
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($arrData['hostgroup_name'] != 0) {
|
||||
$strSQLHost = "SELECT `hostgroup_name` FROM `tbl_hostgroup` LEFT JOIN `tbl_lnkHostescalationToHostgroup` ON `id`=`idSlave`
|
||||
WHERE `idMaster`=".$arrData['id']." ORDER BY `hostgroup_name`";
|
||||
$booReturn = $this->myDBClass->getDataArray($strSQLHost,$arrDataHostgroups,$intDCHostgroup);
|
||||
if ($intDCHostgroup != 0) {
|
||||
foreach($arrDataHostgroups AS $elem) {
|
||||
$strField .= "HG:".$elem['hostgroup_name'].",";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Servicedependency table
|
||||
if ($strTableName == "tbl_servicedependency") {
|
||||
if ($arrData['dependent_service_description'] == 2) {
|
||||
$strField .= "*";
|
||||
} else if ($arrData['dependent_service_description'] != 0) {
|
||||
$strSQLService = "SELECT `strSlave` FROM `tbl_lnkServicedependencyToService_DS` WHERE `idMaster`=".$arrData['id']." ORDER BY `strSlave`";
|
||||
$booReturn = $this->myDBClass->getDataArray($strSQLService,$arrDataService,$intDCService);
|
||||
if ($intDCService != 0) {
|
||||
foreach($arrDataService AS $elem) {
|
||||
$strField .= $elem['strSlave'].",";
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($strField == "") {
|
||||
$strSQLService = "SELECT `servicegroup_name` FROM `tbl_servicegroup`
|
||||
LEFT JOIN `tbl_lnkServicedependencyToServicegroup_DS` ON `idSlave`=`id`
|
||||
WHERE `idMaster`=".$arrData['id']." ORDER BY `servicegroup_name`";
|
||||
$booReturn = $this->myDBClass->getDataArray($strSQLService,$arrDataService,$intDCService);
|
||||
if ($intDCService != 0) {
|
||||
foreach($arrDataService AS $elem) {
|
||||
$strField .= $elem['servicegroup_name'].",";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Serviceescalation table
|
||||
if ($strTableName == "tbl_serviceescalation") {
|
||||
if ($arrData['service_description'] == 2) {
|
||||
$strField .= "*";
|
||||
} else if ($arrData['service_description'] != 0) {
|
||||
$strSQLService = "SELECT `strSlave` FROM `tbl_lnkServiceescalationToService` WHERE `idMaster`=".$arrData['id'];
|
||||
$booReturn = $this->myDBClass->getDataArray($strSQLService,$arrDataServices,$intDCServices);
|
||||
if ($intDCServices != 0) {
|
||||
foreach($arrDataServices AS $elem) {
|
||||
$strField .= $elem['strSlave'].",";
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($strField == "") {
|
||||
$strSQLService = "SELECT `servicegroup_name` FROM `tbl_servicegroup`
|
||||
LEFT JOIN `tbl_lnkServiceescalationToServicegroup` ON `idSlave`=`id`
|
||||
WHERE `idMaster`=".$arrData['id']." ORDER BY `servicegroup_name`";
|
||||
$booReturn = $this->myDBClass->getDataArray($strSQLService,$arrDataService,$intDCService);
|
||||
if ($intDCService != 0) {
|
||||
foreach($arrDataService AS $elem) {
|
||||
$strField .= $elem['servicegroup_name'].",";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Some string manipulations - remove comma on line end
|
||||
if (substr($strField,-1) == ',') $strField = substr($strField,0,-1);
|
||||
return($strField);
|
||||
}
|
||||
}
|
||||
?>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,440 +0,0 @@
|
||||
<?php
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Common utilities
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (c) 2005-2017 by Martin Willisegger
|
||||
//
|
||||
// Project : Common scripts
|
||||
// Component : MySQLi data processing class
|
||||
// Date : $LastChangedDate: 2017-06-22 13:39:15 +0200 (Thu, 22 Jun 2017) $
|
||||
// Author : $LastChangedBy: martin $
|
||||
// Version : 3.3.0
|
||||
// Revision : $LastChangedRevision: 7 $
|
||||
// SVN-ID : $Id: mysqli_class.php 7 2017-06-22 11:39:15Z martin $
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Class: Common database functions for MySQL (mysqli database module)
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Includes any functions to communicate with an MySQL database server
|
||||
//
|
||||
// Name: mysqlidb
|
||||
//
|
||||
// Class variables: $arrParams Array including the server settings
|
||||
// ---------------- $strErrorMessage Database error string
|
||||
// $error Boolean - Error true/false
|
||||
// $strDBId Database connection id
|
||||
// $intLastId ID of last dataset
|
||||
// $intAffectedRows Counter variable of all affected data dows
|
||||
// $booSSLuse Use SSL connection
|
||||
// (INSERT/DELETE/UPDATE)
|
||||
//
|
||||
// Parameters: $arrParams['server'] -> DB server name
|
||||
// ----------- $arrParams['port'] -> DB server port
|
||||
// $arrParams['user'] -> DB server username
|
||||
// $arrParams['password'] -> DB server password
|
||||
// $arrParams['database'] -> DB server database name
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
class mysqlidb {
|
||||
// Define class variables
|
||||
var $error = false; // Will be filled in functions
|
||||
var $strDBId = ""; // Will be filled in functions
|
||||
var $intLastId = 0; // Will be filled in functions
|
||||
var $intAffectedRows = 0; // Will be filled in functions
|
||||
var $strErrorMessage = ""; // Will be filled in functions
|
||||
var $booSSLuse = false; // Defines if SSL is used or not
|
||||
var $arrParams = ""; // Must be filled in while initialization
|
||||
var $arrSQLdef = ""; // Must be filled in while initialization
|
||||
var $strSQLQuote1 = "`"; // Quote char for table or row names
|
||||
var $strSQLQuote2 = "'"; // Quote char for table or row names
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Class constructor
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Activities during initialisation
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
function __construct() {
|
||||
$this->arrParams['server'] = "";
|
||||
$this->arrParams['port'] = 0;
|
||||
$this->arrParams['username'] = "";
|
||||
$this->arrParams['password'] = "";
|
||||
$this->arrParams['database'] = "";
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Function: Connect to database
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Opens a connection to the database server and select a database
|
||||
//
|
||||
//
|
||||
// Return value: true successful
|
||||
// false error
|
||||
// Status message is stored in class variable $this->strErrorMessage
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
function getdatabase() {
|
||||
$this->dbconnect();
|
||||
if ($this->error == true) {
|
||||
return false;
|
||||
}
|
||||
$this->dbselect();
|
||||
if ($this->error == true) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Function: Get a single dataset field value
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Sends an SQL statement to the server and returns the result of the first data field
|
||||
//
|
||||
// Parameters: $strSQL SQL Statement
|
||||
//
|
||||
// Return value: <data> = successful
|
||||
// <empty> = error
|
||||
// Status message is stored in class variable $this->strErrorMessage
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
function getFieldData($strSQL) {
|
||||
// Reset error variables
|
||||
$this->strErrorMessage = "";
|
||||
$this->error = false;
|
||||
// Send the SQL statement to the server
|
||||
$resQuery = mysqli_query($this->strDBId,$strSQL);
|
||||
// Error processing
|
||||
if ($resQuery && (mysqli_num_rows($resQuery) != 0) && (mysqli_error($this->strDBId) == "")) {
|
||||
// Return the field value from position 0/0
|
||||
$arrDataset = mysqli_fetch_array($resQuery,MYSQLI_NUM);
|
||||
return $arrDataset[0];
|
||||
} else if (mysqli_error($this->strDBId) != "") {
|
||||
$this->strErrorMessage .= mysqli_error($this->strDBId)."::";
|
||||
$this->error = true;
|
||||
return("");
|
||||
}
|
||||
return("");
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Function: Get a single dataset
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Sends an SQL statement to the server and returns the result of the first data set
|
||||
//
|
||||
// Parameters: $strSQL SQL Statement
|
||||
// $arrDataset Return value including the data set
|
||||
//
|
||||
// Return value: true = successful
|
||||
// false = error
|
||||
// Status message is stored in class variable $this->strErrorMessage
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
function getSingleDataset($strSQL,&$arrDataset) {
|
||||
$arrDataset = "";
|
||||
// Reset error variables
|
||||
$this->strErrorMessage = "";
|
||||
$this->error = false;
|
||||
// Send the SQL statement to the server
|
||||
$resQuery = mysqli_query($this->strDBId,$strSQL);
|
||||
// Error processing
|
||||
if ($resQuery && (mysqli_num_rows($resQuery) != 0) && (mysqli_error($this->strDBId) == "")) {
|
||||
// Put the values into the array
|
||||
$arrDataset = mysqli_fetch_array($resQuery,MYSQLI_ASSOC);
|
||||
return true;
|
||||
} else if (mysqli_error($this->strDBId) != "") {
|
||||
$this->strErrorMessage .= mysqli_error($this->strDBId)."::";
|
||||
$this->error = true;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Function: Get a full data part
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Sends an SQL statement to the server and returns the result inside a data array
|
||||
//
|
||||
// Parameters: $strSQL SQL Statement
|
||||
// $arrDataset Return value including the data records
|
||||
// $intDataCount Return value including the number of the records
|
||||
//
|
||||
// Return value: true = successful
|
||||
// false = error
|
||||
// Status message is stored in class variable $this->strErrorMessage
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
function getDataArray($strSQL,&$arrDataset,&$intDataCount) {
|
||||
$arrDataset = "";
|
||||
$intDataCount = 0;
|
||||
// Reset error variables
|
||||
$this->strErrorMessage = "";
|
||||
$this->error = false;
|
||||
// Send the SQL statement to the server
|
||||
$resQuery = mysqli_query($this->strDBId,$strSQL);
|
||||
// Error processing
|
||||
if ($resQuery && (mysqli_num_rows($resQuery) != 0) && (mysqli_error($this->strDBId) == "")) {
|
||||
$intDataCount = mysqli_num_rows($resQuery);
|
||||
$i = 0;
|
||||
// Put the values into the array
|
||||
while ($arrDataTemp = mysqli_fetch_array($resQuery,MYSQLI_ASSOC)) {
|
||||
foreach ($arrDataTemp AS $key => $value) {
|
||||
$arrDataset[$i][$key] = $value;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
return true;
|
||||
} else if (mysqli_error($this->strDBId) != "") {
|
||||
$this->strErrorMessage .= mysqli_error($this->strDBId)."::";
|
||||
$this->error = true;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Function: Insert/update/delete data
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Insert/update or delete data
|
||||
//
|
||||
// Parameters: $strSQL SQL Statement
|
||||
// $this->intLastId Dataset insert ID
|
||||
// $this->intAffectedRows The number of the affected records
|
||||
//
|
||||
// Return value: true = successful
|
||||
// false = error
|
||||
// Status message is stored in class variable $this->strErrorMessage
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
function insertData($strSQL) {
|
||||
// Reset error variables
|
||||
$this->strErrorMessage = "";
|
||||
$this->error = false;
|
||||
// Send the SQL statement to the server
|
||||
$resQuery = mysqli_query($this->strDBId,$strSQL);
|
||||
// Error processing
|
||||
if (mysqli_error($this->strDBId) == "") {
|
||||
$this->intLastId = mysqli_insert_id($this->strDBId);
|
||||
$this->intAffectedRows = mysqli_affected_rows($this->strDBId);
|
||||
return true;
|
||||
} else {
|
||||
$this->strErrorMessage .= mysqli_error($this->strDBId)."::";
|
||||
$this->error = true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Function: Counts data rows
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Counts the number of records
|
||||
//
|
||||
// Parameters: $strSQL SQL Statement
|
||||
//
|
||||
// Return value: <number> = successful
|
||||
// 0 = no datasets or error
|
||||
// Status message is stored in class variable $this->strErrorMessage
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
function countRows($strSQL) {
|
||||
// Reset error variables
|
||||
$this->strErrorMessage = "";
|
||||
$this->error = false;
|
||||
// Send the SQL statement to the server
|
||||
$resQuery = mysqli_query($this->strDBId,$strSQL);
|
||||
// Error processing
|
||||
if ($resQuery && (mysqli_error($this->strDBId) == "")) {
|
||||
return mysqli_num_rows($resQuery);
|
||||
} else {
|
||||
$this->strErrorMessage .= mysqli_error($this->strDBId);
|
||||
$this->error = true;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Function: Use mysqli_real_escape_string
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Returns a safe insert string for database manipulations
|
||||
//
|
||||
// Value: $strInput Input String
|
||||
//
|
||||
// Return value: $strOutput Output String
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
function real_escape($strInput) {
|
||||
return mysqli_real_escape_string($this->strDBId,$strInput);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Assistant functions
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Function: Initialize a mysql database connection
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Return value: true
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
function dbinit() {
|
||||
$this->strDBId = mysqli_init();
|
||||
return true;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Function: Connect to database server
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Parameters: $dbserver Server name
|
||||
// $dbuser Database user
|
||||
// $dbpasswd Database password
|
||||
// $dbname Database name
|
||||
// $dbport TCP port
|
||||
//
|
||||
// Return value: true successful
|
||||
// false error
|
||||
// Status message is stored in class variable $this->strErrorMessage
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
function dbconnect($dbserver=NULL,$dbport=NULL,$dbuser=NULL,$dbpasswd=NULL) {
|
||||
// Reset error variables
|
||||
$this->strErrorMessage = "";
|
||||
$this->error = false;
|
||||
// Get parameters
|
||||
if ($dbserver == NULL) $dbserver = $this->arrParams['server'];
|
||||
if ($dbport == NULL) $dbport = $this->arrParams['port'];
|
||||
if ($dbuser == NULL) $dbuser = $this->arrParams['username'];
|
||||
if ($dbpasswd == NULL) $dbpasswd = $this->arrParams['password'];
|
||||
// Not all parameters available
|
||||
if (($dbserver == "") || ($dbuser == "") || ($dbpasswd == "")) {
|
||||
$this->strErrorMessage .= gettext("Missing server connection parameter!")."::";
|
||||
$this->error = true;
|
||||
return false;
|
||||
}
|
||||
$this->dbinit();
|
||||
if ($this->booSSLuse == true) {
|
||||
// TO BE DEFINED
|
||||
}
|
||||
$intErrorReporting = error_reporting();
|
||||
error_reporting(0);
|
||||
if ($dbport == 0) {
|
||||
$booReturn = mysqli_real_connect($this->strDBId,$dbserver,$dbuser,$dbpasswd);
|
||||
} else {
|
||||
$booReturn = mysqli_real_connect($this->strDBId,$dbserver,$dbuser,$dbpasswd,NULL,$dbport);
|
||||
}
|
||||
$arrError = error_get_last();
|
||||
error_reporting($intErrorReporting);
|
||||
// Connection fails
|
||||
if($booReturn == false) {
|
||||
$this->strErrorMessage = "[".$dbserver."] ".gettext("Connection to the database server has failed by reason:")." ::";
|
||||
if (mysqli_connect_error($this->strDBId) != "") $this->strErrorMessage .= mysqli_connect_error($this->strDBId)."::";
|
||||
$this->error = true;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Function: select database
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Parameters: $database Database name
|
||||
//
|
||||
// Return value: true = successful
|
||||
// false = error
|
||||
// Status message is stored in class variable $this->strErrorMessage
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
function dbselect($database=NULL) {
|
||||
// Reset error variables
|
||||
$this->strErrorMessage = "";
|
||||
$this->error = false;
|
||||
// Get parameters
|
||||
if ($database == NULL) $database = $this->arrParams['database'];
|
||||
// Not all parameters available
|
||||
if ($database == "") {
|
||||
$this->strErrorMessage .= gettext("Missing database connection parameter!")."::";
|
||||
$this->error = true;
|
||||
return false;
|
||||
}
|
||||
$bolConnect = mysqli_select_db($this->strDBId,$database);
|
||||
// Session cannot be etablished
|
||||
if(!$bolConnect) {
|
||||
$this->strErrorMessage .= "[".$database."] ".gettext("Connection to the database has failed by reason:")." ::";
|
||||
$this->strErrorMessage .= mysqli_error($this->strDBId)."::";
|
||||
$this->error = true;
|
||||
return false;
|
||||
}
|
||||
$resQuery = mysqli_query($this->strDBId,"set names 'utf8'");
|
||||
if (mysqli_error($this->strDBId) != "") {
|
||||
$this->strErrorMessage .= mysqli_error($this->strDBId)."::";
|
||||
$this->error = true;
|
||||
return false;
|
||||
}
|
||||
$resQuery = mysqli_query($this->strDBId,"set session sql_mode = 'NO_ENGINE_SUBSTITUTION'");
|
||||
if (mysqli_error($this->strDBId) != "") {
|
||||
$this->strErrorMessage .= mysqli_error($this->strDBId)."::";
|
||||
$this->error = true;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Function: Set SSL parameters
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Parameters: $sslkey SSL key
|
||||
// $sslcert SSL certificate
|
||||
// $sslca SSL CA file (optional)
|
||||
// $sslpath SSL certificate path (optional)
|
||||
// $sslcypher SSL cypher (optional)
|
||||
//
|
||||
// Return value: true successful
|
||||
// The mysqli_ssl_set function always returns TRUE!
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
function dbsetssl($sslkey,$sslcert,$sslca=NULL,$sslpath=NULL,$sslcypher=NULL) {
|
||||
// Reset error variables
|
||||
$this->strErrorMessage = "";
|
||||
$this->error = false;
|
||||
// Values are missing
|
||||
if (($sslkey == "") || ($sslcert == "")) {
|
||||
$this->strErrorMessage = gettext("Missing MySQL SSL parameter!")."::";
|
||||
$this->error = true;
|
||||
return false;
|
||||
}
|
||||
mysqli_ssl_set($this->strDBId,$sslkey,$sslcert,$sslca,$sslpath,$sslcypher);
|
||||
return true;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Function: Close database server connectuon
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Value: none
|
||||
//
|
||||
// Return value: true if successful, false if failed
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
function dbdisconnect() {
|
||||
mysqli_close($this->strDBId);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
?>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -2,517 +2,539 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// NagiosQL
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (c) 2005-2017 by Martin Willisegger
|
||||
// (c) 2005-2018 by Martin Willisegger
|
||||
//
|
||||
// Project : NagiosQL
|
||||
// Component : Preprocessing script for content pages
|
||||
// Website : http://www.nagiosql.org
|
||||
// Date : $LastChangedDate: 2017-06-22 09:53:38 +0200 (Thu, 22 Jun 2017) $
|
||||
// Author : $LastChangedBy: martin $
|
||||
// Version : 3.3.0
|
||||
// Revision : $LastChangedRevision: 5 $
|
||||
// Website : https://sourceforge.net/projects/nagiosql/
|
||||
// Version : 3.4.0
|
||||
// GIT Repo : https://gitlab.com/wizonet/NagiosQL
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Define common variables
|
||||
// =======================
|
||||
$intLineCount = 0; // Database line count
|
||||
$intWriteAccessId = 0; // Write access to data id ($chkDataId)
|
||||
$intReadAccessId = 0; // Read access to data id ($chkListId)
|
||||
$intDataWarning = 0; // Missing data indicator
|
||||
$intNoTime = 0; // Show modified time list (0=show)
|
||||
$strSearchWhere = ""; // SQL WHERE addon for searching
|
||||
$strSearchWhere2 = ""; // SQL WHERE addon for configuration selection list
|
||||
$intLineCount = 0; // Database line count
|
||||
$intWriteAccessId = 0; // Write access to data id ($chkDataId)
|
||||
$intReadAccessId = 0; // Read access to data id ($chkListId)
|
||||
$intDataWarning = 0; // Missing data indicator
|
||||
$intNoTime = 0; // Show modified time list (0=show)
|
||||
$strSearchWhere = ''; // SQL WHERE addon for searching
|
||||
$strSearchWhere2 = ''; // SQL WHERE addon for configuration selection list
|
||||
$chkTfValue3 = '';
|
||||
$chkTfValue5 = '';
|
||||
//
|
||||
// Define missing variables used in this prepend file
|
||||
// ==================================================
|
||||
if (!isset($preTableName)) $preTableName = ""; // Predefined variable table name
|
||||
if (!isset($preSearchSession)) $preSearchSession = ""; // Predefined variable search session
|
||||
if (!isset($preTableName)) {
|
||||
$preTableName = '';
|
||||
} // Predefined variable table name
|
||||
if (!isset($preSearchSession)) {
|
||||
$preSearchSession = '';
|
||||
} // Predefined variable search session
|
||||
//
|
||||
// Store some variables to content class
|
||||
// =====================================
|
||||
$myContentClass->intLimit = $chkLimit;
|
||||
$myContentClass->intVersion = $intVersion;
|
||||
$myContentClass->strBrowser = $preBrowser;
|
||||
$myContentClass->intGroupAdm = $chkGroupAdm;
|
||||
$myContentClass->strTableName = $preTableName;
|
||||
$myContentClass->strSearchSession = $preSearchSession;
|
||||
$myContentClass->intSortBy = $hidSortBy;
|
||||
$myContentClass->strSortDir = $hidSortDir;
|
||||
$myContentClass->intLimit = $chkLimit;
|
||||
/** @var int $intVersion - defined in prepend_adm.php */
|
||||
$myContentClass->intVersion = $intVersion;
|
||||
$myContentClass->strBrowser = $preBrowser;
|
||||
$myContentClass->intGroupAdm = $chkGroupAdm;
|
||||
$myContentClass->strTableName = $preTableName;
|
||||
$myContentClass->strSearchSession = $preSearchSession;
|
||||
$myContentClass->intSortBy = $hidSortBy;
|
||||
$myContentClass->strSortDir = $hidSortDir;
|
||||
//
|
||||
// Process get parameters
|
||||
// ======================
|
||||
$chkFromLine = isset($_GET['from_line']) ? filter_var($_GET['from_line'], FILTER_SANITIZE_NUMBER_INT) : 0;
|
||||
$chkFromLine = filter_input(INPUT_GET, 'from_line', FILTER_VALIDATE_INT, array('options' => array('default' => 0)));
|
||||
//
|
||||
// Process post parameters
|
||||
// =======================
|
||||
$chkTfSearch = isset($_POST['txtSearch']) ? $_POST['txtSearch'] : ""; // Search field
|
||||
$chkSelAccGr = isset($_POST['selAccGr']) ? $_POST['selAccGr']+0 : 0; // Access group
|
||||
$chkSelCnfName = isset($_POST['selCnfName']) ? $_POST['selCnfName'] : ""; // Config name selection field
|
||||
$chkTfSearchRaw = filter_input(INPUT_POST, 'txtSearch', FILTER_SANITIZE_STRING);
|
||||
$chkSelAccGr = filter_input(INPUT_POST, 'selAccGr', FILTER_VALIDATE_INT, array('options' => array('default' => 0)));
|
||||
$chkSelCnfName = filter_input(INPUT_POST, 'selCnfName', FILTER_SANITIZE_STRING);
|
||||
//
|
||||
$chkTfValue1 = isset($_POST['tfValue1']) ? $_POST['tfValue1'] : ""; // Common text field value
|
||||
$chkTfValue2 = isset($_POST['tfValue2']) ? $_POST['tfValue2'] : ""; // Common text field value
|
||||
$chkTfValue3 = isset($_POST['tfValue3']) ? $_POST['tfValue3'] : ""; // Common text field value
|
||||
$chkTfValue4 = isset($_POST['tfValue4']) ? $_POST['tfValue4'] : ""; // Common text field value
|
||||
$chkTfValue5 = isset($_POST['tfValue5']) ? $_POST['tfValue5'] : ""; // Common text field value
|
||||
$chkTfValue6 = isset($_POST['tfValue6']) ? $_POST['tfValue6'] : ""; // Common text field value
|
||||
$chkTfValue7 = isset($_POST['tfValue7']) ? $_POST['tfValue7'] : ""; // Common text field value
|
||||
$chkTfValue8 = isset($_POST['tfValue8']) ? $_POST['tfValue8'] : ""; // Common text field value
|
||||
$chkTfValue9 = isset($_POST['tfValue9']) ? $_POST['tfValue9'] : ""; // Common text field value
|
||||
$chkTfValue10 = isset($_POST['tfValue10']) ? $_POST['tfValue10'] : ""; // Common text field value
|
||||
$chkTfValue11 = isset($_POST['tfValue11']) ? $_POST['tfValue11'] : ""; // Common text field value
|
||||
$chkTfValue12 = isset($_POST['tfValue12']) ? $_POST['tfValue12'] : ""; // Common text field value
|
||||
$chkTfValue13 = isset($_POST['tfValue13']) ? $_POST['tfValue13'] : ""; // Common text field value
|
||||
$chkTfValue14 = isset($_POST['tfValue14']) ? $_POST['tfValue14'] : ""; // Common text field value
|
||||
$chkTfValue15 = isset($_POST['tfValue15']) ? $_POST['tfValue15'] : ""; // Common text field value
|
||||
$chkTfValue16 = isset($_POST['tfValue16']) ? $_POST['tfValue16'] : ""; // Common text field value
|
||||
$chkTfValue17 = isset($_POST['tfValue17']) ? $_POST['tfValue17'] : ""; // Common text field value
|
||||
$chkTfValue18 = isset($_POST['tfValue18']) ? $_POST['tfValue18'] : ""; // Common text field value
|
||||
$chkTfValue19 = isset($_POST['tfValue19']) ? $_POST['tfValue19'] : ""; // Common text field value
|
||||
$chkTfValue20 = isset($_POST['tfValue20']) ? $_POST['tfValue20'] : ""; // Common text field value
|
||||
$chkTfArg1 = isset($_POST['tfArg1']) ? $_POST['tfArg1'] : ""; // Common argument text field value
|
||||
$chkTfArg2 = isset($_POST['tfArg2']) ? $_POST['tfArg2'] : ""; // Common argument text field value
|
||||
$chkTfArg3 = isset($_POST['tfArg3']) ? $_POST['tfArg3'] : ""; // Common argument text field value
|
||||
$chkTfArg4 = isset($_POST['tfArg4']) ? $_POST['tfArg4'] : ""; // Common argument text field value
|
||||
$chkTfArg5 = isset($_POST['tfArg5']) ? $_POST['tfArg5'] : ""; // Common argument text field value
|
||||
$chkTfArg6 = isset($_POST['tfArg6']) ? $_POST['tfArg6'] : ""; // Common argument text field value
|
||||
$chkTfArg7 = isset($_POST['tfArg7']) ? $_POST['tfArg7'] : ""; // Common argument text field value
|
||||
$chkTfArg8 = isset($_POST['tfArg8']) ? $_POST['tfArg8'] : ""; // Common argument text field value
|
||||
$chkMselValue1 = isset($_POST['mselValue1']) ? $_POST['mselValue1'] : array(""); // Common multi select field value
|
||||
$chkMselValue2 = isset($_POST['mselValue2']) ? $_POST['mselValue2'] : array(""); // Common multi select field value
|
||||
$chkMselValue3 = isset($_POST['mselValue3']) ? $_POST['mselValue3'] : array(""); // Common multi select field value
|
||||
$chkMselValue4 = isset($_POST['mselValue4']) ? $_POST['mselValue4'] : array(""); // Common multi select field value
|
||||
$chkMselValue5 = isset($_POST['mselValue5']) ? $_POST['mselValue5'] : array(""); // Common multi select field value
|
||||
$chkMselValue6 = isset($_POST['mselValue6']) ? $_POST['mselValue6'] : array(""); // Common multi select field value
|
||||
$chkMselValue7 = isset($_POST['mselValue7']) ? $_POST['mselValue7'] : array(""); // Common multi select field value
|
||||
$chkMselValue8 = isset($_POST['mselValue8']) ? $_POST['mselValue8'] : array(""); // Common multi select field value
|
||||
$chkChbValue1 = isset($_POST['chbValue1']) ? $_POST['chbValue1']+0 : 0; // Common checkbox field value
|
||||
$chkChbValue2 = isset($_POST['chbValue2']) ? $_POST['chbValue2']+0 : 0; // Common checkbox field value
|
||||
$chkDatValue1 = isset($_POST['datValue1']) ? $_POST['datValue1'] : ""; // Common file selection field
|
||||
$chkTaValue1 = isset($_POST['taValue1']) ? $_POST['taValue1'] : ""; // Common text area value
|
||||
$chkTaFileText = isset($_POST['taFileText']) ? $_POST['taFileText'] : ""; // Common text area value for file import (not SQL)
|
||||
$chkSelValue1 = isset($_POST['selValue1']) ? $_POST['selValue1']+0 : 0; // Common select field value
|
||||
$chkSelValue2 = isset($_POST['selValue2']) ? $_POST['selValue2']+0 : 0; // Common select field value
|
||||
$chkSelValue3 = isset($_POST['selValue3']) ? $_POST['selValue3']+0 : 0; // Common select field value
|
||||
$chkSelValue4 = isset($_POST['selValue4']) ? $_POST['selValue4']+0 : 0; // Common select field value
|
||||
$chkSelValue5 = isset($_POST['selValue5']) ? $_POST['selValue5']+0 : 0; // Common select field value
|
||||
$chkRadValue1 = isset($_POST['radValue1']) ? $_POST['radValue1']+0 : 2; // Common radio field value
|
||||
$chkRadValue2 = isset($_POST['radValue2']) ? $_POST['radValue2']+0 : 2; // Common radio field value
|
||||
$chkRadValue3 = isset($_POST['radValue3']) ? $_POST['radValue3']+0 : 2; // Common radio field value
|
||||
$chkRadValue4 = isset($_POST['radValue4']) ? $_POST['radValue4']+0 : 2; // Common radio field value
|
||||
$chkRadValue5 = isset($_POST['radValue5']) ? $_POST['radValue5']+0 : 2; // Common radio field value
|
||||
$chkRadValue6 = isset($_POST['radValue6']) ? $_POST['radValue6']+0 : 2; // Common radio field value
|
||||
$chkRadValue7 = isset($_POST['radValue7']) ? $_POST['radValue7']+0 : 2; // Common radio field value
|
||||
$chkRadValue8 = isset($_POST['radValue8']) ? $_POST['radValue8']+0 : 2; // Common radio field value
|
||||
$chkRadValue9 = isset($_POST['radValue9']) ? $_POST['radValue9']+0 : 2; // Common radio field value
|
||||
$chkRadValue10 = isset($_POST['radValue10']) ? $_POST['radValue10']+0 : 2; // Common radio field value
|
||||
$chkRadValue11 = isset($_POST['radValue11']) ? $_POST['radValue11']+0 : 2; // Common radio field value
|
||||
$chkRadValue12 = isset($_POST['radValue12']) ? $_POST['radValue12']+0 : 2; // Common radio field value
|
||||
$chkRadValue13 = isset($_POST['radValue13']) ? $_POST['radValue13']+0 : 2; // Common radio field value
|
||||
$chkRadValue14 = isset($_POST['radValue14']) ? $_POST['radValue14']+0 : 2; // Common radio field value
|
||||
$chkRadValue15 = isset($_POST['radValue15']) ? $_POST['radValue15']+0 : 2; // Common radio field value
|
||||
$chkRadValue16 = isset($_POST['radValue16']) ? $_POST['radValue16']+0 : 2; // Common radio field value
|
||||
$chkRadValue17 = isset($_POST['radValue17']) ? $_POST['radValue17']+0 : 2; // Common radio field value
|
||||
$chkChbGr1a = isset($_POST['chbGr1a']) ? $_POST['chbGr1a']."," : ""; // Common checkbox group
|
||||
$chkChbGr1b = isset($_POST['chbGr1b']) ? $_POST['chbGr1b']."," : ""; // Common checkbox group
|
||||
$chkChbGr1c = isset($_POST['chbGr1c']) ? $_POST['chbGr1c']."," : ""; // Common checkbox group
|
||||
$chkChbGr1d = isset($_POST['chbGr1d']) ? $_POST['chbGr1d']."," : ""; // Common checkbox group
|
||||
$chkChbGr1e = isset($_POST['chbGr1e']) ? $_POST['chbGr1e']."," : ""; // Common checkbox group
|
||||
$chkChbGr1f = isset($_POST['chbGr1f']) ? $_POST['chbGr1f']."," : ""; // Common checkbox group
|
||||
$chkChbGr1g = isset($_POST['chbGr1g']) ? $_POST['chbGr1g']."," : ""; // Common checkbox group
|
||||
$chkChbGr1h = isset($_POST['chbGr1h']) ? $_POST['chbGr1h']."," : ""; // Common checkbox group
|
||||
$chkChbGr2a = isset($_POST['chbGr2a']) ? $_POST['chbGr2a']."," : ""; // Common checkbox group
|
||||
$chkChbGr2b = isset($_POST['chbGr2b']) ? $_POST['chbGr2b']."," : ""; // Common checkbox group
|
||||
$chkChbGr2c = isset($_POST['chbGr2c']) ? $_POST['chbGr2c']."," : ""; // Common checkbox group
|
||||
$chkChbGr2d = isset($_POST['chbGr2d']) ? $_POST['chbGr2d']."," : ""; // Common checkbox group
|
||||
$chkChbGr2e = isset($_POST['chbGr2e']) ? $_POST['chbGr2e']."," : ""; // Common checkbox group
|
||||
$chkChbGr2f = isset($_POST['chbGr2f']) ? $_POST['chbGr2f']."," : ""; // Common checkbox group
|
||||
$chkChbGr2g = isset($_POST['chbGr2g']) ? $_POST['chbGr2g']."," : ""; // Common checkbox group
|
||||
$chkChbGr2h = isset($_POST['chbGr2h']) ? $_POST['chbGr2h']."," : ""; // Common checkbox group
|
||||
$chkChbGr3a = isset($_POST['chbGr3a']) ? $_POST['chbGr3a']."," : ""; // Common checkbox group
|
||||
$chkChbGr3b = isset($_POST['chbGr3b']) ? $_POST['chbGr3b']."," : ""; // Common checkbox group
|
||||
$chkChbGr3c = isset($_POST['chbGr3c']) ? $_POST['chbGr3c']."," : ""; // Common checkbox group
|
||||
$chkChbGr3d = isset($_POST['chbGr3d']) ? $_POST['chbGr3d']."," : ""; // Common checkbox group
|
||||
$chkChbGr4a = isset($_POST['chbGr4a']) ? $_POST['chbGr4a']."," : ""; // Common checkbox group
|
||||
$chkChbGr4b = isset($_POST['chbGr4b']) ? $_POST['chbGr4b']."," : ""; // Common checkbox group
|
||||
$chkChbGr4c = isset($_POST['chbGr4c']) ? $_POST['chbGr4c']."," : ""; // Common checkbox group
|
||||
$chkChbGr4d = isset($_POST['chbGr4d']) ? $_POST['chbGr4d']."," : ""; // Common checkbox group
|
||||
$chkButValue1 = isset($_POST['butValue1']) ? $_POST['butValue1'] : ""; // Common button value
|
||||
$chkButValue2 = isset($_POST['butValue2']) ? $_POST['butValue2'] : ""; // Common button value
|
||||
$chkButValue3 = isset($_POST['butValue3']) ? $_POST['butValue3'] : ""; // Common button value
|
||||
$chkButValue4 = isset($_POST['butValue4']) ? $_POST['butValue4'] : ""; // Common button value
|
||||
$chkButValue5 = isset($_POST['butValue5']) ? $_POST['butValue5'] : ""; // Common button value
|
||||
$chkTfNullVal1 = (isset($_POST['tfNullVal1']) && ($_POST['tfNullVal1'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal1'])+0 : "NULL"; // Common text NULL field value
|
||||
$chkTfNullVal2 = (isset($_POST['tfNullVal2']) && ($_POST['tfNullVal2'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal2'])+0 : "NULL"; // Common text NULL field value
|
||||
$chkTfNullVal3 = (isset($_POST['tfNullVal3']) && ($_POST['tfNullVal3'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal3'])+0 : "NULL"; // Common text NULL field value
|
||||
$chkTfNullVal4 = (isset($_POST['tfNullVal4']) && ($_POST['tfNullVal4'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal4'])+0 : "NULL"; // Common text NULL field value
|
||||
$chkTfNullVal5 = (isset($_POST['tfNullVal5']) && ($_POST['tfNullVal5'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal5'])+0 : "NULL"; // Common text NULL field value
|
||||
$chkTfNullVal6 = (isset($_POST['tfNullVal6']) && ($_POST['tfNullVal6'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal6'])+0 : "NULL"; // Common text NULL field value
|
||||
$chkTfNullVal7 = (isset($_POST['tfNullVal7']) && ($_POST['tfNullVal7'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal7'])+0 : "NULL"; // Common text NULL field value
|
||||
$chkTfNullVal8 = (isset($_POST['tfNullVal8']) && ($_POST['tfNullVal8'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal8'])+0 : "NULL"; // Common text NULL field value
|
||||
// Common text field value
|
||||
for ($i = 1; $i <= 22; $i++) {
|
||||
$tmpVar = 'chkTfValue'.$i;
|
||||
$$tmpVar = filter_input(INPUT_POST, 'tfValue'.$i, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);
|
||||
if (get_magic_quotes_gpc() == 0) {
|
||||
$$tmpVar = addslashes($$tmpVar);
|
||||
}
|
||||
if (isset($$tmpVar)) {
|
||||
$$tmpVar = $myVisClass->tfSecure($$tmpVar);
|
||||
}
|
||||
}
|
||||
// Common argument text field value
|
||||
for ($i = 1; $i <= 8; $i++) {
|
||||
$tmpVar = 'chkTfArg'.$i;
|
||||
$$tmpVar = filter_input(INPUT_POST, 'tfArg'.$i, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);
|
||||
if (get_magic_quotes_gpc() == 0) {
|
||||
$$tmpVar = addslashes($$tmpVar);
|
||||
}
|
||||
if (isset($$tmpVar)) {
|
||||
$$tmpVar = $myVisClass->tfSecure($$tmpVar);
|
||||
}
|
||||
}
|
||||
|
||||
// Common multi select field value
|
||||
for ($i = 1; $i <= 8; $i++) {
|
||||
$tmpVar = 'chkMselValue'.$i;
|
||||
$tmpVar2 = 'intMselValue'.$i;
|
||||
$$tmpVar = filter_input(INPUT_POST, 'mselValue'.$i, FILTER_SANITIZE_STRING, FILTER_FORCE_ARRAY);
|
||||
// Multiselect data processing
|
||||
if ((${$tmpVar}[0] == '') || (${$tmpVar}[0] == '0')) {
|
||||
$$tmpVar2 = 0;
|
||||
} elseif (${$tmpVar}[0] == '*') {
|
||||
$$tmpVar2 = 2;
|
||||
} else {
|
||||
$$tmpVar2 = 1;
|
||||
}
|
||||
}
|
||||
// Common select field value
|
||||
for ($i = 1; $i <= 5; $i++) {
|
||||
$tmpVar = 'chkSelValue'.$i;
|
||||
$$tmpVar = filter_input(INPUT_POST, 'selValue'.$i, FILTER_VALIDATE_INT, array('options' => array('default' => 0)));
|
||||
}
|
||||
//Common radio field value
|
||||
for ($i = 1; $i <= 18; $i++) {
|
||||
$tmpVar = 'chkRadValue'.$i;
|
||||
$$tmpVar = filter_input(INPUT_POST, 'radValue'.$i, FILTER_VALIDATE_INT, array('options' => array('default' => 2)));
|
||||
}
|
||||
// Common checkbox group
|
||||
$arrChar = explode(';', 'a;b;c;d;e;f;g;h');
|
||||
for ($i = 1; $i <= 4; $i++) {
|
||||
foreach ($arrChar as $elem) {
|
||||
$tmpVar = 'chkChbGr'.$i.$elem;
|
||||
$$tmpVar = filter_input(INPUT_POST, 'chbGr'.$i.$elem, FILTER_SANITIZE_STRING);
|
||||
if ($$tmpVar != '') {
|
||||
$$tmpVar .= ',';
|
||||
}
|
||||
}
|
||||
}
|
||||
// Common button value
|
||||
for ($i = 1; $i <= 5; $i++) {
|
||||
$tmpVar = 'chkButValue'.$i;
|
||||
$$tmpVar = filter_input(INPUT_POST, 'butValue'.$i, FILTER_SANITIZE_STRING);
|
||||
}
|
||||
// Common text NULL field value
|
||||
for ($i = 1; $i <= 9; $i++) {
|
||||
$tmpVar = 'chkTfNullVal'.$i;
|
||||
$$tmpVar = filter_input(INPUT_POST, 'tfNullVal'.$i, FILTER_SANITIZE_STRING);
|
||||
if (isset($$tmpVar) && ($$tmpVar != '')) {
|
||||
$myVisClass->checkNull($$tmpVar);
|
||||
} else {
|
||||
$$tmpVar = 'NULL';
|
||||
}
|
||||
}
|
||||
// Common checkbox field value
|
||||
$chkChbValue1 = filter_input(INPUT_POST, 'chbValue1', FILTER_VALIDATE_INT, array('options' => array('default' => 0)));
|
||||
$chkChbValue2 = filter_input(INPUT_POST, 'chbValue2', FILTER_VALIDATE_INT, array('options' => array('default' => 0)));
|
||||
// Common file selection field
|
||||
$chkDatValue1 = filter_input(INPUT_POST, 'datValue1', FILTER_SANITIZE_STRING);
|
||||
// Common text area value
|
||||
$chkTaValue1Raw = filter_input(INPUT_POST, 'taValue1', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
// Common text area value for file import (not SQL)
|
||||
$chkTaFileTextRaw = filter_input(INPUT_POST, 'taFileText', FILTER_UNSAFE_RAW);
|
||||
//
|
||||
// Quote special characters
|
||||
// ==========================
|
||||
if (get_magic_quotes_gpc() == 0) {
|
||||
$chkTfSearch = addslashes($chkTfSearch);
|
||||
$chkTfValue1 = addslashes($chkTfValue1);
|
||||
$chkTfValue2 = addslashes($chkTfValue2);
|
||||
$chkTfValue3 = addslashes($chkTfValue3);
|
||||
$chkTfValue4 = addslashes($chkTfValue4);
|
||||
$chkTfValue5 = addslashes($chkTfValue5);
|
||||
$chkTfValue6 = addslashes($chkTfValue6);
|
||||
$chkTfValue7 = addslashes($chkTfValue7);
|
||||
$chkTfValue8 = addslashes($chkTfValue8);
|
||||
$chkTfValue9 = addslashes($chkTfValue9);
|
||||
$chkTfValue10 = addslashes($chkTfValue10);
|
||||
$chkTfValue11 = addslashes($chkTfValue11);
|
||||
$chkTfValue12 = addslashes($chkTfValue12);
|
||||
$chkTfValue13 = addslashes($chkTfValue13);
|
||||
$chkTfValue14 = addslashes($chkTfValue14);
|
||||
$chkTfValue15 = addslashes($chkTfValue15);
|
||||
$chkTfValue16 = addslashes($chkTfValue16);
|
||||
$chkTfValue17 = addslashes($chkTfValue17);
|
||||
$chkTfValue18 = addslashes($chkTfValue18);
|
||||
$chkTfValue19 = addslashes($chkTfValue19);
|
||||
$chkTfValue20 = addslashes($chkTfValue20);
|
||||
$chkTaValue1 = addslashes($chkTaValue1);
|
||||
$chkTfArg1 = addslashes($chkTfArg1);
|
||||
$chkTfArg2 = addslashes($chkTfArg2);
|
||||
$chkTfArg3 = addslashes($chkTfArg3);
|
||||
$chkTfArg4 = addslashes($chkTfArg4);
|
||||
$chkTfArg5 = addslashes($chkTfArg5);
|
||||
$chkTfArg6 = addslashes($chkTfArg6);
|
||||
$chkTfArg7 = addslashes($chkTfArg7);
|
||||
$chkTfArg8 = addslashes($chkTfArg8);
|
||||
$chkTaFileText = addslashes($chkTaFileText);
|
||||
$chkTfSearchRaw = addslashes($chkTfSearchRaw);
|
||||
$chkTaValue1Raw = addslashes($chkTaValue1Raw);
|
||||
$chkTaFileTextRaw = addslashes($chkTaFileTextRaw);
|
||||
}
|
||||
//
|
||||
// Security function for text fields
|
||||
// =================================
|
||||
$chkTfSearch = $myVisClass->tfSecure($chkTfSearch);
|
||||
$chkTfValue1 = $myVisClass->tfSecure($chkTfValue1);
|
||||
$chkTfValue2 = $myVisClass->tfSecure($chkTfValue2);
|
||||
$chkTfValue3 = $myVisClass->tfSecure($chkTfValue3);
|
||||
$chkTfValue4 = $myVisClass->tfSecure($chkTfValue4);
|
||||
$chkTfValue5 = $myVisClass->tfSecure($chkTfValue5);
|
||||
$chkTfValue6 = $myVisClass->tfSecure($chkTfValue6);
|
||||
$chkTfValue7 = $myVisClass->tfSecure($chkTfValue7);
|
||||
$chkTfValue8 = $myVisClass->tfSecure($chkTfValue8);
|
||||
$chkTfValue9 = $myVisClass->tfSecure($chkTfValue9);
|
||||
$chkTfValue10 = $myVisClass->tfSecure($chkTfValue10);
|
||||
$chkTfValue11 = $myVisClass->tfSecure($chkTfValue11);
|
||||
$chkTfValue12 = $myVisClass->tfSecure($chkTfValue12);
|
||||
$chkTfValue13 = $myVisClass->tfSecure($chkTfValue13);
|
||||
$chkTfValue14 = $myVisClass->tfSecure($chkTfValue14);
|
||||
$chkTfValue15 = $myVisClass->tfSecure($chkTfValue15);
|
||||
$chkTfValue16 = $myVisClass->tfSecure($chkTfValue16);
|
||||
$chkTfValue17 = $myVisClass->tfSecure($chkTfValue17);
|
||||
$chkTfValue18 = $myVisClass->tfSecure($chkTfValue18);
|
||||
$chkTfValue19 = $myVisClass->tfSecure($chkTfValue19);
|
||||
$chkTfValue20 = $myVisClass->tfSecure($chkTfValue20);
|
||||
$chkTfArg1 = $myVisClass->tfSecure($chkTfArg1);
|
||||
$chkTfArg2 = $myVisClass->tfSecure($chkTfArg2);
|
||||
$chkTfArg3 = $myVisClass->tfSecure($chkTfArg3);
|
||||
$chkTfArg4 = $myVisClass->tfSecure($chkTfArg4);
|
||||
$chkTfArg5 = $myVisClass->tfSecure($chkTfArg5);
|
||||
$chkTfArg6 = $myVisClass->tfSecure($chkTfArg6);
|
||||
$chkTfArg7 = $myVisClass->tfSecure($chkTfArg7);
|
||||
$chkTfArg8 = $myVisClass->tfSecure($chkTfArg8);
|
||||
$chkTaValue1 = $myVisClass->tfSecure($chkTaValue1);
|
||||
$chkTaFileText = stripslashes($chkTaFileText);
|
||||
//
|
||||
// Multiselect data processing
|
||||
// ===========================
|
||||
if (($chkMselValue1[0] == "") || ($chkMselValue1[0] == "0")) {$intMselValue1 = 0;} else {$intMselValue1 = 1;}
|
||||
if ($chkMselValue1[0] == "*") $intMselValue1 = 2;
|
||||
if (($chkMselValue2[0] == "") || ($chkMselValue2[0] == "0")) {$intMselValue2 = 0;} else {$intMselValue2 = 1;}
|
||||
if ($chkMselValue2[0] == "*") $intMselValue2 = 2;
|
||||
if (($chkMselValue3[0] == "") || ($chkMselValue3[0] == "0")) {$intMselValue3 = 0;} else {$intMselValue3 = 1;}
|
||||
if ($chkMselValue3[0] == "*") $intMselValue3 = 2;
|
||||
if (($chkMselValue4[0] == "") || ($chkMselValue4[0] == "0")) {$intMselValue4 = 0;} else {$intMselValue4 = 1;}
|
||||
if ($chkMselValue4[0] == "*") $intMselValue4 = 2;
|
||||
if (($chkMselValue5[0] == "") || ($chkMselValue5[0] == "0")) {$intMselValue5 = 0;} else {$intMselValue5 = 1;}
|
||||
if ($chkMselValue5[0] == "*") $intMselValue5 = 2;
|
||||
if (($chkMselValue6[0] == "") || ($chkMselValue6[0] == "0")) {$intMselValue6 = 0;} else {$intMselValue6 = 1;}
|
||||
if ($chkMselValue6[0] == "*") $intMselValue6 = 2;
|
||||
if (($chkMselValue7[0] == "") || ($chkMselValue7[0] == "0")) {$intMselValue7 = 0;} else {$intMselValue7 = 1;}
|
||||
if ($chkMselValue7[0] == "*") $intMselValue7 = 2;
|
||||
if (($chkMselValue8[0] == "") || ($chkMselValue8[0] == "0")) {$intMselValue8 = 0;} else {$intMselValue8 = 1;}
|
||||
if ($chkMselValue8[0] == "*") $intMselValue8 = 2;
|
||||
$chkTfSearch = $myVisClass->tfSecure($chkTfSearchRaw);
|
||||
$chkTaValue1 = $myVisClass->tfSecure($chkTaValue1Raw);
|
||||
$chkTaFileText = stripslashes($chkTaFileTextRaw);
|
||||
//
|
||||
// Search/sort/filter - session data
|
||||
// =================================
|
||||
if (!isset($_SESSION['search']) || !isset($_SESSION['search'][$preSearchSession])) $_SESSION['search'][$preSearchSession] = "";
|
||||
if (!isset($_SESSION['search']) || !isset($_SESSION['search']['config_selection'])) $_SESSION['search']['config_selection'] = "";
|
||||
if (($chkModus == "checkform") || ($chkModus == "filter")) {
|
||||
$_SESSION['search'][$preSearchSession] = $chkTfSearch;
|
||||
$_SESSION['search']['config_selection'] = $chkSelCnfName;
|
||||
if (!isset($_SESSION['search']) || !isset($_SESSION['search'][$preSearchSession])) {
|
||||
$_SESSION['search'][$preSearchSession] = '';
|
||||
}
|
||||
if (!isset($_SESSION['search']) || !isset($_SESSION['search']['config_selection'])) {
|
||||
$_SESSION['search']['config_selection'] = '';
|
||||
}
|
||||
if (($chkModus == 'checkform') || ($chkModus == 'filter')) {
|
||||
$_SESSION['search'][$preSearchSession] = $chkTfSearch;
|
||||
$_SESSION['search']['config_selection'] = $chkSelCnfName;
|
||||
$myContentClass->arrSession = $_SESSION;
|
||||
}
|
||||
//
|
||||
// Process additional templates/variables
|
||||
// ======================================
|
||||
if (isset($_SESSION['templatedefinition']) && is_array($_SESSION['templatedefinition']) && (count($_SESSION['templatedefinition']) != 0)) {
|
||||
$intTemplates = 1;
|
||||
if (isset($_SESSION['templatedefinition']) && is_array($_SESSION['templatedefinition']) &&
|
||||
(count($_SESSION['templatedefinition']) != 0)) {
|
||||
$intTemplates = 1;
|
||||
} else {
|
||||
$intTemplates = 0;
|
||||
$intTemplates = 0;
|
||||
}
|
||||
if (isset($_SESSION['variabledefinition']) && is_array($_SESSION['variabledefinition']) && (count($_SESSION['variabledefinition']) != 0)) {
|
||||
$intVariables = 1;
|
||||
if (isset($_SESSION['variabledefinition']) && is_array($_SESSION['variabledefinition']) &&
|
||||
(count($_SESSION['variabledefinition']) != 0)) {
|
||||
$intVariables = 1;
|
||||
} else {
|
||||
$intVariables = 0;
|
||||
$intVariables = 0;
|
||||
}
|
||||
//
|
||||
// Common SQL parts
|
||||
// ================
|
||||
if ($hidActive == 1) $chkActive = 1;
|
||||
if ($chkGroupAdm == 1) {$strGroupSQL = "`access_group`=$chkSelAccGr, ";} else {$strGroupSQL = "";}
|
||||
$preSQLCommon1 = "$strGroupSQL `active`='$chkActive', `register`='$chkRegister', `config_id`=$chkDomainId, `last_modified`=NOW()";
|
||||
if ($hidActive == 1) {
|
||||
$chkActive = 1;
|
||||
}
|
||||
if ($chkGroupAdm == 1) {
|
||||
$strGroupSQL = "`access_group`=$chkSelAccGr, ";
|
||||
} else {
|
||||
$strGroupSQL = '';
|
||||
}
|
||||
$preSQLCommon1 = "$strGroupSQL `active`='$chkActive', `register`='$chkRegister', `config_id`=$chkDomainId, "
|
||||
. '`last_modified`=NOW()';
|
||||
$preSQLCommon2 = "$strGroupSQL `active`='$chkActive', `register`='0', `config_id`=$chkDomainId, `last_modified`=NOW()";
|
||||
$intRet1=0;$intRet2=0;$intRet3=0;$intRet4=0;$intRet5=0;$intRet6=0;$intRet7=0;$intRet8=0;
|
||||
$intRet1 = 0;
|
||||
$intRet2 = 0;
|
||||
$intRet3 = 0;
|
||||
$intRet4 = 0;
|
||||
$intRet5 = 0;
|
||||
$intRet6 = 0;
|
||||
$intRet7 = 0;
|
||||
$intRet8 = 0;
|
||||
//
|
||||
// Check read and write access
|
||||
// ===========================
|
||||
if (isset($prePageKey)) {
|
||||
$intGlobalReadAccess = $myVisClass->checkAccGroup($prePageKey,'read'); // Global read access (0 = access granted)
|
||||
$intGlobalWriteAccess = $myVisClass->checkAccGroup($prePageKey,'write'); // Global write access (0 = access granted)
|
||||
$myContentClass->intGlobalWriteAccess = $intGlobalWriteAccess;
|
||||
// Global read access (0 = access granted)
|
||||
$intGlobalReadAccess = $myVisClass->checkAccountGroup($prePageKey, 'read');
|
||||
// Global write access (0 = access granted)
|
||||
$intGlobalWriteAccess = $myVisClass->checkAccountGroup($prePageKey, 'write');
|
||||
$myContentClass->intGlobalWriteAccess = $intGlobalWriteAccess;
|
||||
}
|
||||
if (!isset($preNoAccessGrp) || ($preNoAccessGrp == 0)) {
|
||||
if ($chkDataId != 0) {
|
||||
$strSQLWrite = "SELECT `access_group` FROM `$preTableName` WHERE id=$chkDataId";
|
||||
$intWriteAccessId = $myVisClass->checkAccGroup(($myDBClass->getFieldData($strSQLWrite)+0),'write');
|
||||
$myContentClass->intWriteAccessId = $intWriteAccessId;
|
||||
}
|
||||
if ($chkListId != 0) {
|
||||
$strSQLWrite = "SELECT `access_group` FROM `$preTableName` WHERE id=$chkListId";
|
||||
$intReadAccessId = $myVisClass->checkAccGroup(($myDBClass->getFieldData($strSQLWrite)+0),'read');
|
||||
$intWriteAccessId = $myVisClass->checkAccGroup(($myDBClass->getFieldData($strSQLWrite)+0),'write');
|
||||
$myContentClass->intWriteAccessId = $intWriteAccessId;
|
||||
}
|
||||
if ($chkDataId != 0) {
|
||||
$strSQLWrite = "SELECT `access_group` FROM `$preTableName` WHERE `id`=".$chkDataId;
|
||||
$intWriteAccessId = $myVisClass->checkAccountGroup((int)$myDBClass->getFieldData($strSQLWrite), 'write');
|
||||
$myContentClass->intWriteAccessId = $intWriteAccessId;
|
||||
}
|
||||
if ($chkListId != 0) {
|
||||
$strSQLWrite = "SELECT `access_group` FROM `$preTableName` WHERE `id`=".$chkListId;
|
||||
$intReadAccessId = $myVisClass->checkAccountGroup((int)$myDBClass->getFieldData($strSQLWrite), 'read');
|
||||
$intWriteAccessId = $myVisClass->checkAccountGroup((int)$myDBClass->getFieldData($strSQLWrite), 'write');
|
||||
$myContentClass->intWriteAccessId = $intWriteAccessId;
|
||||
}
|
||||
}
|
||||
//
|
||||
// Data processing
|
||||
// ===============
|
||||
if (($chkModus == "make") && ($intGlobalWriteAccess == 0)) {
|
||||
$intError = 0;
|
||||
$intSuccess = 0;
|
||||
// Get write access groups
|
||||
$strAccess = $myVisClass->getAccGroups('write');
|
||||
// Write configuration file
|
||||
if ($preTableName == 'tbl_host') {
|
||||
$strSQL = "SELECT `id` FROM `$preTableName` WHERE $strDomainWhere AND `access_group` IN ($strAccess) AND `active`='1'";
|
||||
$booReturn = $myDBClass->getDataArray($strSQL,$arrData,$intDataCount);
|
||||
if ($booReturn == false) $myVisClass->processMessage($myDBClass->strErrorMessage,$strErrorMessage);
|
||||
if ($booReturn && ($intDataCount != 0)) {
|
||||
foreach ($arrData AS $data) {
|
||||
$intReturn = $myConfigClass->createConfigSingle("$preTableName",$data['id']);
|
||||
if ($intReturn == 1){
|
||||
$intError++;
|
||||
$myVisClass->processMessage($myConfigClass->strErrorMessage,$strErrorMessage);
|
||||
} else {
|
||||
$intSuccess++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$myVisClass->processMessage(translate('Some configuration files were not written. Dataset not activated, not found or you do not have write permission!'),$strErrorMessage);
|
||||
}
|
||||
if ($intSuccess != 0) $myVisClass->processMessage(translate('Configuration files successfully written!'),$strInfoMessage);
|
||||
if ($intError != 0) $myVisClass->processMessage(translate('Some configuration files were not written. Dataset not activated, not found or you do not have write permission!'),$strErrorMessage);
|
||||
} else if ($preTableName == 'tbl_service') {
|
||||
$strSQL = "SELECT `id`, `$preKeyField` FROM `$preTableName` WHERE $strDomainWhere AND `access_group` IN ($strAccess) AND `active`='1' GROUP BY `$preKeyField`, `id`";
|
||||
$myDBClass->getDataArray($strSQL,$arrData,$intDataCount);
|
||||
if ($booReturn == false) $myVisClass->processMessage($myDBClass->strErrorMessage,$strErrorMessage);
|
||||
if ($booReturn && ($intDataCount != 0)) {
|
||||
foreach ($arrData AS $data) {
|
||||
$intReturn = $myConfigClass->createConfigSingle("$preTableName",$data['id']);
|
||||
if ($intReturn == 1){
|
||||
$intError++;
|
||||
$myVisClass->processMessage($myConfigClass->strErrorMessage,$strErrorMessage);
|
||||
} else {
|
||||
$intSuccess++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$myVisClass->processMessage(translate('Some configuration files were not written. Dataset not activated, not found or you do not have write permission!'),$strErrorMessage);
|
||||
}
|
||||
if ($intSuccess != 0) $myVisClass->processMessage(translate('Configuration files successfully written!'),$strInfoMessage);
|
||||
if ($intError != 0) $myVisClass->processMessage(translate('Some configuration files were not written. Dataset not activated, not found or you do not have write permission!'),$strErrorMessage);
|
||||
} else {
|
||||
$intReturn = $myConfigClass->createConfig($preTableName,0);
|
||||
if ($intReturn == 1) $myVisClass->processMessage($myConfigClass->strErrorMessage,$strErrorMessage);
|
||||
if ($intReturn == 0) $myVisClass->processMessage($myConfigClass->strInfoMessage,$strInfoMessage);
|
||||
}
|
||||
$chkModus = "display";
|
||||
} else if (($chkModus == "checkform") && ($chkSelModify == "info")) {
|
||||
// Display additional relation information
|
||||
if ($preTableName == 'tbl_service') {
|
||||
$intReturn = $myDataClass->infoRelation($preTableName,$chkListId,"$preKeyField,service_description");
|
||||
} else {
|
||||
$intReturn = $myDataClass->infoRelation($preTableName,$chkListId,$preKeyField);
|
||||
}
|
||||
$myVisClass->processMessage($myDataClass->strInfoMessage,$strConsistMessage);
|
||||
$chkModus = "display";
|
||||
} else if (($chkModus == "checkform") && ($chkSelModify == "delete") && ($intGlobalWriteAccess == 0)) {
|
||||
// Delete selected datasets
|
||||
if (($preTableName == 'tbl_user') && ($chkTfValue5 == "Admin")) {
|
||||
$myVisClass->processMessage(translate("Admin can't be deleted"),$strErrorMessage);
|
||||
$intReturn = 0;
|
||||
} else if ((($preTableName == 'tbl_datadomain') || ($preTableName == 'tbl_configtarget')) && ($chkTfValue3 == "localhost")) {
|
||||
$myVisClass->processMessage(translate("Localhost can't be deleted"),$strErrorMessage);
|
||||
$intReturn = 0;
|
||||
} else if (($preTableName == 'tbl_user') || ($preTableName == 'tbl_datadomain') || ($preTableName == 'tbl_configtarget')) {
|
||||
$intReturn = $myDataClass->dataDeleteEasy($preTableName,$chkListId);
|
||||
} else {
|
||||
$intReturn = $myDataClass->dataDeleteFull($preTableName,$chkListId);
|
||||
}
|
||||
if ($intReturn == 1) $myVisClass->processMessage($myDataClass->strErrorMessage,$strErrorMessage);
|
||||
if ($intReturn == 0) $myVisClass->processMessage($myDataClass->strInfoMessage,$strInfoMessage);
|
||||
$chkModus = "display";
|
||||
} else if (($chkModus == "checkform") && ($chkSelModify == "copy") && ($intGlobalWriteAccess == 0)) {
|
||||
// Copy selected datasets
|
||||
$intReturn = $myDataClass->dataCopyEasy($preTableName,$preKeyField,$chkListId,$chkSelTargetDomain);
|
||||
if ($intReturn == 1) $myVisClass->processMessage($myDataClass->strErrorMessage,$strErrorMessage);
|
||||
if ($intReturn == 0) $myVisClass->processMessage($myDataClass->strInfoMessage,$strInfoMessage);
|
||||
$chkModus = "display";
|
||||
} else if (($chkModus == "checkform") && ($chkSelModify == "activate") && ($intGlobalWriteAccess == 0)) {
|
||||
// Activate selected datasets
|
||||
$intReturn = $myDataClass->dataActivate($preTableName,$chkListId);
|
||||
if ($intReturn == 1) $myVisClass->processMessage($myDataClass->strErrorMessage,$strErrorMessage);
|
||||
if ($intReturn == 0) $myVisClass->processMessage($myDataClass->strInfoMessage,$strInfoMessage);
|
||||
$chkModus = "display";
|
||||
} else if (($chkModus == "checkform") && ($chkSelModify == "deactivate") && ($intGlobalWriteAccess == 0)) {
|
||||
// Deactivate selected datasets
|
||||
$intReturn = $myDataClass->dataDeactivate($preTableName,$chkListId);
|
||||
if ($intReturn == 1) $myVisClass->processMessage($myDataClass->strErrorMessage,$strErrorMessage);
|
||||
if ($intReturn == 0) $myVisClass->processMessage($myDataClass->strInfoMessage,$strInfoMessage);
|
||||
// Remove deactivated files
|
||||
if ($preTableName == 'tbl_host') {
|
||||
if ($chkListId != 0) {
|
||||
$strChbName = "chbId_".$chkListId;
|
||||
$_POST[$strChbName] = "on";
|
||||
}
|
||||
// Get write access groups
|
||||
$strAccess = $myVisClass->getAccGroups('write');
|
||||
// Getting data sets
|
||||
$strSQL = "SELECT `id`, `host_name` FROM `".$preTableName."` WHERE `active`='0' AND `access_group` IN ($strAccess) AND `config_id`=".$chkDomainId;
|
||||
$booReturn = $myDBClass->getDataArray($strSQL,$arrData,$intDataCount);
|
||||
if ($booReturn && ($intDataCount != 0) && ($chkDomainId != 0)) {
|
||||
$arrConfigID = $myConfigClass->getConfigSets();
|
||||
$intError = 0;
|
||||
$intSuccess = 0;
|
||||
if (($arrConfigID != 1) && is_array($arrConfigID)) {
|
||||
foreach ($arrData AS $elem) {
|
||||
$strChbName = "chbId_".$elem['id'];
|
||||
// was the current record is marked for deactivate?
|
||||
if (isset($_POST[$strChbName]) && ($_POST[$strChbName] == "on")) {
|
||||
$intCount = 0;
|
||||
$intReturn = 0;
|
||||
foreach($arrConfigID AS $intConfigID) {
|
||||
$intReturn += $myConfigClass->moveFile("host",$elem['host_name'].".cfg",$intConfigID);
|
||||
if ($intReturn == 0) {
|
||||
$myDataClass->writeLog(translate('Host file deleted:')." ".$elem['host_name'].".cfg");
|
||||
$intCount++;
|
||||
}
|
||||
}
|
||||
if ($intReturn == 0) $intSuccess++;
|
||||
if ($intReturn != 0) $intError++;
|
||||
}
|
||||
}
|
||||
if (($intSuccess != 0) && ($intCount != 0)) {
|
||||
$myVisClass->processMessage(translate('The assigned, no longer used configuration files were deleted successfully!').$intCount,$strInfoMessage);
|
||||
}
|
||||
if ($intError != 0) {
|
||||
$myVisClass->processMessage(translate('Errors while deleting the old configuration file - please check!:'),$strErrorMessage);
|
||||
}
|
||||
}
|
||||
} else if ($chkDomainId == 0) {
|
||||
$myVisClass->processMessage(translate('Common files cannot be removed from target systems - please check manually'),$strErrorMessage);
|
||||
}
|
||||
} else if ($preTableName == 'tbl_service') {
|
||||
if ($chkListId != 0) {
|
||||
$strChbName = "chbId_".$chkListId;
|
||||
$_POST[$strChbName] = "on";
|
||||
}
|
||||
// Get write access groups
|
||||
$strAccess = $myVisClass->getAccGroups('write');
|
||||
// Getting data sets
|
||||
$strSQL = "SELECT `id`, `config_name` FROM `".$preTableName."` WHERE `active`='0' AND `access_group` IN ($strAccess) AND `config_id`=".$chkDomainId;
|
||||
$booReturn = $myDBClass->getDataArray($strSQL,$arrData,$intDataCount);
|
||||
if ($booReturn && ($intDataCount != 0) && ($chkDomainId != 0)) {
|
||||
$arrConfigID = $myConfigClass->getConfigSets();
|
||||
$intError = 0;
|
||||
$intSuccess = 0;
|
||||
if (($arrConfigID != 1) && is_array($arrConfigID)) {
|
||||
$intCount = 0;
|
||||
foreach ($arrData AS $elem) {
|
||||
$strChbName = "chbId_".$elem['id'];
|
||||
// was the current record is marked for deactivate?
|
||||
if (isset($_POST[$strChbName]) && ($_POST[$strChbName] == "on")) {
|
||||
$intServiceCount = $myDBClass->countRows("SELECT * FROM `$preTableName` WHERE `$preKeyField`='".$elem['config_name']."'
|
||||
AND `config_id`=$chkDomainId AND `active`='1'");
|
||||
if ($intServiceCount == 0) {
|
||||
$intReturn = 0;
|
||||
foreach($arrConfigID AS $intConfigID) {
|
||||
$intReturn += $myConfigClass->moveFile("service",$elem['config_name'].".cfg",$intConfigID);
|
||||
if ($intReturn == 0) $myDataClass->writeLog(translate('Service file deleted:')." ".$elem['config_name'].".cfg");
|
||||
$intCount++;
|
||||
}
|
||||
if ($intReturn == 0) $intSuccess++;
|
||||
if ($intReturn != 0) $intError++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (($intSuccess != 0) && ($intCount != 0)) {
|
||||
$myVisClass->processMessage(translate('The assigned, no longer used configuration files were deleted successfully!'),$strInfoMessage);
|
||||
}
|
||||
if ($intError != 0) {
|
||||
$myVisClass->processMessage(translate('Errors while deleting the old configuration file - please check!:'),$strErrorMessage);
|
||||
}
|
||||
}
|
||||
} else if ($chkDomainId == 0) {
|
||||
$myVisClass->processMessage(translate('Common files cannot be removed from target systems - please check manually'),$strErrorMessage);
|
||||
}
|
||||
}
|
||||
$chkModus = "display";
|
||||
} else if (($chkModus == "checkform") && ($chkSelModify == "modify")) {
|
||||
// Open the dataset to modify
|
||||
if ($intReadAccessId == 0) {
|
||||
$booReturn = $myDBClass->getSingleDataset("SELECT * FROM `$preTableName` WHERE `id`=".$chkListId,$arrModifyData);
|
||||
if ($booReturn == false) {
|
||||
$myVisClass->processMessage(translate('Error while selecting data from database:'),$strErrorMessage);
|
||||
$myVisClass->processMessage($myDBClass->strErrorMessage,$strErrorMessage);
|
||||
$chkModus = "display";
|
||||
} else {
|
||||
$chkModus = "add";
|
||||
}
|
||||
} else {
|
||||
$myVisClass->processMessage(translate('No permission to open configuration!'),$strErrorMessage);
|
||||
$chkModus = "display";
|
||||
}
|
||||
} else if (($chkModus == "checkform") && ($chkSelModify == "config") && ($intGlobalWriteAccess == 0)) {
|
||||
// Write configuration file (hosts and services)
|
||||
$intDSId = (int)substr(array_search("on",$_POST),6);
|
||||
if (isset($chkListId) && ($chkListId != 0)) $intDSId = $chkListId;
|
||||
$intValCount = 0;
|
||||
foreach($_POST AS $key => $elem) {
|
||||
if ($elem == "on") $intValCount++;
|
||||
}
|
||||
if ($intValCount > 1) $intDSId = 0;
|
||||
$intReturn = $myConfigClass->createConfigSingle($preTableName,$intDSId);
|
||||
if ($intReturn == 1) $myVisClass->processMessage($myConfigClass->strErrorMessage,$strErrorMessage);
|
||||
if ($intReturn == 0) $myVisClass->processMessage($myConfigClass->strInfoMessage,$strInfoMessage);
|
||||
$chkModus = "display";
|
||||
if (($chkModus == 'make') && ($intGlobalWriteAccess == 0)) {
|
||||
$intError = 0;
|
||||
$intSuccess = 0;
|
||||
// Get write access groups
|
||||
$strAccess = $myVisClass->getAccessGroups('write');
|
||||
// Write configuration file
|
||||
if ($preTableName == 'tbl_host') {
|
||||
/** @var string $strDomainWhere - defined in prepend_adm.php */
|
||||
$strSQL = "SELECT `id` FROM `$preTableName` "
|
||||
. "WHERE $strDomainWhere AND `access_group` IN ($strAccess) AND `active`='1'";
|
||||
$booReturn = $myDBClass->hasDataArray($strSQL, $arrData, $intDataCount);
|
||||
if ($booReturn == false) {
|
||||
$myVisClass->processMessage($myDBClass->strErrorMessage, $strErrorMessage);
|
||||
}
|
||||
if ($booReturn && ($intDataCount != 0)) {
|
||||
foreach ($arrData as $data) {
|
||||
$intReturn = $myConfigClass->createConfigSingle($preTableName, $data['id']);
|
||||
if ($intReturn == 1) {
|
||||
$intError++;
|
||||
$myVisClass->processMessage($myConfigClass->strErrorMessage, $strErrorMessage);
|
||||
} else {
|
||||
$intSuccess++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$myVisClass->processMessage(translate('Some configuration files were not written. Dataset not activated, '
|
||||
. 'not found or you do not have write permission!'), $strErrorMessage);
|
||||
}
|
||||
if ($intSuccess != 0) {
|
||||
$myVisClass->processMessage(translate('Configuration files successfully written!'), $strInfoMessage);
|
||||
}
|
||||
if ($intError != 0) {
|
||||
$myVisClass->processMessage(translate('Some configuration files were not written. Dataset not activated, '
|
||||
. 'not found or you do not have write permission!'), $strErrorMessage);
|
||||
}
|
||||
} elseif ($preTableName == 'tbl_service') {
|
||||
/** @var string $strDomainWhere - defined in prepend_adm.php */
|
||||
$strSQL = "SELECT `id`, `$preKeyField` FROM `$preTableName` "
|
||||
. "WHERE $strDomainWhere AND `access_group` IN ($strAccess) AND `active`='1' "
|
||||
. "GROUP BY `$preKeyField`, `id`";
|
||||
$myDBClass->hasDataArray($strSQL, $arrData, $intDataCount);
|
||||
if ($booReturn == false) {
|
||||
$myVisClass->processMessage($myDBClass->strErrorMessage, $strErrorMessage);
|
||||
}
|
||||
if ($booReturn && ($intDataCount != 0)) {
|
||||
foreach ($arrData as $data) {
|
||||
$intReturn = $myConfigClass->createConfigSingle($preTableName, $data['id']);
|
||||
if ($intReturn == 1) {
|
||||
$intError++;
|
||||
$myVisClass->processMessage($myConfigClass->strErrorMessage, $strErrorMessage);
|
||||
} else {
|
||||
$intSuccess++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$myVisClass->processMessage(translate('Some configuration files were not written. Dataset not activated, '
|
||||
. 'not found or you do not have write permission!'), $strErrorMessage);
|
||||
}
|
||||
if ($intSuccess != 0) {
|
||||
$myVisClass->processMessage(translate('Configuration files successfully written!'), $strInfoMessage);
|
||||
}
|
||||
if ($intError != 0) {
|
||||
$myVisClass->processMessage(translate('Some configuration files were not written. Dataset not activated, '
|
||||
. 'not found or you do not have write permission!'), $strErrorMessage);
|
||||
}
|
||||
} else {
|
||||
$intReturn = $myConfigClass->createConfig($preTableName, 0);
|
||||
if ($intReturn == 1) {
|
||||
$myVisClass->processMessage($myConfigClass->strErrorMessage, $strErrorMessage);
|
||||
}
|
||||
if ($intReturn == 0) {
|
||||
$myVisClass->processMessage($myConfigClass->strInfoMessage, $strInfoMessage);
|
||||
}
|
||||
}
|
||||
$chkModus = 'display';
|
||||
} elseif (($chkModus == 'checkform') && ($chkSelModify == 'info')) {
|
||||
// Display additional relation information
|
||||
if ($preTableName == 'tbl_service') {
|
||||
$intReturn = $myDataClass->infoRelation($preTableName, $chkListId, "$preKeyField,service_description");
|
||||
} else {
|
||||
$intReturn = $myDataClass->infoRelation($preTableName, $chkListId, $preKeyField);
|
||||
}
|
||||
$myVisClass->processMessage($myDataClass->strInfoMessage, $strConsistMessage);
|
||||
$chkModus = 'display';
|
||||
} elseif (($chkModus == 'checkform') && ($chkSelModify == 'delete') && ($intGlobalWriteAccess == 0)) {
|
||||
$intReturn = 1;
|
||||
// Delete selected datasets
|
||||
if (($preTableName == 'tbl_user') && ($chkTfValue5 == 'Admin')) {
|
||||
$myVisClass->processMessage(translate('Admin cannot be deleted'), $strErrorMessage);
|
||||
$intReturn = 0;
|
||||
} elseif ((($preTableName == 'tbl_datadomain') || ($preTableName == 'tbl_configtarget')) &&
|
||||
($chkTfValue3 == 'localhost')) {
|
||||
$myVisClass->processMessage(translate("Localhost can't be deleted"), $strErrorMessage);
|
||||
$intReturn = 0;
|
||||
} elseif (($preTableName == 'tbl_user') || ($preTableName == 'tbl_datadomain') ||
|
||||
($preTableName == 'tbl_configtarget')) {
|
||||
$intReturn = $myDataClass->dataDeleteEasy($preTableName, $chkListId);
|
||||
} else {
|
||||
$strInfoMessageTmp = $strInfoMessage;
|
||||
if ($preTableName == 'tbl_service') {
|
||||
$intRetVal = $myDataClass->infoRelation($preTableName, $chkListId, "$preKeyField,service_description");
|
||||
} else {
|
||||
$intRetVal = $myDataClass->infoRelation($preTableName, $chkListId, $preKeyField);
|
||||
}
|
||||
if ($intRetVal == 0) {
|
||||
$strInfoMessage = $strInfoMessageTmp;
|
||||
$intReturn = $myDataClass->dataDeleteFull($preTableName, $chkListId);
|
||||
}
|
||||
}
|
||||
$myVisClass->processMessage($myDataClass->strErrorMessage, $strErrorMessage);
|
||||
$myVisClass->processMessage($myDataClass->strInfoMessage, $strInfoMessage);
|
||||
$chkModus = 'display';
|
||||
} elseif (($chkModus == 'checkform') && ($chkSelModify == 'copy') && ($intGlobalWriteAccess == 0)) {
|
||||
// Copy selected datasets
|
||||
$intReturn = $myDataClass->dataCopyEasy($preTableName, $preKeyField, $chkListId, $chkSelTarDom);
|
||||
if ($intReturn == 1) {
|
||||
$myVisClass->processMessage($myDataClass->strErrorMessage, $strErrorMessage);
|
||||
}
|
||||
if ($intReturn == 0) {
|
||||
$myVisClass->processMessage($myDataClass->strInfoMessage, $strInfoMessage);
|
||||
}
|
||||
$chkModus = 'display';
|
||||
} elseif (($chkModus == 'checkform') && ($chkSelModify == 'activate') && ($intGlobalWriteAccess == 0)) {
|
||||
// Activate selected datasets
|
||||
$intReturn = $myDataClass->dataActivate($preTableName, $chkListId);
|
||||
if ($intReturn == 1) {
|
||||
$myVisClass->processMessage($myDataClass->strErrorMessage, $strErrorMessage);
|
||||
}
|
||||
if ($intReturn == 0) {
|
||||
$myVisClass->processMessage($myDataClass->strInfoMessage, $strInfoMessage);
|
||||
}
|
||||
$chkModus = 'display';
|
||||
} elseif (($chkModus == 'checkform') && ($chkSelModify == 'deactivate') && ($intGlobalWriteAccess == 0)) {
|
||||
// Deactivate selected datasets
|
||||
$intReturn = $myDataClass->dataDeactivate($preTableName, $chkListId);
|
||||
if ($intReturn == 1) {
|
||||
$myVisClass->processMessage($myDataClass->strErrorMessage, $strErrorMessage);
|
||||
}
|
||||
if ($intReturn == 0) {
|
||||
$myVisClass->processMessage($myDataClass->strInfoMessage, $strInfoMessage);
|
||||
}
|
||||
// Remove deactivated files
|
||||
if ($preTableName == 'tbl_host') {
|
||||
if ($chkListId != 0) {
|
||||
$strChbName = 'chbId_' .$chkListId;
|
||||
$_POST[$strChbName] = 'on';
|
||||
}
|
||||
// Get write access groups
|
||||
$strAccess = $myVisClass->getAccessGroups('write');
|
||||
// Getting data sets
|
||||
$strSQL = 'SELECT `id`, `host_name` FROM `' .$preTableName. '` '
|
||||
. "WHERE `active`='0' AND `access_group` IN ($strAccess) AND `config_id`=".$chkDomainId;
|
||||
$booReturn = $myDBClass->hasDataArray($strSQL, $arrData, $intDataCount);
|
||||
if ($booReturn && ($intDataCount != 0) && ($chkDomainId != 0)) {
|
||||
$intReturn = $myConfigClass->getConfigTargets($arrConfigID);
|
||||
$intError = 0;
|
||||
$intSuccess = 0;
|
||||
if (($arrConfigID != 1) && is_array($arrConfigID)) {
|
||||
foreach ($arrData as $elem) {
|
||||
$strChbName = 'chbId_' .$elem['id'];
|
||||
// was the current record is marked for deactivate?
|
||||
if ((filter_input(INPUT_POST, $strChbName) != null) &&
|
||||
(filter_input(INPUT_POST, $strChbName, FILTER_SANITIZE_STRING) == 'on')) {
|
||||
$intCount = 0;
|
||||
$intReturn = 0;
|
||||
foreach ($arrConfigID as $intConfigID) {
|
||||
$intReturn += $myConfigClass->moveFile('host', $elem['host_name']. '.cfg', $intConfigID);
|
||||
if ($intReturn == 0) {
|
||||
$myDataClass->writeLog(translate('Host file deleted:'). ' ' .$elem['host_name']
|
||||
. '.cfg');
|
||||
$intCount++;
|
||||
}
|
||||
}
|
||||
if ($intReturn == 0) {
|
||||
$intSuccess++;
|
||||
}
|
||||
if ($intReturn != 0) {
|
||||
$intError++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (($intSuccess != 0) && ($intCount != 0)) {
|
||||
$myVisClass->processMessage(translate('The assigned, no longer used configuration files were '
|
||||
. 'deleted successfully!').$intCount, $strInfoMessage);
|
||||
}
|
||||
if ($intError != 0) {
|
||||
$myVisClass->processMessage(translate('Errors while deleting the old configuration file - please '
|
||||
. 'check!:'), $strErrorMessage);
|
||||
}
|
||||
}
|
||||
} elseif ($chkDomainId == 0) {
|
||||
$myVisClass->processMessage(translate('Common files cannot be removed from target systems - please check '
|
||||
. 'manually'), $strErrorMessage);
|
||||
}
|
||||
} elseif ($preTableName == 'tbl_service') {
|
||||
if ($chkListId != 0) {
|
||||
$strChbName = 'chbId_' .$chkListId;
|
||||
$_POST[$strChbName] = 'on';
|
||||
}
|
||||
// Get write access groups
|
||||
$strAccess = $myVisClass->getAccessGroups('write');
|
||||
// Getting data sets
|
||||
$strSQL = 'SELECT `id`, `config_name` FROM `' .$preTableName. '` '
|
||||
. "WHERE `active`='0' AND `access_group` IN ($strAccess) AND `config_id`=".$chkDomainId;
|
||||
$booReturn = $myDBClass->hasDataArray($strSQL, $arrData, $intDataCount);
|
||||
if ($booReturn && ($intDataCount != 0) && ($chkDomainId != 0)) {
|
||||
$intReturn = $myConfigClass->getConfigTargets($arrConfigID);
|
||||
$intError = 0;
|
||||
$intSuccess = 0;
|
||||
if (($arrConfigID != 1) && is_array($arrConfigID)) {
|
||||
$intCount = 0;
|
||||
foreach ($arrData as $elem) {
|
||||
$strChbName = 'chbId_' .$elem['id'];
|
||||
// was the current record is marked for deactivate?
|
||||
if (filter_input(INPUT_POST, $strChbName) && (filter_input(INPUT_POST, $strChbName) == 'on')) {
|
||||
$intServiceCount = $myDBClass->countRows("SELECT * FROM `$preTableName` "
|
||||
. "WHERE `$preKeyField`='".$elem['config_name']."' "
|
||||
. "AND `config_id`=$chkDomainId AND `active`='1'");
|
||||
if ($intServiceCount == 0) {
|
||||
$intReturn = 0;
|
||||
foreach ($arrConfigID as $intConfigID) {
|
||||
$intReturn += $myConfigClass->moveFile(
|
||||
'service',
|
||||
$elem['config_name']. '.cfg',
|
||||
$intConfigID
|
||||
);
|
||||
if ($intReturn == 0) {
|
||||
$myDataClass->writeLog(translate('Service file deleted:'). ' ' .
|
||||
$elem['config_name']. '.cfg');
|
||||
}
|
||||
$intCount++;
|
||||
}
|
||||
if ($intReturn == 0) {
|
||||
$intSuccess++;
|
||||
}
|
||||
if ($intReturn != 0) {
|
||||
$intError++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (($intSuccess != 0) && ($intCount != 0)) {
|
||||
$myVisClass->processMessage(translate('The assigned, no longer used configuration files were '
|
||||
. 'deleted successfully!'), $strInfoMessage);
|
||||
}
|
||||
if ($intError != 0) {
|
||||
$myVisClass->processMessage(translate('Errors while deleting the old configuration file - please '
|
||||
. 'check!:'), $strErrorMessage);
|
||||
}
|
||||
}
|
||||
} elseif ($chkDomainId == 0) {
|
||||
$myVisClass->processMessage(translate('Common files cannot be removed from target systems - please check '
|
||||
. 'manually'), $strErrorMessage);
|
||||
}
|
||||
}
|
||||
$chkModus = 'display';
|
||||
} elseif (($chkModus == 'checkform') && ($chkSelModify == 'modify')) {
|
||||
// Open the dataset to modify
|
||||
if ($intReadAccessId == 0) {
|
||||
$booReturn = $myDBClass->hasSingleDataset("SELECT * FROM `$preTableName` "
|
||||
. 'WHERE `id`=' .$chkListId, $arrModifyData);
|
||||
if ($booReturn == false) {
|
||||
$myVisClass->processMessage(translate('Error while selecting data from database:'), $strErrorMessage);
|
||||
$myVisClass->processMessage($myDBClass->strErrorMessage, $strErrorMessage);
|
||||
$chkModus = 'display';
|
||||
} else {
|
||||
$chkModus = 'add';
|
||||
}
|
||||
} else {
|
||||
$myVisClass->processMessage(translate('No permission to open configuration!'), $strErrorMessage);
|
||||
$chkModus = 'display';
|
||||
}
|
||||
} elseif (($chkModus == 'checkform') && ($chkSelModify == 'config') && ($intGlobalWriteAccess == 0)) {
|
||||
// Write configuration file (hosts and services)
|
||||
$intDSId = (int)substr(array_search('on', filter_input_array(INPUT_POST), true), 6);
|
||||
if (isset($chkListId) && ($chkListId != 0)) {
|
||||
$intDSId = $chkListId;
|
||||
}
|
||||
$intValCount = 0;
|
||||
foreach (filter_input_array(INPUT_POST) as $key => $elem) {
|
||||
if ($elem == 'on') {
|
||||
$intValCount++;
|
||||
}
|
||||
}
|
||||
if ($intValCount > 1) {
|
||||
$intDSId = 0;
|
||||
}
|
||||
$intReturn = $myConfigClass->createConfigSingle($preTableName, $intDSId);
|
||||
if ($intReturn == 1) {
|
||||
$myVisClass->processMessage($myConfigClass->strErrorMessage, $strErrorMessage);
|
||||
}
|
||||
if ($intReturn == 0) {
|
||||
$myVisClass->processMessage($myConfigClass->strInfoMessage, $strInfoMessage);
|
||||
}
|
||||
$chkModus = 'display';
|
||||
}
|
||||
//
|
||||
//
|
||||
// Some common list view functions
|
||||
// ===============================
|
||||
if ($chkModus != "add") {
|
||||
// Get Group id's with READ
|
||||
$strAccess = $myVisClass->getAccGroups('read');
|
||||
// Include domain list
|
||||
$myVisClass->insertDomainList($mastertp);
|
||||
// Process filter string
|
||||
if ($chkModus != 'add') {
|
||||
// Get Group id's with READ
|
||||
$strAccess = $myVisClass->getAccessGroups('read');
|
||||
// Include domain list
|
||||
/** @var HTML_Template_IT $mastertp */
|
||||
$myVisClass->insertDomainList($mastertp);
|
||||
// Process filter string
|
||||
}
|
||||
?>
|
||||
@@ -5,108 +5,99 @@
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (c) 2005-2017 by Martin Willisegger
|
||||
// (c) 2005-2018 by Martin Willisegger
|
||||
//
|
||||
// Project : NagiosQL
|
||||
// Component : Preprocessing script for scripting files
|
||||
// Website : http://www.nagiosql.org
|
||||
// Date : $LastChangedDate: 2017-06-22 09:48:25 +0200 (Thu, 22 Jun 2017) $
|
||||
// Author : $LastChangedBy: martin $
|
||||
// Version : 3.3.0
|
||||
// Revision : $LastChangedRevision: 4 $
|
||||
// Website : https://sourceforge.net/projects/nagiosql/
|
||||
// Version : 3.4.0
|
||||
// GIT Repo : https://gitlab.com/wizonet/NagiosQL
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
error_reporting(E_ALL);
|
||||
//error_reporting(E_ALL);
|
||||
//error_reporting(E_ERROR);
|
||||
//
|
||||
// Security Protection
|
||||
// ===================
|
||||
if (isset($_GET['SETS']) || isset($_POST['SETS'])) {
|
||||
$SETS = "";
|
||||
$SETS = '';
|
||||
}
|
||||
//
|
||||
// Timezone settings (>=PHP5.1)
|
||||
// ============================
|
||||
if(function_exists("date_default_timezone_set") and function_exists("date_default_timezone_get")) {
|
||||
@date_default_timezone_set(@date_default_timezone_get());
|
||||
if (function_exists('date_default_timezone_set') and function_exists('date_default_timezone_get')) {
|
||||
@date_default_timezone_set(@date_default_timezone_get());
|
||||
}
|
||||
//
|
||||
// Define common variables
|
||||
// =======================
|
||||
$chkDomainId = 0;
|
||||
$intError = 0;
|
||||
$intError = 0;
|
||||
//
|
||||
// Define path constants
|
||||
//
|
||||
define('BASE_PATH', str_replace("functions","",dirname(__FILE__)));
|
||||
//define('BASE_PATH', str_replace("functions", "", dirname(__FILE__)));
|
||||
//
|
||||
// Read settings file
|
||||
// ==================
|
||||
$preBasePath = str_replace("functions","",dirname(__FILE__));
|
||||
$preBasePath = str_replace('functions', '', __DIR__);
|
||||
$preIniFile = $preBasePath.'config/settings.php';
|
||||
//
|
||||
// Read file settings
|
||||
// ==================
|
||||
$SETS = parse_ini_file($preIniFile,true);
|
||||
$SETS = parse_ini_file($preIniFile, true);
|
||||
//
|
||||
// Include external function/class files - part 1
|
||||
// ==============================================
|
||||
include("mysqli_class.php");
|
||||
require $preBasePath.'functions/Autoloader.php';
|
||||
functions\Autoloader::register($preBasePath);
|
||||
//
|
||||
// Initialize classes - part 1
|
||||
// ===========================
|
||||
$myDBClass = new mysqlidb;
|
||||
$myDBClass = new functions\MysqliDbClass();
|
||||
$myDBClass->arrParams = $SETS['db'];
|
||||
$myDBClass->getDatabase();
|
||||
$myDBClass->hasDBConnection();
|
||||
if ($myDBClass->error == true) {
|
||||
$strDBMessage = $myDBClass->strErrorMessage;
|
||||
$booError = $myDBClass->error;
|
||||
$strDBMessage = $myDBClass->strErrorMessage;
|
||||
$booError = $myDBClass->error;
|
||||
}
|
||||
//
|
||||
// Get additional configuration from the table tbl_settings
|
||||
// ========================================================
|
||||
if ($intError == 0) {
|
||||
$strSQL = "SELECT `category`,`name`,`value` FROM `tbl_settings`";
|
||||
$booReturn = $myDBClass->getDataArray($strSQL,$arrDataLines,$intDataCount);
|
||||
if ($booReturn == false) {
|
||||
echo str_replace("::","\n","Error while selecting data from database: ".$myDBClass->strErrorMessage);
|
||||
$intError = 1;
|
||||
} else if ($intDataCount != 0) {
|
||||
for ($i=0;$i<$intDataCount;$i++) {
|
||||
$SETS[$arrDataLines[$i]['category']][$arrDataLines[$i]['name']] = $arrDataLines[$i]['value'];
|
||||
}
|
||||
}
|
||||
$strSQL = 'SELECT `category`,`name`,`value` FROM `tbl_settings`';
|
||||
$booReturn = $myDBClass->hasDataArray($strSQL, $arrDataLines, $intDataCount);
|
||||
if ($booReturn == false) {
|
||||
echo str_replace('::', "\n", 'Error while selecting data from database: ' .$myDBClass->strErrorMessage);
|
||||
$intError = 1;
|
||||
} elseif ($intDataCount != 0) {
|
||||
for ($i=0; $i<$intDataCount; $i++) {
|
||||
$SETS[$arrDataLines[$i]['category']][$arrDataLines[$i]['name']] = $arrDataLines[$i]['value'];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo "Could not load configuration settings from database - abort\n";
|
||||
exit;
|
||||
echo "Could not load configuration settings from database - abort\n";
|
||||
exit;
|
||||
}
|
||||
//
|
||||
// Include external function/class files
|
||||
// =====================================
|
||||
include("translator.php");
|
||||
include("data_class.php");
|
||||
include("config_class.php");
|
||||
include("import_class.php");
|
||||
require_once($preBasePath.'libraries/pear/HTML/Template/IT.php');
|
||||
include 'translator.php';
|
||||
//
|
||||
// Initialize classes
|
||||
// ==================
|
||||
$myDataClass = new nagdata;
|
||||
$myConfigClass = new nagconfig;
|
||||
$myImportClass = new nagimport;
|
||||
$arrSession = array();
|
||||
$arrSession['SETS'] = $SETS;
|
||||
$myDataClass = new functions\NagDataClass($arrSession);
|
||||
$myConfigClass = new functions\NagConfigClass($arrSession);
|
||||
$myImportClass = new functions\NagImportClass($arrSession);
|
||||
//
|
||||
// Propagating the classes themselves
|
||||
// ==================================
|
||||
$myDataClass->myDBClass =& $myDBClass;
|
||||
$myDataClass->myConfigClass =& $myConfigClass;
|
||||
$myConfigClass->myDBClass =& $myDBClass;
|
||||
$myConfigClass->myDataClass =& $myDataClass;
|
||||
$myImportClass->myDataClass =& $myDataClass;
|
||||
$myImportClass->myDBClass =& $myDBClass;
|
||||
$myImportClass->myConfigClass =& $myConfigClass;
|
||||
//
|
||||
// Set class variables
|
||||
// ===================
|
||||
$myDataClass->arrSettings = $SETS;
|
||||
$myConfigClass->arrSettings = $SETS;
|
||||
?>
|
||||
$myDataClass->myDBClass =& $myDBClass;
|
||||
$myDataClass->myConfigClass =& $myConfigClass;
|
||||
$myConfigClass->myDBClass =& $myDBClass;
|
||||
$myConfigClass->myDataClass =& $myDataClass;
|
||||
$myImportClass->myDataClass =& $myDataClass;
|
||||
$myImportClass->myDBClass =& $myDBClass;
|
||||
$myImportClass->myConfigClass =& $myConfigClass;
|
||||
|
||||
444
functions/tinyMCE/jscripts/tiny_mce/langs/en.js
vendored
444
functions/tinyMCE/jscripts/tiny_mce/langs/en.js
vendored
@@ -1,223 +1,223 @@
|
||||
tinyMCE.addI18n({en:{
|
||||
common:{
|
||||
edit_confirm:"Do you want to use the WYSIWYG mode for this textarea?",
|
||||
apply:"Apply",
|
||||
insert:"Insert",
|
||||
update:"Update",
|
||||
cancel:"Cancel",
|
||||
close:"Close",
|
||||
browse:"Browse",
|
||||
class_name:"Class",
|
||||
not_set:"-- Not set --",
|
||||
clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?",
|
||||
clipboard_no_support:"Currently not supported by your browser, use keyboard shortcuts instead.",
|
||||
popup_blocked:"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.",
|
||||
invalid_data:"{#field} is invalid",
|
||||
invalid_data_number:"{#field} must be a number",
|
||||
invalid_data_min:"{#field} must be a number greater than {#min}",
|
||||
invalid_data_size:"{#field} must be a number or percentage",
|
||||
more_colors:"More colors"
|
||||
},
|
||||
colors:{
|
||||
'000000':'Black',
|
||||
'993300':'Burnt orange',
|
||||
'333300':'Dark olive',
|
||||
'003300':'Dark green',
|
||||
'003366':'Dark azure',
|
||||
'000080':'Navy Blue',
|
||||
'333399':'Indigo',
|
||||
'333333':'Very dark gray',
|
||||
'800000':'Maroon',
|
||||
'FF6600':'Orange',
|
||||
'808000':'Olive',
|
||||
'008000':'Green',
|
||||
'008080':'Teal',
|
||||
'0000FF':'Blue',
|
||||
'666699':'Grayish blue',
|
||||
'808080':'Gray',
|
||||
'FF0000':'Red',
|
||||
'FF9900':'Amber',
|
||||
'99CC00':'Yellow green',
|
||||
'339966':'Sea green',
|
||||
'33CCCC':'Turquoise',
|
||||
'3366FF':'Royal blue',
|
||||
'800080':'Purple',
|
||||
'999999':'Medium gray',
|
||||
'FF00FF':'Magenta',
|
||||
'FFCC00':'Gold',
|
||||
'FFFF00':'Yellow',
|
||||
'00FF00':'Lime',
|
||||
'00FFFF':'Aqua',
|
||||
'00CCFF':'Sky blue',
|
||||
'993366':'Brown',
|
||||
'C0C0C0':'Silver',
|
||||
'FF99CC':'Pink',
|
||||
'FFCC99':'Peach',
|
||||
'FFFF99':'Light yellow',
|
||||
'CCFFCC':'Pale green',
|
||||
'CCFFFF':'Pale cyan',
|
||||
'99CCFF':'Light sky blue',
|
||||
'CC99FF':'Plum',
|
||||
'FFFFFF':'White'
|
||||
},
|
||||
contextmenu:{
|
||||
align:"Alignment",
|
||||
left:"Left",
|
||||
center:"Center",
|
||||
right:"Right",
|
||||
full:"Full"
|
||||
},
|
||||
insertdatetime:{
|
||||
date_fmt:"%Y-%m-%d",
|
||||
time_fmt:"%H:%M:%S",
|
||||
insertdate_desc:"Insert date",
|
||||
inserttime_desc:"Insert time",
|
||||
months_long:"January,February,March,April,May,June,July,August,September,October,November,December",
|
||||
months_short:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec",
|
||||
day_long:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
|
||||
day_short:"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun"
|
||||
},
|
||||
print:{
|
||||
print_desc:"Print"
|
||||
},
|
||||
preview:{
|
||||
preview_desc:"Preview"
|
||||
},
|
||||
directionality:{
|
||||
ltr_desc:"Direction left to right",
|
||||
rtl_desc:"Direction right to left"
|
||||
},
|
||||
layer:{
|
||||
insertlayer_desc:"Insert new layer",
|
||||
forward_desc:"Move forward",
|
||||
backward_desc:"Move backward",
|
||||
absolute_desc:"Toggle absolute positioning",
|
||||
content:"New layer..."
|
||||
},
|
||||
save:{
|
||||
save_desc:"Save",
|
||||
cancel_desc:"Cancel all changes"
|
||||
},
|
||||
nonbreaking:{
|
||||
nonbreaking_desc:"Insert non-breaking space character"
|
||||
},
|
||||
iespell:{
|
||||
iespell_desc:"Run spell checking",
|
||||
download:"ieSpell not detected. Do you want to install it now?"
|
||||
},
|
||||
advhr:{
|
||||
advhr_desc:"Horizontal rule"
|
||||
},
|
||||
emotions:{
|
||||
emotions_desc:"Emotions"
|
||||
},
|
||||
searchreplace:{
|
||||
search_desc:"Find",
|
||||
replace_desc:"Find/Replace"
|
||||
},
|
||||
advimage:{
|
||||
image_desc:"Insert/edit image"
|
||||
},
|
||||
advlink:{
|
||||
link_desc:"Insert/edit link"
|
||||
},
|
||||
xhtmlxtras:{
|
||||
cite_desc:"Citation",
|
||||
abbr_desc:"Abbreviation",
|
||||
acronym_desc:"Acronym",
|
||||
del_desc:"Deletion",
|
||||
ins_desc:"Insertion",
|
||||
attribs_desc:"Insert/Edit Attributes"
|
||||
},
|
||||
style:{
|
||||
desc:"Edit CSS Style"
|
||||
},
|
||||
paste:{
|
||||
paste_text_desc:"Paste as Plain Text",
|
||||
paste_word_desc:"Paste from Word",
|
||||
selectall_desc:"Select All",
|
||||
plaintext_mode_sticky:"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.",
|
||||
plaintext_mode:"Paste is now in plain text mode. Click again to toggle back to regular paste mode."
|
||||
},
|
||||
paste_dlg:{
|
||||
text_title:"Use CTRL+V on your keyboard to paste the text into the window.",
|
||||
text_linebreaks:"Keep linebreaks",
|
||||
word_title:"Use CTRL+V on your keyboard to paste the text into the window."
|
||||
},
|
||||
table:{
|
||||
desc:"Inserts a new table",
|
||||
row_before_desc:"Insert row before",
|
||||
row_after_desc:"Insert row after",
|
||||
delete_row_desc:"Delete row",
|
||||
col_before_desc:"Insert column before",
|
||||
col_after_desc:"Insert column after",
|
||||
delete_col_desc:"Remove column",
|
||||
split_cells_desc:"Split merged table cells",
|
||||
merge_cells_desc:"Merge table cells",
|
||||
row_desc:"Table row properties",
|
||||
cell_desc:"Table cell properties",
|
||||
props_desc:"Table properties",
|
||||
paste_row_before_desc:"Paste table row before",
|
||||
paste_row_after_desc:"Paste table row after",
|
||||
cut_row_desc:"Cut table row",
|
||||
copy_row_desc:"Copy table row",
|
||||
del:"Delete table",
|
||||
row:"Row",
|
||||
col:"Column",
|
||||
cell:"Cell"
|
||||
},
|
||||
autosave:{
|
||||
unload_msg:"The changes you made will be lost if you navigate away from this page.",
|
||||
restore_content:"Restore auto-saved content.",
|
||||
warning_message:"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?."
|
||||
},
|
||||
fullscreen:{
|
||||
desc:"Toggle fullscreen mode"
|
||||
},
|
||||
media:{
|
||||
desc:"Insert / edit embedded media",
|
||||
edit:"Edit embedded media"
|
||||
},
|
||||
fullpage:{
|
||||
desc:"Document properties"
|
||||
},
|
||||
template:{
|
||||
desc:"Insert predefined template content"
|
||||
},
|
||||
visualchars:{
|
||||
desc:"Visual control characters on/off."
|
||||
},
|
||||
spellchecker:{
|
||||
desc:"Toggle spellchecker",
|
||||
menu:"Spellchecker settings",
|
||||
ignore_word:"Ignore word",
|
||||
ignore_words:"Ignore all",
|
||||
langs:"Languages",
|
||||
wait:"Please wait...",
|
||||
sug:"Suggestions",
|
||||
no_sug:"No suggestions",
|
||||
no_mpell:"No misspellings found.",
|
||||
learn_word:"Learn word"
|
||||
},
|
||||
pagebreak:{
|
||||
desc:"Insert page break."
|
||||
},
|
||||
advlist:{
|
||||
types:"Types",
|
||||
def:"Default",
|
||||
lower_alpha:"Lower alpha",
|
||||
lower_greek:"Lower greek",
|
||||
lower_roman:"Lower roman",
|
||||
upper_alpha:"Upper alpha",
|
||||
upper_roman:"Upper roman",
|
||||
circle:"Circle",
|
||||
disc:"Disc",
|
||||
square:"Square"
|
||||
},
|
||||
aria:{
|
||||
rich_text_area:"Rich Text Area"
|
||||
},
|
||||
wordcount:{
|
||||
words: 'Words: '
|
||||
}
|
||||
tinyMCE.addI18n({en:{
|
||||
common:{
|
||||
edit_confirm:"Do you want to use the WYSIWYG mode for this textarea?",
|
||||
apply:"Apply",
|
||||
insert:"Insert",
|
||||
update:"Update",
|
||||
cancel:"Cancel",
|
||||
close:"Close",
|
||||
browse:"Browse",
|
||||
class_name:"Class",
|
||||
not_set:"-- Not set --",
|
||||
clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?",
|
||||
clipboard_no_support:"Currently not supported by your browser, use keyboard shortcuts instead.",
|
||||
popup_blocked:"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.",
|
||||
invalid_data:"{#field} is invalid",
|
||||
invalid_data_number:"{#field} must be a number",
|
||||
invalid_data_min:"{#field} must be a number greater than {#min}",
|
||||
invalid_data_size:"{#field} must be a number or percentage",
|
||||
more_colors:"More colors"
|
||||
},
|
||||
colors:{
|
||||
'000000':'Black',
|
||||
'993300':'Burnt orange',
|
||||
'333300':'Dark olive',
|
||||
'003300':'Dark green',
|
||||
'003366':'Dark azure',
|
||||
'000080':'Navy Blue',
|
||||
'333399':'Indigo',
|
||||
'333333':'Very dark gray',
|
||||
'800000':'Maroon',
|
||||
'FF6600':'Orange',
|
||||
'808000':'Olive',
|
||||
'008000':'Green',
|
||||
'008080':'Teal',
|
||||
'0000FF':'Blue',
|
||||
'666699':'Grayish blue',
|
||||
'808080':'Gray',
|
||||
'FF0000':'Red',
|
||||
'FF9900':'Amber',
|
||||
'99CC00':'Yellow green',
|
||||
'339966':'Sea green',
|
||||
'33CCCC':'Turquoise',
|
||||
'3366FF':'Royal blue',
|
||||
'800080':'Purple',
|
||||
'999999':'Medium gray',
|
||||
'FF00FF':'Magenta',
|
||||
'FFCC00':'Gold',
|
||||
'FFFF00':'Yellow',
|
||||
'00FF00':'Lime',
|
||||
'00FFFF':'Aqua',
|
||||
'00CCFF':'Sky blue',
|
||||
'993366':'Brown',
|
||||
'C0C0C0':'Silver',
|
||||
'FF99CC':'Pink',
|
||||
'FFCC99':'Peach',
|
||||
'FFFF99':'Light yellow',
|
||||
'CCFFCC':'Pale green',
|
||||
'CCFFFF':'Pale cyan',
|
||||
'99CCFF':'Light sky blue',
|
||||
'CC99FF':'Plum',
|
||||
'FFFFFF':'White'
|
||||
},
|
||||
contextmenu:{
|
||||
align:"Alignment",
|
||||
left:"Left",
|
||||
center:"Center",
|
||||
right:"Right",
|
||||
full:"Full"
|
||||
},
|
||||
insertdatetime:{
|
||||
date_fmt:"%Y-%m-%d",
|
||||
time_fmt:"%H:%M:%S",
|
||||
insertdate_desc:"Insert date",
|
||||
inserttime_desc:"Insert time",
|
||||
months_long:"January,February,March,April,May,June,July,August,September,October,November,December",
|
||||
months_short:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec",
|
||||
day_long:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
|
||||
day_short:"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun"
|
||||
},
|
||||
print:{
|
||||
print_desc:"Print"
|
||||
},
|
||||
preview:{
|
||||
preview_desc:"Preview"
|
||||
},
|
||||
directionality:{
|
||||
ltr_desc:"Direction left to right",
|
||||
rtl_desc:"Direction right to left"
|
||||
},
|
||||
layer:{
|
||||
insertlayer_desc:"Insert new layer",
|
||||
forward_desc:"Move forward",
|
||||
backward_desc:"Move backward",
|
||||
absolute_desc:"Toggle absolute positioning",
|
||||
content:"New layer..."
|
||||
},
|
||||
save:{
|
||||
save_desc:"Save",
|
||||
cancel_desc:"Cancel all changes"
|
||||
},
|
||||
nonbreaking:{
|
||||
nonbreaking_desc:"Insert non-breaking space character"
|
||||
},
|
||||
iespell:{
|
||||
iespell_desc:"Run spell checking",
|
||||
download:"ieSpell not detected. Do you want to install it now?"
|
||||
},
|
||||
advhr:{
|
||||
advhr_desc:"Horizontal rule"
|
||||
},
|
||||
emotions:{
|
||||
emotions_desc:"Emotions"
|
||||
},
|
||||
searchreplace:{
|
||||
search_desc:"Find",
|
||||
replace_desc:"Find/Replace"
|
||||
},
|
||||
advimage:{
|
||||
image_desc:"Insert/edit image"
|
||||
},
|
||||
advlink:{
|
||||
link_desc:"Insert/edit link"
|
||||
},
|
||||
xhtmlxtras:{
|
||||
cite_desc:"Citation",
|
||||
abbr_desc:"Abbreviation",
|
||||
acronym_desc:"Acronym",
|
||||
del_desc:"Deletion",
|
||||
ins_desc:"Insertion",
|
||||
attribs_desc:"Insert/Edit Attributes"
|
||||
},
|
||||
style:{
|
||||
desc:"Edit CSS Style"
|
||||
},
|
||||
paste:{
|
||||
paste_text_desc:"Paste as Plain Text",
|
||||
paste_word_desc:"Paste from Word",
|
||||
selectall_desc:"Select All",
|
||||
plaintext_mode_sticky:"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.",
|
||||
plaintext_mode:"Paste is now in plain text mode. Click again to toggle back to regular paste mode."
|
||||
},
|
||||
paste_dlg:{
|
||||
text_title:"Use CTRL+V on your keyboard to paste the text into the window.",
|
||||
text_linebreaks:"Keep linebreaks",
|
||||
word_title:"Use CTRL+V on your keyboard to paste the text into the window."
|
||||
},
|
||||
table:{
|
||||
desc:"Inserts a new table",
|
||||
row_before_desc:"Insert row before",
|
||||
row_after_desc:"Insert row after",
|
||||
delete_row_desc:"Delete row",
|
||||
col_before_desc:"Insert column before",
|
||||
col_after_desc:"Insert column after",
|
||||
delete_col_desc:"Remove column",
|
||||
split_cells_desc:"Split merged table cells",
|
||||
merge_cells_desc:"Merge table cells",
|
||||
row_desc:"Table row properties",
|
||||
cell_desc:"Table cell properties",
|
||||
props_desc:"Table properties",
|
||||
paste_row_before_desc:"Paste table row before",
|
||||
paste_row_after_desc:"Paste table row after",
|
||||
cut_row_desc:"Cut table row",
|
||||
copy_row_desc:"Copy table row",
|
||||
del:"Delete table",
|
||||
row:"Row",
|
||||
col:"Column",
|
||||
cell:"Cell"
|
||||
},
|
||||
autosave:{
|
||||
unload_msg:"The changes you made will be lost if you navigate away from this page.",
|
||||
restore_content:"Restore auto-saved content.",
|
||||
warning_message:"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?."
|
||||
},
|
||||
fullscreen:{
|
||||
desc:"Toggle fullscreen mode"
|
||||
},
|
||||
media:{
|
||||
desc:"Insert / edit embedded media",
|
||||
edit:"Edit embedded media"
|
||||
},
|
||||
fullpage:{
|
||||
desc:"Document properties"
|
||||
},
|
||||
template:{
|
||||
desc:"Insert predefined template content"
|
||||
},
|
||||
visualchars:{
|
||||
desc:"Visual control characters on/off."
|
||||
},
|
||||
spellchecker:{
|
||||
desc:"Toggle spellchecker",
|
||||
menu:"Spellchecker settings",
|
||||
ignore_word:"Ignore word",
|
||||
ignore_words:"Ignore all",
|
||||
langs:"Languages",
|
||||
wait:"Please wait...",
|
||||
sug:"Suggestions",
|
||||
no_sug:"No suggestions",
|
||||
no_mpell:"No misspellings found.",
|
||||
learn_word:"Learn word"
|
||||
},
|
||||
pagebreak:{
|
||||
desc:"Insert page break."
|
||||
},
|
||||
advlist:{
|
||||
types:"Types",
|
||||
def:"Default",
|
||||
lower_alpha:"Lower alpha",
|
||||
lower_greek:"Lower greek",
|
||||
lower_roman:"Lower roman",
|
||||
upper_alpha:"Upper alpha",
|
||||
upper_roman:"Upper roman",
|
||||
circle:"Circle",
|
||||
disc:"Disc",
|
||||
square:"Square"
|
||||
},
|
||||
aria:{
|
||||
rich_text_area:"Rich Text Area"
|
||||
},
|
||||
wordcount:{
|
||||
words: 'Words: '
|
||||
}
|
||||
}});
|
||||
File diff suppressed because it is too large
Load Diff
1
functions/tinyMCE/jscripts/tiny_mce/plugins/safari/blank.htm
vendored
Normal file
1
functions/tinyMCE/jscripts/tiny_mce/plugins/safari/blank.htm
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<!-- WebKit -->
|
||||
1
functions/tinyMCE/jscripts/tiny_mce/plugins/safari/editor_plugin.js
vendored
Normal file
1
functions/tinyMCE/jscripts/tiny_mce/plugins/safari/editor_plugin.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
.panel_wrapper {height:85px;}
|
||||
.panel_wrapper div.current {height:85px;}
|
||||
|
||||
/* IE */
|
||||
* html .panel_wrapper {height:100px;}
|
||||
* html .panel_wrapper div.current {height:100px;}
|
||||
.panel_wrapper {height:85px;}
|
||||
.panel_wrapper div.current {height:85px;}
|
||||
|
||||
/* IE */
|
||||
* html .panel_wrapper {height:100px;}
|
||||
* html .panel_wrapper div.current {height:100px;}
|
||||
|
||||
@@ -1,142 +1,142 @@
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var SearchReplaceDialog = {
|
||||
init : function(ed) {
|
||||
var t = this, f = document.forms[0], m = tinyMCEPopup.getWindowArg("mode");
|
||||
|
||||
t.switchMode(m);
|
||||
|
||||
f[m + '_panel_searchstring'].value = tinyMCEPopup.getWindowArg("search_string");
|
||||
|
||||
// Focus input field
|
||||
f[m + '_panel_searchstring'].focus();
|
||||
|
||||
mcTabs.onChange.add(function(tab_id, panel_id) {
|
||||
t.switchMode(tab_id.substring(0, tab_id.indexOf('_')));
|
||||
});
|
||||
},
|
||||
|
||||
switchMode : function(m) {
|
||||
var f, lm = this.lastMode;
|
||||
|
||||
if (lm != m) {
|
||||
f = document.forms[0];
|
||||
|
||||
if (lm) {
|
||||
f[m + '_panel_searchstring'].value = f[lm + '_panel_searchstring'].value;
|
||||
f[m + '_panel_backwardsu'].checked = f[lm + '_panel_backwardsu'].checked;
|
||||
f[m + '_panel_backwardsd'].checked = f[lm + '_panel_backwardsd'].checked;
|
||||
f[m + '_panel_casesensitivebox'].checked = f[lm + '_panel_casesensitivebox'].checked;
|
||||
}
|
||||
|
||||
mcTabs.displayTab(m + '_tab', m + '_panel');
|
||||
document.getElementById("replaceBtn").style.display = (m == "replace") ? "inline" : "none";
|
||||
document.getElementById("replaceAllBtn").style.display = (m == "replace") ? "inline" : "none";
|
||||
this.lastMode = m;
|
||||
}
|
||||
},
|
||||
|
||||
searchNext : function(a) {
|
||||
var ed = tinyMCEPopup.editor, se = ed.selection, r = se.getRng(), f, m = this.lastMode, s, b, fl = 0, w = ed.getWin(), wm = ed.windowManager, fo = 0;
|
||||
|
||||
// Get input
|
||||
f = document.forms[0];
|
||||
s = f[m + '_panel_searchstring'].value;
|
||||
b = f[m + '_panel_backwardsu'].checked;
|
||||
ca = f[m + '_panel_casesensitivebox'].checked;
|
||||
rs = f['replace_panel_replacestring'].value;
|
||||
|
||||
if (tinymce.isIE) {
|
||||
r = ed.getDoc().selection.createRange();
|
||||
}
|
||||
|
||||
if (s == '')
|
||||
return;
|
||||
|
||||
function fix() {
|
||||
// Correct Firefox graphics glitches
|
||||
// TODO: Verify if this is actually needed any more, maybe it was for very old FF versions?
|
||||
r = se.getRng().cloneRange();
|
||||
ed.getDoc().execCommand('SelectAll', false, null);
|
||||
se.setRng(r);
|
||||
};
|
||||
|
||||
function replace() {
|
||||
ed.selection.setContent(rs); // Needs to be duplicated due to selection bug in IE
|
||||
};
|
||||
|
||||
// IE flags
|
||||
if (ca)
|
||||
fl = fl | 4;
|
||||
|
||||
switch (a) {
|
||||
case 'all':
|
||||
// Move caret to beginning of text
|
||||
ed.execCommand('SelectAll');
|
||||
ed.selection.collapse(true);
|
||||
|
||||
if (tinymce.isIE) {
|
||||
ed.focus();
|
||||
r = ed.getDoc().selection.createRange();
|
||||
|
||||
while (r.findText(s, b ? -1 : 1, fl)) {
|
||||
r.scrollIntoView();
|
||||
r.select();
|
||||
replace();
|
||||
fo = 1;
|
||||
|
||||
if (b) {
|
||||
r.moveEnd("character", -(rs.length)); // Otherwise will loop forever
|
||||
}
|
||||
}
|
||||
|
||||
tinyMCEPopup.storeSelection();
|
||||
} else {
|
||||
while (w.find(s, ca, b, false, false, false, false)) {
|
||||
replace();
|
||||
fo = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (fo)
|
||||
tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.allreplaced'));
|
||||
else
|
||||
tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
|
||||
|
||||
return;
|
||||
|
||||
case 'current':
|
||||
if (!ed.selection.isCollapsed())
|
||||
replace();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
se.collapse(b);
|
||||
r = se.getRng();
|
||||
|
||||
// Whats the point
|
||||
if (!s)
|
||||
return;
|
||||
|
||||
if (tinymce.isIE) {
|
||||
ed.focus();
|
||||
r = ed.getDoc().selection.createRange();
|
||||
|
||||
if (r.findText(s, b ? -1 : 1, fl)) {
|
||||
r.scrollIntoView();
|
||||
r.select();
|
||||
} else
|
||||
tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
|
||||
|
||||
tinyMCEPopup.storeSelection();
|
||||
} else {
|
||||
if (!w.find(s, ca, b, false, false, false, false))
|
||||
tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
|
||||
else
|
||||
fix();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
tinyMCEPopup.onInit.add(SearchReplaceDialog.init, SearchReplaceDialog);
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var SearchReplaceDialog = {
|
||||
init : function(ed) {
|
||||
var t = this, f = document.forms[0], m = tinyMCEPopup.getWindowArg("mode");
|
||||
|
||||
t.switchMode(m);
|
||||
|
||||
f[m + '_panel_searchstring'].value = tinyMCEPopup.getWindowArg("search_string");
|
||||
|
||||
// Focus input field
|
||||
f[m + '_panel_searchstring'].focus();
|
||||
|
||||
mcTabs.onChange.add(function(tab_id, panel_id) {
|
||||
t.switchMode(tab_id.substring(0, tab_id.indexOf('_')));
|
||||
});
|
||||
},
|
||||
|
||||
switchMode : function(m) {
|
||||
var f, lm = this.lastMode;
|
||||
|
||||
if (lm != m) {
|
||||
f = document.forms[0];
|
||||
|
||||
if (lm) {
|
||||
f[m + '_panel_searchstring'].value = f[lm + '_panel_searchstring'].value;
|
||||
f[m + '_panel_backwardsu'].checked = f[lm + '_panel_backwardsu'].checked;
|
||||
f[m + '_panel_backwardsd'].checked = f[lm + '_panel_backwardsd'].checked;
|
||||
f[m + '_panel_casesensitivebox'].checked = f[lm + '_panel_casesensitivebox'].checked;
|
||||
}
|
||||
|
||||
mcTabs.displayTab(m + '_tab', m + '_panel');
|
||||
document.getElementById("replaceBtn").style.display = (m == "replace") ? "inline" : "none";
|
||||
document.getElementById("replaceAllBtn").style.display = (m == "replace") ? "inline" : "none";
|
||||
this.lastMode = m;
|
||||
}
|
||||
},
|
||||
|
||||
searchNext : function(a) {
|
||||
var ed = tinyMCEPopup.editor, se = ed.selection, r = se.getRng(), f, m = this.lastMode, s, b, fl = 0, w = ed.getWin(), wm = ed.windowManager, fo = 0;
|
||||
|
||||
// Get input
|
||||
f = document.forms[0];
|
||||
s = f[m + '_panel_searchstring'].value;
|
||||
b = f[m + '_panel_backwardsu'].checked;
|
||||
ca = f[m + '_panel_casesensitivebox'].checked;
|
||||
rs = f['replace_panel_replacestring'].value;
|
||||
|
||||
if (tinymce.isIE) {
|
||||
r = ed.getDoc().selection.createRange();
|
||||
}
|
||||
|
||||
if (s == '')
|
||||
return;
|
||||
|
||||
function fix() {
|
||||
// Correct Firefox graphics glitches
|
||||
// TODO: Verify if this is actually needed any more, maybe it was for very old FF versions?
|
||||
r = se.getRng().cloneRange();
|
||||
ed.getDoc().execCommand('SelectAll', false, null);
|
||||
se.setRng(r);
|
||||
};
|
||||
|
||||
function replace() {
|
||||
ed.selection.setContent(rs); // Needs to be duplicated due to selection bug in IE
|
||||
};
|
||||
|
||||
// IE flags
|
||||
if (ca)
|
||||
fl = fl | 4;
|
||||
|
||||
switch (a) {
|
||||
case 'all':
|
||||
// Move caret to beginning of text
|
||||
ed.execCommand('SelectAll');
|
||||
ed.selection.collapse(true);
|
||||
|
||||
if (tinymce.isIE) {
|
||||
ed.focus();
|
||||
r = ed.getDoc().selection.createRange();
|
||||
|
||||
while (r.findText(s, b ? -1 : 1, fl)) {
|
||||
r.scrollIntoView();
|
||||
r.select();
|
||||
replace();
|
||||
fo = 1;
|
||||
|
||||
if (b) {
|
||||
r.moveEnd("character", -(rs.length)); // Otherwise will loop forever
|
||||
}
|
||||
}
|
||||
|
||||
tinyMCEPopup.storeSelection();
|
||||
} else {
|
||||
while (w.find(s, ca, b, false, false, false, false)) {
|
||||
replace();
|
||||
fo = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (fo)
|
||||
tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.allreplaced'));
|
||||
else
|
||||
tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
|
||||
|
||||
return;
|
||||
|
||||
case 'current':
|
||||
if (!ed.selection.isCollapsed())
|
||||
replace();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
se.collapse(b);
|
||||
r = se.getRng();
|
||||
|
||||
// Whats the point
|
||||
if (!s)
|
||||
return;
|
||||
|
||||
if (tinymce.isIE) {
|
||||
ed.focus();
|
||||
r = ed.getDoc().selection.createRange();
|
||||
|
||||
if (r.findText(s, b ? -1 : 1, fl)) {
|
||||
r.scrollIntoView();
|
||||
r.select();
|
||||
} else
|
||||
tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
|
||||
|
||||
tinyMCEPopup.storeSelection();
|
||||
} else {
|
||||
if (!w.find(s, ca, b, false, false, false, false))
|
||||
tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
|
||||
else
|
||||
fix();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
tinyMCEPopup.onInit.add(SearchReplaceDialog.init, SearchReplaceDialog);
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
tinyMCE.addI18n('en.searchreplace_dlg',{
|
||||
searchnext_desc:"Find again",
|
||||
notfound:"The search has been completed. The search string could not be found.",
|
||||
search_title:"Find",
|
||||
replace_title:"Find/Replace",
|
||||
allreplaced:"All occurrences of the search string were replaced.",
|
||||
findwhat:"Find what",
|
||||
replacewith:"Replace with",
|
||||
direction:"Direction",
|
||||
up:"Up",
|
||||
down:"Down",
|
||||
mcase:"Match case",
|
||||
findnext:"Find next",
|
||||
replace:"Replace",
|
||||
replaceall:"Replace all"
|
||||
tinyMCE.addI18n('en.searchreplace_dlg',{
|
||||
searchnext_desc:"Find again",
|
||||
notfound:"The search has been completed. The search string could not be found.",
|
||||
search_title:"Find",
|
||||
replace_title:"Find/Replace",
|
||||
allreplaced:"All occurrences of the search string were replaced.",
|
||||
findwhat:"Find what",
|
||||
replacewith:"Replace with",
|
||||
direction:"Direction",
|
||||
up:"Up",
|
||||
down:"Down",
|
||||
mcase:"Match case",
|
||||
findnext:"Find next",
|
||||
replace:"Replace",
|
||||
replaceall:"Replace all"
|
||||
});
|
||||
@@ -1,100 +1,100 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#searchreplace_dlg.replace_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
||||
<script type="text/javascript" src="js/searchreplace.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="css/searchreplace.css" />
|
||||
</head>
|
||||
<body style="display:none;" role="application" aria-labelledby="app_title">
|
||||
<span id="app_title" style="display:none">{#searchreplace_dlg.replace_title}</span>
|
||||
<form onsubmit="SearchReplaceDialog.searchNext('none');return false;" action="#">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="search_tab" aria-controls="search_panel"><span><a href="javascript:SearchReplaceDialog.switchMode('search');" onmousedown="return false;">{#searchreplace.search_desc}</a></span></li>
|
||||
<li id="replace_tab" aria-controls="replace_panel"><span><a href="javascript:SearchReplaceDialog.switchMode('replace');" onmousedown="return false;">{#searchreplace_dlg.replace}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div id="search_panel" class="panel">
|
||||
<table role="presentation" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td><label for="search_panel_searchstring">{#searchreplace_dlg.findwhat}</label></td>
|
||||
<td><input type="text" id="search_panel_searchstring" name="search_panel_searchstring" style="width: 200px" aria-required="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table role="presentation" border="0" cellspacing="0" cellpadding="0" class="direction">
|
||||
<tr role="group" aria-labelledby="search_panel_backwards_label">
|
||||
<td><label id="search_panel_backwards_label">{#searchreplace_dlg.direction}</label></td>
|
||||
<td><input id="search_panel_backwardsu" name="search_panel_backwards" class="radio" type="radio" /></td>
|
||||
<td><label for="search_panel_backwardsu">{#searchreplace_dlg.up}</label></td>
|
||||
<td><input id="search_panel_backwardsd" name="search_panel_backwards" class="radio" type="radio" checked="checked" /></td>
|
||||
<td><label for="search_panel_backwardsd">{#searchreplace_dlg.down}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input id="search_panel_casesensitivebox" name="search_panel_casesensitivebox" class="checkbox" type="checkbox" /></td>
|
||||
<td><label for="search_panel_casesensitivebox">{#searchreplace_dlg.mcase}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="replace_panel" class="panel">
|
||||
<table role="presentation" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td><label for="replace_panel_searchstring">{#searchreplace_dlg.findwhat}</label></td>
|
||||
<td><input type="text" id="replace_panel_searchstring" name="replace_panel_searchstring" style="width: 200px" aria-required="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="replace_panel_replacestring">{#searchreplace_dlg.replacewith}</label></td>
|
||||
<td><input type="text" id="replace_panel_replacestring" name="replace_panel_replacestring" style="width: 200px" aria-required="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table role="presentation" border="0" cellspacing="0" cellpadding="0" class="direction">
|
||||
<tr role="group" aria-labelledby="replace_panel_dir_label">
|
||||
<td><label id="replace_panel_dir_label">{#searchreplace_dlg.direction}</label></td>
|
||||
<td><input id="replace_panel_backwardsu" name="replace_panel_backwards" class="radio" type="radio" /></td>
|
||||
<td><label for="replace_panel_backwardsu">{#searchreplace_dlg.up}</label></td>
|
||||
<td><input id="replace_panel_backwardsd" name="replace_panel_backwards" class="radio" type="radio" checked="checked" /></td>
|
||||
<td><label for="replace_panel_backwardsd">{#searchreplace_dlg.down}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input id="replace_panel_casesensitivebox" name="replace_panel_casesensitivebox" class="checkbox" type="checkbox" /></td>
|
||||
<td><label for="replace_panel_casesensitivebox">{#searchreplace_dlg.mcase}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<input type="submit" id="insert" name="insert" value="{#searchreplace_dlg.findnext}" />
|
||||
<input type="button" class="button" id="replaceBtn" name="replaceBtn" value="{#searchreplace_dlg.replace}" onclick="SearchReplaceDialog.searchNext('current');" />
|
||||
<input type="button" class="button" id="replaceAllBtn" name="replaceAllBtn" value="{#searchreplace_dlg.replaceall}" onclick="SearchReplaceDialog.searchNext('all');" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#searchreplace_dlg.replace_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
||||
<script type="text/javascript" src="js/searchreplace.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="css/searchreplace.css" />
|
||||
</head>
|
||||
<body style="display:none;" role="application" aria-labelledby="app_title">
|
||||
<span id="app_title" style="display:none">{#searchreplace_dlg.replace_title}</span>
|
||||
<form onsubmit="SearchReplaceDialog.searchNext('none');return false;" action="#">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="search_tab" aria-controls="search_panel"><span><a href="javascript:SearchReplaceDialog.switchMode('search');" onmousedown="return false;">{#searchreplace.search_desc}</a></span></li>
|
||||
<li id="replace_tab" aria-controls="replace_panel"><span><a href="javascript:SearchReplaceDialog.switchMode('replace');" onmousedown="return false;">{#searchreplace_dlg.replace}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div id="search_panel" class="panel">
|
||||
<table role="presentation" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td><label for="search_panel_searchstring">{#searchreplace_dlg.findwhat}</label></td>
|
||||
<td><input type="text" id="search_panel_searchstring" name="search_panel_searchstring" style="width: 200px" aria-required="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table role="presentation" border="0" cellspacing="0" cellpadding="0" class="direction">
|
||||
<tr role="group" aria-labelledby="search_panel_backwards_label">
|
||||
<td><label id="search_panel_backwards_label">{#searchreplace_dlg.direction}</label></td>
|
||||
<td><input id="search_panel_backwardsu" name="search_panel_backwards" class="radio" type="radio" /></td>
|
||||
<td><label for="search_panel_backwardsu">{#searchreplace_dlg.up}</label></td>
|
||||
<td><input id="search_panel_backwardsd" name="search_panel_backwards" class="radio" type="radio" checked="checked" /></td>
|
||||
<td><label for="search_panel_backwardsd">{#searchreplace_dlg.down}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input id="search_panel_casesensitivebox" name="search_panel_casesensitivebox" class="checkbox" type="checkbox" /></td>
|
||||
<td><label for="search_panel_casesensitivebox">{#searchreplace_dlg.mcase}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="replace_panel" class="panel">
|
||||
<table role="presentation" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td><label for="replace_panel_searchstring">{#searchreplace_dlg.findwhat}</label></td>
|
||||
<td><input type="text" id="replace_panel_searchstring" name="replace_panel_searchstring" style="width: 200px" aria-required="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="replace_panel_replacestring">{#searchreplace_dlg.replacewith}</label></td>
|
||||
<td><input type="text" id="replace_panel_replacestring" name="replace_panel_replacestring" style="width: 200px" aria-required="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table role="presentation" border="0" cellspacing="0" cellpadding="0" class="direction">
|
||||
<tr role="group" aria-labelledby="replace_panel_dir_label">
|
||||
<td><label id="replace_panel_dir_label">{#searchreplace_dlg.direction}</label></td>
|
||||
<td><input id="replace_panel_backwardsu" name="replace_panel_backwards" class="radio" type="radio" /></td>
|
||||
<td><label for="replace_panel_backwardsu">{#searchreplace_dlg.up}</label></td>
|
||||
<td><input id="replace_panel_backwardsd" name="replace_panel_backwards" class="radio" type="radio" checked="checked" /></td>
|
||||
<td><label for="replace_panel_backwardsd">{#searchreplace_dlg.down}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input id="replace_panel_casesensitivebox" name="replace_panel_casesensitivebox" class="checkbox" type="checkbox" /></td>
|
||||
<td><label for="replace_panel_casesensitivebox">{#searchreplace_dlg.mcase}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<input type="submit" id="insert" name="insert" value="{#searchreplace_dlg.findnext}" />
|
||||
<input type="button" class="button" id="replaceBtn" name="replaceBtn" value="{#searchreplace_dlg.replace}" onclick="SearchReplaceDialog.searchNext('current');" />
|
||||
<input type="button" class="button" id="replaceAllBtn" name="replaceAllBtn" value="{#searchreplace_dlg.replaceall}" onclick="SearchReplaceDialog.searchNext('all');" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,178 +1,178 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#table_dlg.cell_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
||||
<script type="text/javascript" src="../../utils/editable_selects.js"></script>
|
||||
<script type="text/javascript" src="js/cell.js"></script>
|
||||
<link href="css/cell.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body id="tablecell" style="display: none" role="application">
|
||||
<form onsubmit="updateAction();return false;" action="#">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
|
||||
<li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div id="general_panel" class="panel current">
|
||||
<fieldset>
|
||||
<legend>{#table_dlg.general_props}</legend>
|
||||
|
||||
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td><label for="align">{#table_dlg.align}</label></td>
|
||||
<td>
|
||||
<select id="align" name="align" class="mceFocus">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="center">{#table_dlg.align_middle}</option>
|
||||
<option value="left">{#table_dlg.align_left}</option>
|
||||
<option value="right">{#table_dlg.align_right}</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td><label for="celltype">{#table_dlg.cell_type}</label></td>
|
||||
<td>
|
||||
<select id="celltype" name="celltype">
|
||||
<option value="td">{#table_dlg.td}</option>
|
||||
<option value="th">{#table_dlg.th}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="valign">{#table_dlg.valign}</label></td>
|
||||
<td>
|
||||
<select id="valign" name="valign">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="top">{#table_dlg.align_top}</option>
|
||||
<option value="middle">{#table_dlg.align_middle}</option>
|
||||
<option value="bottom">{#table_dlg.align_bottom}</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td><label for="scope">{#table_dlg.scope}</label></td>
|
||||
<td>
|
||||
<select id="scope" name="scope">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="col">{#table.col}</option>
|
||||
<option value="row">{#table.row}</option>
|
||||
<option value="rowgroup">{#table_dlg.rowgroup}</option>
|
||||
<option value="colgroup">{#table_dlg.colgroup}</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="width">{#table_dlg.width}</label></td>
|
||||
<td><input id="width" name="width" type="text" value="" size="4" maxlength="4" onchange="changedSize();" /></td>
|
||||
|
||||
<td><label for="height">{#table_dlg.height}</label></td>
|
||||
<td><input id="height" name="height" type="text" value="" size="4" maxlength="4" onchange="changedSize();" /></td>
|
||||
</tr>
|
||||
|
||||
<tr id="styleSelectRow">
|
||||
<td><label for="class">{#class_name}</label></td>
|
||||
<td colspan="3">
|
||||
<select id="class" name="class" class="mceEditableSelect">
|
||||
<option value="" selected="selected">{#not_set}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="advanced_panel" class="panel">
|
||||
<fieldset>
|
||||
<legend>{#table_dlg.advanced_props}</legend>
|
||||
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
|
||||
<tr>
|
||||
<td class="column1"><label for="id">{#table_dlg.id}</label></td>
|
||||
<td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="style">{#table_dlg.style}</label></td>
|
||||
<td><input type="text" id="style" name="style" value="" style="width: 200px;" onchange="changedStyle();" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
|
||||
<td>
|
||||
<select id="dir" name="dir" style="width: 200px">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="ltr">{#table_dlg.ltr}</option>
|
||||
<option value="rtl">{#table_dlg.rtl}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="lang">{#table_dlg.langcode}</label></td>
|
||||
<td>
|
||||
<input id="lang" name="lang" type="text" value="" style="width: 200px" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
|
||||
<td>
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td>
|
||||
<td id="backgroundimagebrowsercontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr role="group" aria-labelledby="bordercolor_label">
|
||||
<td class="column1"><label id="bordercolor_label" for="bordercolor">{#table_dlg.bordercolor}</label></td>
|
||||
<td>
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td>
|
||||
<td id="bordercolor_pickcontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr role="group" aria-labelledby="bgcolor_label">
|
||||
<td class="column1"><label id="bgcolor_label" for="bgcolor">{#table_dlg.bgcolor}</label></td>
|
||||
<td>
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
|
||||
<td id="bgcolor_pickcontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<div>
|
||||
<select id="action" name="action">
|
||||
<option value="cell">{#table_dlg.cell_cell}</option>
|
||||
<option value="row">{#table_dlg.cell_row}</option>
|
||||
<option value="all">{#table_dlg.cell_all}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<input type="submit" id="insert" name="insert" value="{#update}" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#table_dlg.cell_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
||||
<script type="text/javascript" src="../../utils/editable_selects.js"></script>
|
||||
<script type="text/javascript" src="js/cell.js"></script>
|
||||
<link href="css/cell.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body id="tablecell" style="display: none" role="application">
|
||||
<form onsubmit="updateAction();return false;" action="#">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
|
||||
<li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div id="general_panel" class="panel current">
|
||||
<fieldset>
|
||||
<legend>{#table_dlg.general_props}</legend>
|
||||
|
||||
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td><label for="align">{#table_dlg.align}</label></td>
|
||||
<td>
|
||||
<select id="align" name="align" class="mceFocus">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="center">{#table_dlg.align_middle}</option>
|
||||
<option value="left">{#table_dlg.align_left}</option>
|
||||
<option value="right">{#table_dlg.align_right}</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td><label for="celltype">{#table_dlg.cell_type}</label></td>
|
||||
<td>
|
||||
<select id="celltype" name="celltype">
|
||||
<option value="td">{#table_dlg.td}</option>
|
||||
<option value="th">{#table_dlg.th}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="valign">{#table_dlg.valign}</label></td>
|
||||
<td>
|
||||
<select id="valign" name="valign">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="top">{#table_dlg.align_top}</option>
|
||||
<option value="middle">{#table_dlg.align_middle}</option>
|
||||
<option value="bottom">{#table_dlg.align_bottom}</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td><label for="scope">{#table_dlg.scope}</label></td>
|
||||
<td>
|
||||
<select id="scope" name="scope">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="col">{#table.col}</option>
|
||||
<option value="row">{#table.row}</option>
|
||||
<option value="rowgroup">{#table_dlg.rowgroup}</option>
|
||||
<option value="colgroup">{#table_dlg.colgroup}</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="width">{#table_dlg.width}</label></td>
|
||||
<td><input id="width" name="width" type="text" value="" size="4" maxlength="4" onchange="changedSize();" /></td>
|
||||
|
||||
<td><label for="height">{#table_dlg.height}</label></td>
|
||||
<td><input id="height" name="height" type="text" value="" size="4" maxlength="4" onchange="changedSize();" /></td>
|
||||
</tr>
|
||||
|
||||
<tr id="styleSelectRow">
|
||||
<td><label for="class">{#class_name}</label></td>
|
||||
<td colspan="3">
|
||||
<select id="class" name="class" class="mceEditableSelect">
|
||||
<option value="" selected="selected">{#not_set}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="advanced_panel" class="panel">
|
||||
<fieldset>
|
||||
<legend>{#table_dlg.advanced_props}</legend>
|
||||
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
|
||||
<tr>
|
||||
<td class="column1"><label for="id">{#table_dlg.id}</label></td>
|
||||
<td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="style">{#table_dlg.style}</label></td>
|
||||
<td><input type="text" id="style" name="style" value="" style="width: 200px;" onchange="changedStyle();" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
|
||||
<td>
|
||||
<select id="dir" name="dir" style="width: 200px">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="ltr">{#table_dlg.ltr}</option>
|
||||
<option value="rtl">{#table_dlg.rtl}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="lang">{#table_dlg.langcode}</label></td>
|
||||
<td>
|
||||
<input id="lang" name="lang" type="text" value="" style="width: 200px" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
|
||||
<td>
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td>
|
||||
<td id="backgroundimagebrowsercontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr role="group" aria-labelledby="bordercolor_label">
|
||||
<td class="column1"><label id="bordercolor_label" for="bordercolor">{#table_dlg.bordercolor}</label></td>
|
||||
<td>
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td>
|
||||
<td id="bordercolor_pickcontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr role="group" aria-labelledby="bgcolor_label">
|
||||
<td class="column1"><label id="bgcolor_label" for="bgcolor">{#table_dlg.bgcolor}</label></td>
|
||||
<td>
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
|
||||
<td id="bgcolor_pickcontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<div>
|
||||
<select id="action" name="action">
|
||||
<option value="cell">{#table_dlg.cell_cell}</option>
|
||||
<option value="row">{#table_dlg.cell_row}</option>
|
||||
<option value="all">{#table_dlg.cell_all}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<input type="submit" id="insert" name="insert" value="{#update}" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
/* CSS file for cell dialog in the table plugin */
|
||||
|
||||
.panel_wrapper div.current {
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.advfield {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
#action {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
#class {
|
||||
width: 150px;
|
||||
/* CSS file for cell dialog in the table plugin */
|
||||
|
||||
.panel_wrapper div.current {
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.advfield {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
#action {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
#class {
|
||||
width: 150px;
|
||||
}
|
||||
@@ -1,25 +1,25 @@
|
||||
/* CSS file for row dialog in the table plugin */
|
||||
|
||||
.panel_wrapper div.current {
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.advfield {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
#action {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
#rowtype,#align,#valign,#class,#height {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
#height {
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.col2 {
|
||||
padding-left: 20px;
|
||||
}
|
||||
/* CSS file for row dialog in the table plugin */
|
||||
|
||||
.panel_wrapper div.current {
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.advfield {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
#action {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
#rowtype,#align,#valign,#class,#height {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
#height {
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.col2 {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* CSS file for table dialog in the table plugin */
|
||||
|
||||
.panel_wrapper div.current {
|
||||
height: 245px;
|
||||
}
|
||||
|
||||
.advfield {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
#class {
|
||||
width: 150px;
|
||||
}
|
||||
/* CSS file for table dialog in the table plugin */
|
||||
|
||||
.panel_wrapper div.current {
|
||||
height: 245px;
|
||||
}
|
||||
|
||||
.advfield {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
#class {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
@@ -1,284 +1,284 @@
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var ed;
|
||||
|
||||
function init() {
|
||||
ed = tinyMCEPopup.editor;
|
||||
tinyMCEPopup.resizeToInnerSize();
|
||||
|
||||
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
||||
document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor');
|
||||
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor')
|
||||
|
||||
var inst = ed;
|
||||
var tdElm = ed.dom.getParent(ed.selection.getStart(), "td,th");
|
||||
var formObj = document.forms[0];
|
||||
var st = ed.dom.parseStyle(ed.dom.getAttrib(tdElm, "style"));
|
||||
|
||||
// Get table cell data
|
||||
var celltype = tdElm.nodeName.toLowerCase();
|
||||
var align = ed.dom.getAttrib(tdElm, 'align');
|
||||
var valign = ed.dom.getAttrib(tdElm, 'valign');
|
||||
var width = trimSize(getStyle(tdElm, 'width', 'width'));
|
||||
var height = trimSize(getStyle(tdElm, 'height', 'height'));
|
||||
var bordercolor = convertRGBToHex(getStyle(tdElm, 'bordercolor', 'borderLeftColor'));
|
||||
var bgcolor = convertRGBToHex(getStyle(tdElm, 'bgcolor', 'backgroundColor'));
|
||||
var className = ed.dom.getAttrib(tdElm, 'class');
|
||||
var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
|
||||
var id = ed.dom.getAttrib(tdElm, 'id');
|
||||
var lang = ed.dom.getAttrib(tdElm, 'lang');
|
||||
var dir = ed.dom.getAttrib(tdElm, 'dir');
|
||||
var scope = ed.dom.getAttrib(tdElm, 'scope');
|
||||
|
||||
// Setup form
|
||||
addClassesToList('class', 'table_cell_styles');
|
||||
TinyMCE_EditableSelects.init();
|
||||
|
||||
if (!ed.dom.hasClass(tdElm, 'mceSelected')) {
|
||||
formObj.bordercolor.value = bordercolor;
|
||||
formObj.bgcolor.value = bgcolor;
|
||||
formObj.backgroundimage.value = backgroundimage;
|
||||
formObj.width.value = width;
|
||||
formObj.height.value = height;
|
||||
formObj.id.value = id;
|
||||
formObj.lang.value = lang;
|
||||
formObj.style.value = ed.dom.serializeStyle(st);
|
||||
selectByValue(formObj, 'align', align);
|
||||
selectByValue(formObj, 'valign', valign);
|
||||
selectByValue(formObj, 'class', className, true, true);
|
||||
selectByValue(formObj, 'celltype', celltype);
|
||||
selectByValue(formObj, 'dir', dir);
|
||||
selectByValue(formObj, 'scope', scope);
|
||||
|
||||
// Resize some elements
|
||||
if (isVisible('backgroundimagebrowser'))
|
||||
document.getElementById('backgroundimage').style.width = '180px';
|
||||
|
||||
updateColor('bordercolor_pick', 'bordercolor');
|
||||
updateColor('bgcolor_pick', 'bgcolor');
|
||||
} else
|
||||
tinyMCEPopup.dom.hide('action');
|
||||
}
|
||||
|
||||
function updateAction() {
|
||||
var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0];
|
||||
|
||||
tinyMCEPopup.restoreSelection();
|
||||
el = ed.selection.getStart();
|
||||
tdElm = ed.dom.getParent(el, "td,th");
|
||||
trElm = ed.dom.getParent(el, "tr");
|
||||
tableElm = ed.dom.getParent(el, "table");
|
||||
|
||||
// Cell is selected
|
||||
if (ed.dom.hasClass(tdElm, 'mceSelected')) {
|
||||
// Update all selected sells
|
||||
tinymce.each(ed.dom.select('td.mceSelected,th.mceSelected'), function(td) {
|
||||
updateCell(td);
|
||||
});
|
||||
|
||||
ed.addVisual();
|
||||
ed.nodeChanged();
|
||||
inst.execCommand('mceEndUndoLevel');
|
||||
tinyMCEPopup.close();
|
||||
return;
|
||||
}
|
||||
|
||||
switch (getSelectValue(formObj, 'action')) {
|
||||
case "cell":
|
||||
var celltype = getSelectValue(formObj, 'celltype');
|
||||
var scope = getSelectValue(formObj, 'scope');
|
||||
|
||||
function doUpdate(s) {
|
||||
if (s) {
|
||||
updateCell(tdElm);
|
||||
|
||||
ed.addVisual();
|
||||
ed.nodeChanged();
|
||||
inst.execCommand('mceEndUndoLevel');
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
};
|
||||
|
||||
if (ed.getParam("accessibility_warnings", 1)) {
|
||||
if (celltype == "th" && scope == "")
|
||||
tinyMCEPopup.confirm(ed.getLang('table_dlg.missing_scope', '', true), doUpdate);
|
||||
else
|
||||
doUpdate(1);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
updateCell(tdElm);
|
||||
break;
|
||||
|
||||
case "row":
|
||||
var cell = trElm.firstChild;
|
||||
|
||||
if (cell.nodeName != "TD" && cell.nodeName != "TH")
|
||||
cell = nextCell(cell);
|
||||
|
||||
do {
|
||||
cell = updateCell(cell, true);
|
||||
} while ((cell = nextCell(cell)) != null);
|
||||
|
||||
break;
|
||||
|
||||
case "all":
|
||||
var rows = tableElm.getElementsByTagName("tr");
|
||||
|
||||
for (var i=0; i<rows.length; i++) {
|
||||
var cell = rows[i].firstChild;
|
||||
|
||||
if (cell.nodeName != "TD" && cell.nodeName != "TH")
|
||||
cell = nextCell(cell);
|
||||
|
||||
do {
|
||||
cell = updateCell(cell, true);
|
||||
} while ((cell = nextCell(cell)) != null);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
ed.addVisual();
|
||||
ed.nodeChanged();
|
||||
inst.execCommand('mceEndUndoLevel');
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
|
||||
function nextCell(elm) {
|
||||
while ((elm = elm.nextSibling) != null) {
|
||||
if (elm.nodeName == "TD" || elm.nodeName == "TH")
|
||||
return elm;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function updateCell(td, skip_id) {
|
||||
var inst = ed;
|
||||
var formObj = document.forms[0];
|
||||
var curCellType = td.nodeName.toLowerCase();
|
||||
var celltype = getSelectValue(formObj, 'celltype');
|
||||
var doc = inst.getDoc();
|
||||
var dom = ed.dom;
|
||||
|
||||
if (!skip_id)
|
||||
dom.setAttrib(td, 'id', formObj.id.value);
|
||||
|
||||
dom.setAttrib(td, 'align', formObj.align.value);
|
||||
dom.setAttrib(td, 'vAlign', formObj.valign.value);
|
||||
dom.setAttrib(td, 'lang', formObj.lang.value);
|
||||
dom.setAttrib(td, 'dir', getSelectValue(formObj, 'dir'));
|
||||
dom.setAttrib(td, 'style', ed.dom.serializeStyle(ed.dom.parseStyle(formObj.style.value)));
|
||||
dom.setAttrib(td, 'scope', formObj.scope.value);
|
||||
dom.setAttrib(td, 'class', getSelectValue(formObj, 'class'));
|
||||
|
||||
// Clear deprecated attributes
|
||||
ed.dom.setAttrib(td, 'width', '');
|
||||
ed.dom.setAttrib(td, 'height', '');
|
||||
ed.dom.setAttrib(td, 'bgColor', '');
|
||||
ed.dom.setAttrib(td, 'borderColor', '');
|
||||
ed.dom.setAttrib(td, 'background', '');
|
||||
|
||||
// Set styles
|
||||
td.style.width = getCSSSize(formObj.width.value);
|
||||
td.style.height = getCSSSize(formObj.height.value);
|
||||
if (formObj.bordercolor.value != "") {
|
||||
td.style.borderColor = formObj.bordercolor.value;
|
||||
td.style.borderStyle = td.style.borderStyle == "" ? "solid" : td.style.borderStyle;
|
||||
td.style.borderWidth = td.style.borderWidth == "" ? "1px" : td.style.borderWidth;
|
||||
} else
|
||||
td.style.borderColor = '';
|
||||
|
||||
td.style.backgroundColor = formObj.bgcolor.value;
|
||||
|
||||
if (formObj.backgroundimage.value != "")
|
||||
td.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
|
||||
else
|
||||
td.style.backgroundImage = '';
|
||||
|
||||
if (curCellType != celltype) {
|
||||
// changing to a different node type
|
||||
var newCell = doc.createElement(celltype);
|
||||
|
||||
for (var c=0; c<td.childNodes.length; c++)
|
||||
newCell.appendChild(td.childNodes[c].cloneNode(1));
|
||||
|
||||
for (var a=0; a<td.attributes.length; a++)
|
||||
ed.dom.setAttrib(newCell, td.attributes[a].name, ed.dom.getAttrib(td, td.attributes[a].name));
|
||||
|
||||
td.parentNode.replaceChild(newCell, td);
|
||||
td = newCell;
|
||||
}
|
||||
|
||||
dom.setAttrib(td, 'style', dom.serializeStyle(dom.parseStyle(td.style.cssText)));
|
||||
|
||||
return td;
|
||||
}
|
||||
|
||||
function changedBackgroundImage() {
|
||||
var formObj = document.forms[0];
|
||||
var st = ed.dom.parseStyle(formObj.style.value);
|
||||
|
||||
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
||||
|
||||
formObj.style.value = ed.dom.serializeStyle(st);
|
||||
}
|
||||
|
||||
function changedSize() {
|
||||
var formObj = document.forms[0];
|
||||
var st = ed.dom.parseStyle(formObj.style.value);
|
||||
|
||||
var width = formObj.width.value;
|
||||
if (width != "")
|
||||
st['width'] = getCSSSize(width);
|
||||
else
|
||||
st['width'] = "";
|
||||
|
||||
var height = formObj.height.value;
|
||||
if (height != "")
|
||||
st['height'] = getCSSSize(height);
|
||||
else
|
||||
st['height'] = "";
|
||||
|
||||
formObj.style.value = ed.dom.serializeStyle(st);
|
||||
}
|
||||
|
||||
function changedColor() {
|
||||
var formObj = document.forms[0];
|
||||
var st = ed.dom.parseStyle(formObj.style.value);
|
||||
|
||||
st['background-color'] = formObj.bgcolor.value;
|
||||
st['border-color'] = formObj.bordercolor.value;
|
||||
|
||||
formObj.style.value = ed.dom.serializeStyle(st);
|
||||
}
|
||||
|
||||
function changedStyle() {
|
||||
var formObj = document.forms[0];
|
||||
var st = ed.dom.parseStyle(formObj.style.value);
|
||||
|
||||
if (st['background-image'])
|
||||
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
||||
else
|
||||
formObj.backgroundimage.value = '';
|
||||
|
||||
if (st['width'])
|
||||
formObj.width.value = trimSize(st['width']);
|
||||
|
||||
if (st['height'])
|
||||
formObj.height.value = trimSize(st['height']);
|
||||
|
||||
if (st['background-color']) {
|
||||
formObj.bgcolor.value = st['background-color'];
|
||||
updateColor('bgcolor_pick','bgcolor');
|
||||
}
|
||||
|
||||
if (st['border-color']) {
|
||||
formObj.bordercolor.value = st['border-color'];
|
||||
updateColor('bordercolor_pick','bordercolor');
|
||||
}
|
||||
}
|
||||
|
||||
tinyMCEPopup.onInit.add(init);
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var ed;
|
||||
|
||||
function init() {
|
||||
ed = tinyMCEPopup.editor;
|
||||
tinyMCEPopup.resizeToInnerSize();
|
||||
|
||||
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
||||
document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor');
|
||||
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor')
|
||||
|
||||
var inst = ed;
|
||||
var tdElm = ed.dom.getParent(ed.selection.getStart(), "td,th");
|
||||
var formObj = document.forms[0];
|
||||
var st = ed.dom.parseStyle(ed.dom.getAttrib(tdElm, "style"));
|
||||
|
||||
// Get table cell data
|
||||
var celltype = tdElm.nodeName.toLowerCase();
|
||||
var align = ed.dom.getAttrib(tdElm, 'align');
|
||||
var valign = ed.dom.getAttrib(tdElm, 'valign');
|
||||
var width = trimSize(getStyle(tdElm, 'width', 'width'));
|
||||
var height = trimSize(getStyle(tdElm, 'height', 'height'));
|
||||
var bordercolor = convertRGBToHex(getStyle(tdElm, 'bordercolor', 'borderLeftColor'));
|
||||
var bgcolor = convertRGBToHex(getStyle(tdElm, 'bgcolor', 'backgroundColor'));
|
||||
var className = ed.dom.getAttrib(tdElm, 'class');
|
||||
var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
|
||||
var id = ed.dom.getAttrib(tdElm, 'id');
|
||||
var lang = ed.dom.getAttrib(tdElm, 'lang');
|
||||
var dir = ed.dom.getAttrib(tdElm, 'dir');
|
||||
var scope = ed.dom.getAttrib(tdElm, 'scope');
|
||||
|
||||
// Setup form
|
||||
addClassesToList('class', 'table_cell_styles');
|
||||
TinyMCE_EditableSelects.init();
|
||||
|
||||
if (!ed.dom.hasClass(tdElm, 'mceSelected')) {
|
||||
formObj.bordercolor.value = bordercolor;
|
||||
formObj.bgcolor.value = bgcolor;
|
||||
formObj.backgroundimage.value = backgroundimage;
|
||||
formObj.width.value = width;
|
||||
formObj.height.value = height;
|
||||
formObj.id.value = id;
|
||||
formObj.lang.value = lang;
|
||||
formObj.style.value = ed.dom.serializeStyle(st);
|
||||
selectByValue(formObj, 'align', align);
|
||||
selectByValue(formObj, 'valign', valign);
|
||||
selectByValue(formObj, 'class', className, true, true);
|
||||
selectByValue(formObj, 'celltype', celltype);
|
||||
selectByValue(formObj, 'dir', dir);
|
||||
selectByValue(formObj, 'scope', scope);
|
||||
|
||||
// Resize some elements
|
||||
if (isVisible('backgroundimagebrowser'))
|
||||
document.getElementById('backgroundimage').style.width = '180px';
|
||||
|
||||
updateColor('bordercolor_pick', 'bordercolor');
|
||||
updateColor('bgcolor_pick', 'bgcolor');
|
||||
} else
|
||||
tinyMCEPopup.dom.hide('action');
|
||||
}
|
||||
|
||||
function updateAction() {
|
||||
var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0];
|
||||
|
||||
tinyMCEPopup.restoreSelection();
|
||||
el = ed.selection.getStart();
|
||||
tdElm = ed.dom.getParent(el, "td,th");
|
||||
trElm = ed.dom.getParent(el, "tr");
|
||||
tableElm = ed.dom.getParent(el, "table");
|
||||
|
||||
// Cell is selected
|
||||
if (ed.dom.hasClass(tdElm, 'mceSelected')) {
|
||||
// Update all selected sells
|
||||
tinymce.each(ed.dom.select('td.mceSelected,th.mceSelected'), function(td) {
|
||||
updateCell(td);
|
||||
});
|
||||
|
||||
ed.addVisual();
|
||||
ed.nodeChanged();
|
||||
inst.execCommand('mceEndUndoLevel');
|
||||
tinyMCEPopup.close();
|
||||
return;
|
||||
}
|
||||
|
||||
switch (getSelectValue(formObj, 'action')) {
|
||||
case "cell":
|
||||
var celltype = getSelectValue(formObj, 'celltype');
|
||||
var scope = getSelectValue(formObj, 'scope');
|
||||
|
||||
function doUpdate(s) {
|
||||
if (s) {
|
||||
updateCell(tdElm);
|
||||
|
||||
ed.addVisual();
|
||||
ed.nodeChanged();
|
||||
inst.execCommand('mceEndUndoLevel');
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
};
|
||||
|
||||
if (ed.getParam("accessibility_warnings", 1)) {
|
||||
if (celltype == "th" && scope == "")
|
||||
tinyMCEPopup.confirm(ed.getLang('table_dlg.missing_scope', '', true), doUpdate);
|
||||
else
|
||||
doUpdate(1);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
updateCell(tdElm);
|
||||
break;
|
||||
|
||||
case "row":
|
||||
var cell = trElm.firstChild;
|
||||
|
||||
if (cell.nodeName != "TD" && cell.nodeName != "TH")
|
||||
cell = nextCell(cell);
|
||||
|
||||
do {
|
||||
cell = updateCell(cell, true);
|
||||
} while ((cell = nextCell(cell)) != null);
|
||||
|
||||
break;
|
||||
|
||||
case "all":
|
||||
var rows = tableElm.getElementsByTagName("tr");
|
||||
|
||||
for (var i=0; i<rows.length; i++) {
|
||||
var cell = rows[i].firstChild;
|
||||
|
||||
if (cell.nodeName != "TD" && cell.nodeName != "TH")
|
||||
cell = nextCell(cell);
|
||||
|
||||
do {
|
||||
cell = updateCell(cell, true);
|
||||
} while ((cell = nextCell(cell)) != null);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
ed.addVisual();
|
||||
ed.nodeChanged();
|
||||
inst.execCommand('mceEndUndoLevel');
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
|
||||
function nextCell(elm) {
|
||||
while ((elm = elm.nextSibling) != null) {
|
||||
if (elm.nodeName == "TD" || elm.nodeName == "TH")
|
||||
return elm;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function updateCell(td, skip_id) {
|
||||
var inst = ed;
|
||||
var formObj = document.forms[0];
|
||||
var curCellType = td.nodeName.toLowerCase();
|
||||
var celltype = getSelectValue(formObj, 'celltype');
|
||||
var doc = inst.getDoc();
|
||||
var dom = ed.dom;
|
||||
|
||||
if (!skip_id)
|
||||
dom.setAttrib(td, 'id', formObj.id.value);
|
||||
|
||||
dom.setAttrib(td, 'align', formObj.align.value);
|
||||
dom.setAttrib(td, 'vAlign', formObj.valign.value);
|
||||
dom.setAttrib(td, 'lang', formObj.lang.value);
|
||||
dom.setAttrib(td, 'dir', getSelectValue(formObj, 'dir'));
|
||||
dom.setAttrib(td, 'style', ed.dom.serializeStyle(ed.dom.parseStyle(formObj.style.value)));
|
||||
dom.setAttrib(td, 'scope', formObj.scope.value);
|
||||
dom.setAttrib(td, 'class', getSelectValue(formObj, 'class'));
|
||||
|
||||
// Clear deprecated attributes
|
||||
ed.dom.setAttrib(td, 'width', '');
|
||||
ed.dom.setAttrib(td, 'height', '');
|
||||
ed.dom.setAttrib(td, 'bgColor', '');
|
||||
ed.dom.setAttrib(td, 'borderColor', '');
|
||||
ed.dom.setAttrib(td, 'background', '');
|
||||
|
||||
// Set styles
|
||||
td.style.width = getCSSSize(formObj.width.value);
|
||||
td.style.height = getCSSSize(formObj.height.value);
|
||||
if (formObj.bordercolor.value != "") {
|
||||
td.style.borderColor = formObj.bordercolor.value;
|
||||
td.style.borderStyle = td.style.borderStyle == "" ? "solid" : td.style.borderStyle;
|
||||
td.style.borderWidth = td.style.borderWidth == "" ? "1px" : td.style.borderWidth;
|
||||
} else
|
||||
td.style.borderColor = '';
|
||||
|
||||
td.style.backgroundColor = formObj.bgcolor.value;
|
||||
|
||||
if (formObj.backgroundimage.value != "")
|
||||
td.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
|
||||
else
|
||||
td.style.backgroundImage = '';
|
||||
|
||||
if (curCellType != celltype) {
|
||||
// changing to a different node type
|
||||
var newCell = doc.createElement(celltype);
|
||||
|
||||
for (var c=0; c<td.childNodes.length; c++)
|
||||
newCell.appendChild(td.childNodes[c].cloneNode(1));
|
||||
|
||||
for (var a=0; a<td.attributes.length; a++)
|
||||
ed.dom.setAttrib(newCell, td.attributes[a].name, ed.dom.getAttrib(td, td.attributes[a].name));
|
||||
|
||||
td.parentNode.replaceChild(newCell, td);
|
||||
td = newCell;
|
||||
}
|
||||
|
||||
dom.setAttrib(td, 'style', dom.serializeStyle(dom.parseStyle(td.style.cssText)));
|
||||
|
||||
return td;
|
||||
}
|
||||
|
||||
function changedBackgroundImage() {
|
||||
var formObj = document.forms[0];
|
||||
var st = ed.dom.parseStyle(formObj.style.value);
|
||||
|
||||
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
||||
|
||||
formObj.style.value = ed.dom.serializeStyle(st);
|
||||
}
|
||||
|
||||
function changedSize() {
|
||||
var formObj = document.forms[0];
|
||||
var st = ed.dom.parseStyle(formObj.style.value);
|
||||
|
||||
var width = formObj.width.value;
|
||||
if (width != "")
|
||||
st['width'] = getCSSSize(width);
|
||||
else
|
||||
st['width'] = "";
|
||||
|
||||
var height = formObj.height.value;
|
||||
if (height != "")
|
||||
st['height'] = getCSSSize(height);
|
||||
else
|
||||
st['height'] = "";
|
||||
|
||||
formObj.style.value = ed.dom.serializeStyle(st);
|
||||
}
|
||||
|
||||
function changedColor() {
|
||||
var formObj = document.forms[0];
|
||||
var st = ed.dom.parseStyle(formObj.style.value);
|
||||
|
||||
st['background-color'] = formObj.bgcolor.value;
|
||||
st['border-color'] = formObj.bordercolor.value;
|
||||
|
||||
formObj.style.value = ed.dom.serializeStyle(st);
|
||||
}
|
||||
|
||||
function changedStyle() {
|
||||
var formObj = document.forms[0];
|
||||
var st = ed.dom.parseStyle(formObj.style.value);
|
||||
|
||||
if (st['background-image'])
|
||||
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
||||
else
|
||||
formObj.backgroundimage.value = '';
|
||||
|
||||
if (st['width'])
|
||||
formObj.width.value = trimSize(st['width']);
|
||||
|
||||
if (st['height'])
|
||||
formObj.height.value = trimSize(st['height']);
|
||||
|
||||
if (st['background-color']) {
|
||||
formObj.bgcolor.value = st['background-color'];
|
||||
updateColor('bgcolor_pick','bgcolor');
|
||||
}
|
||||
|
||||
if (st['border-color']) {
|
||||
formObj.bordercolor.value = st['border-color'];
|
||||
updateColor('bordercolor_pick','bordercolor');
|
||||
}
|
||||
}
|
||||
|
||||
tinyMCEPopup.onInit.add(init);
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var MergeCellsDialog = {
|
||||
init : function() {
|
||||
var f = document.forms[0];
|
||||
|
||||
f.numcols.value = tinyMCEPopup.getWindowArg('cols', 1);
|
||||
f.numrows.value = tinyMCEPopup.getWindowArg('rows', 1);
|
||||
},
|
||||
|
||||
merge : function() {
|
||||
var func, f = document.forms[0];
|
||||
|
||||
tinyMCEPopup.restoreSelection();
|
||||
|
||||
func = tinyMCEPopup.getWindowArg('onaction');
|
||||
|
||||
func({
|
||||
cols : f.numcols.value,
|
||||
rows : f.numrows.value
|
||||
});
|
||||
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
};
|
||||
|
||||
tinyMCEPopup.onInit.add(MergeCellsDialog.init, MergeCellsDialog);
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var MergeCellsDialog = {
|
||||
init : function() {
|
||||
var f = document.forms[0];
|
||||
|
||||
f.numcols.value = tinyMCEPopup.getWindowArg('cols', 1);
|
||||
f.numrows.value = tinyMCEPopup.getWindowArg('rows', 1);
|
||||
},
|
||||
|
||||
merge : function() {
|
||||
var func, f = document.forms[0];
|
||||
|
||||
tinyMCEPopup.restoreSelection();
|
||||
|
||||
func = tinyMCEPopup.getWindowArg('onaction');
|
||||
|
||||
func({
|
||||
cols : f.numcols.value,
|
||||
rows : f.numrows.value
|
||||
});
|
||||
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
};
|
||||
|
||||
tinyMCEPopup.onInit.add(MergeCellsDialog.init, MergeCellsDialog);
|
||||
|
||||
@@ -1,232 +1,232 @@
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
function init() {
|
||||
tinyMCEPopup.resizeToInnerSize();
|
||||
|
||||
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
||||
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
|
||||
|
||||
var inst = tinyMCEPopup.editor;
|
||||
var dom = inst.dom;
|
||||
var trElm = dom.getParent(inst.selection.getStart(), "tr");
|
||||
var formObj = document.forms[0];
|
||||
var st = dom.parseStyle(dom.getAttrib(trElm, "style"));
|
||||
|
||||
// Get table row data
|
||||
var rowtype = trElm.parentNode.nodeName.toLowerCase();
|
||||
var align = dom.getAttrib(trElm, 'align');
|
||||
var valign = dom.getAttrib(trElm, 'valign');
|
||||
var height = trimSize(getStyle(trElm, 'height', 'height'));
|
||||
var className = dom.getAttrib(trElm, 'class');
|
||||
var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor'));
|
||||
var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
|
||||
var id = dom.getAttrib(trElm, 'id');
|
||||
var lang = dom.getAttrib(trElm, 'lang');
|
||||
var dir = dom.getAttrib(trElm, 'dir');
|
||||
|
||||
selectByValue(formObj, 'rowtype', rowtype);
|
||||
|
||||
// Any cells selected
|
||||
if (dom.select('td.mceSelected,th.mceSelected', trElm).length == 0) {
|
||||
// Setup form
|
||||
addClassesToList('class', 'table_row_styles');
|
||||
TinyMCE_EditableSelects.init();
|
||||
|
||||
formObj.bgcolor.value = bgcolor;
|
||||
formObj.backgroundimage.value = backgroundimage;
|
||||
formObj.height.value = height;
|
||||
formObj.id.value = id;
|
||||
formObj.lang.value = lang;
|
||||
formObj.style.value = dom.serializeStyle(st);
|
||||
selectByValue(formObj, 'align', align);
|
||||
selectByValue(formObj, 'valign', valign);
|
||||
selectByValue(formObj, 'class', className, true, true);
|
||||
selectByValue(formObj, 'dir', dir);
|
||||
|
||||
// Resize some elements
|
||||
if (isVisible('backgroundimagebrowser'))
|
||||
document.getElementById('backgroundimage').style.width = '180px';
|
||||
|
||||
updateColor('bgcolor_pick', 'bgcolor');
|
||||
} else
|
||||
tinyMCEPopup.dom.hide('action');
|
||||
}
|
||||
|
||||
function updateAction() {
|
||||
var inst = tinyMCEPopup.editor, dom = inst.dom, trElm, tableElm, formObj = document.forms[0];
|
||||
var action = getSelectValue(formObj, 'action');
|
||||
|
||||
tinyMCEPopup.restoreSelection();
|
||||
trElm = dom.getParent(inst.selection.getStart(), "tr");
|
||||
tableElm = dom.getParent(inst.selection.getStart(), "table");
|
||||
|
||||
// Update all selected rows
|
||||
if (dom.select('td.mceSelected,th.mceSelected', trElm).length > 0) {
|
||||
tinymce.each(tableElm.rows, function(tr) {
|
||||
var i;
|
||||
|
||||
for (i = 0; i < tr.cells.length; i++) {
|
||||
if (dom.hasClass(tr.cells[i], 'mceSelected')) {
|
||||
updateRow(tr, true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
inst.addVisual();
|
||||
inst.nodeChanged();
|
||||
inst.execCommand('mceEndUndoLevel');
|
||||
tinyMCEPopup.close();
|
||||
return;
|
||||
}
|
||||
|
||||
switch (action) {
|
||||
case "row":
|
||||
updateRow(trElm);
|
||||
break;
|
||||
|
||||
case "all":
|
||||
var rows = tableElm.getElementsByTagName("tr");
|
||||
|
||||
for (var i=0; i<rows.length; i++)
|
||||
updateRow(rows[i], true);
|
||||
|
||||
break;
|
||||
|
||||
case "odd":
|
||||
case "even":
|
||||
var rows = tableElm.getElementsByTagName("tr");
|
||||
|
||||
for (var i=0; i<rows.length; i++) {
|
||||
if ((i % 2 == 0 && action == "odd") || (i % 2 != 0 && action == "even"))
|
||||
updateRow(rows[i], true, true);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
inst.addVisual();
|
||||
inst.nodeChanged();
|
||||
inst.execCommand('mceEndUndoLevel');
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
|
||||
function updateRow(tr_elm, skip_id, skip_parent) {
|
||||
var inst = tinyMCEPopup.editor;
|
||||
var formObj = document.forms[0];
|
||||
var dom = inst.dom;
|
||||
var curRowType = tr_elm.parentNode.nodeName.toLowerCase();
|
||||
var rowtype = getSelectValue(formObj, 'rowtype');
|
||||
var doc = inst.getDoc();
|
||||
|
||||
// Update row element
|
||||
if (!skip_id)
|
||||
dom.setAttrib(tr_elm, 'id', formObj.id.value);
|
||||
|
||||
dom.setAttrib(tr_elm, 'align', getSelectValue(formObj, 'align'));
|
||||
dom.setAttrib(tr_elm, 'vAlign', getSelectValue(formObj, 'valign'));
|
||||
dom.setAttrib(tr_elm, 'lang', formObj.lang.value);
|
||||
dom.setAttrib(tr_elm, 'dir', getSelectValue(formObj, 'dir'));
|
||||
dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(formObj.style.value)));
|
||||
dom.setAttrib(tr_elm, 'class', getSelectValue(formObj, 'class'));
|
||||
|
||||
// Clear deprecated attributes
|
||||
dom.setAttrib(tr_elm, 'background', '');
|
||||
dom.setAttrib(tr_elm, 'bgColor', '');
|
||||
dom.setAttrib(tr_elm, 'height', '');
|
||||
|
||||
// Set styles
|
||||
tr_elm.style.height = getCSSSize(formObj.height.value);
|
||||
tr_elm.style.backgroundColor = formObj.bgcolor.value;
|
||||
|
||||
if (formObj.backgroundimage.value != "")
|
||||
tr_elm.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
|
||||
else
|
||||
tr_elm.style.backgroundImage = '';
|
||||
|
||||
// Setup new rowtype
|
||||
if (curRowType != rowtype && !skip_parent) {
|
||||
// first, clone the node we are working on
|
||||
var newRow = tr_elm.cloneNode(1);
|
||||
|
||||
// next, find the parent of its new destination (creating it if necessary)
|
||||
var theTable = dom.getParent(tr_elm, "table");
|
||||
var dest = rowtype;
|
||||
var newParent = null;
|
||||
for (var i = 0; i < theTable.childNodes.length; i++) {
|
||||
if (theTable.childNodes[i].nodeName.toLowerCase() == dest)
|
||||
newParent = theTable.childNodes[i];
|
||||
}
|
||||
|
||||
if (newParent == null) {
|
||||
newParent = doc.createElement(dest);
|
||||
|
||||
if (theTable.firstChild.nodeName == 'CAPTION')
|
||||
inst.dom.insertAfter(newParent, theTable.firstChild);
|
||||
else
|
||||
theTable.insertBefore(newParent, theTable.firstChild);
|
||||
}
|
||||
|
||||
// append the row to the new parent
|
||||
newParent.appendChild(newRow);
|
||||
|
||||
// remove the original
|
||||
tr_elm.parentNode.removeChild(tr_elm);
|
||||
|
||||
// set tr_elm to the new node
|
||||
tr_elm = newRow;
|
||||
}
|
||||
|
||||
dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(tr_elm.style.cssText)));
|
||||
}
|
||||
|
||||
function changedBackgroundImage() {
|
||||
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
||||
var st = dom.parseStyle(formObj.style.value);
|
||||
|
||||
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
||||
|
||||
formObj.style.value = dom.serializeStyle(st);
|
||||
}
|
||||
|
||||
function changedStyle() {
|
||||
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
||||
var st = dom.parseStyle(formObj.style.value);
|
||||
|
||||
if (st['background-image'])
|
||||
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
||||
else
|
||||
formObj.backgroundimage.value = '';
|
||||
|
||||
if (st['height'])
|
||||
formObj.height.value = trimSize(st['height']);
|
||||
|
||||
if (st['background-color']) {
|
||||
formObj.bgcolor.value = st['background-color'];
|
||||
updateColor('bgcolor_pick','bgcolor');
|
||||
}
|
||||
}
|
||||
|
||||
function changedSize() {
|
||||
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
||||
var st = dom.parseStyle(formObj.style.value);
|
||||
|
||||
var height = formObj.height.value;
|
||||
if (height != "")
|
||||
st['height'] = getCSSSize(height);
|
||||
else
|
||||
st['height'] = "";
|
||||
|
||||
formObj.style.value = dom.serializeStyle(st);
|
||||
}
|
||||
|
||||
function changedColor() {
|
||||
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
||||
var st = dom.parseStyle(formObj.style.value);
|
||||
|
||||
st['background-color'] = formObj.bgcolor.value;
|
||||
|
||||
formObj.style.value = dom.serializeStyle(st);
|
||||
}
|
||||
|
||||
tinyMCEPopup.onInit.add(init);
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
function init() {
|
||||
tinyMCEPopup.resizeToInnerSize();
|
||||
|
||||
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
||||
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
|
||||
|
||||
var inst = tinyMCEPopup.editor;
|
||||
var dom = inst.dom;
|
||||
var trElm = dom.getParent(inst.selection.getStart(), "tr");
|
||||
var formObj = document.forms[0];
|
||||
var st = dom.parseStyle(dom.getAttrib(trElm, "style"));
|
||||
|
||||
// Get table row data
|
||||
var rowtype = trElm.parentNode.nodeName.toLowerCase();
|
||||
var align = dom.getAttrib(trElm, 'align');
|
||||
var valign = dom.getAttrib(trElm, 'valign');
|
||||
var height = trimSize(getStyle(trElm, 'height', 'height'));
|
||||
var className = dom.getAttrib(trElm, 'class');
|
||||
var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor'));
|
||||
var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
|
||||
var id = dom.getAttrib(trElm, 'id');
|
||||
var lang = dom.getAttrib(trElm, 'lang');
|
||||
var dir = dom.getAttrib(trElm, 'dir');
|
||||
|
||||
selectByValue(formObj, 'rowtype', rowtype);
|
||||
|
||||
// Any cells selected
|
||||
if (dom.select('td.mceSelected,th.mceSelected', trElm).length == 0) {
|
||||
// Setup form
|
||||
addClassesToList('class', 'table_row_styles');
|
||||
TinyMCE_EditableSelects.init();
|
||||
|
||||
formObj.bgcolor.value = bgcolor;
|
||||
formObj.backgroundimage.value = backgroundimage;
|
||||
formObj.height.value = height;
|
||||
formObj.id.value = id;
|
||||
formObj.lang.value = lang;
|
||||
formObj.style.value = dom.serializeStyle(st);
|
||||
selectByValue(formObj, 'align', align);
|
||||
selectByValue(formObj, 'valign', valign);
|
||||
selectByValue(formObj, 'class', className, true, true);
|
||||
selectByValue(formObj, 'dir', dir);
|
||||
|
||||
// Resize some elements
|
||||
if (isVisible('backgroundimagebrowser'))
|
||||
document.getElementById('backgroundimage').style.width = '180px';
|
||||
|
||||
updateColor('bgcolor_pick', 'bgcolor');
|
||||
} else
|
||||
tinyMCEPopup.dom.hide('action');
|
||||
}
|
||||
|
||||
function updateAction() {
|
||||
var inst = tinyMCEPopup.editor, dom = inst.dom, trElm, tableElm, formObj = document.forms[0];
|
||||
var action = getSelectValue(formObj, 'action');
|
||||
|
||||
tinyMCEPopup.restoreSelection();
|
||||
trElm = dom.getParent(inst.selection.getStart(), "tr");
|
||||
tableElm = dom.getParent(inst.selection.getStart(), "table");
|
||||
|
||||
// Update all selected rows
|
||||
if (dom.select('td.mceSelected,th.mceSelected', trElm).length > 0) {
|
||||
tinymce.each(tableElm.rows, function(tr) {
|
||||
var i;
|
||||
|
||||
for (i = 0; i < tr.cells.length; i++) {
|
||||
if (dom.hasClass(tr.cells[i], 'mceSelected')) {
|
||||
updateRow(tr, true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
inst.addVisual();
|
||||
inst.nodeChanged();
|
||||
inst.execCommand('mceEndUndoLevel');
|
||||
tinyMCEPopup.close();
|
||||
return;
|
||||
}
|
||||
|
||||
switch (action) {
|
||||
case "row":
|
||||
updateRow(trElm);
|
||||
break;
|
||||
|
||||
case "all":
|
||||
var rows = tableElm.getElementsByTagName("tr");
|
||||
|
||||
for (var i=0; i<rows.length; i++)
|
||||
updateRow(rows[i], true);
|
||||
|
||||
break;
|
||||
|
||||
case "odd":
|
||||
case "even":
|
||||
var rows = tableElm.getElementsByTagName("tr");
|
||||
|
||||
for (var i=0; i<rows.length; i++) {
|
||||
if ((i % 2 == 0 && action == "odd") || (i % 2 != 0 && action == "even"))
|
||||
updateRow(rows[i], true, true);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
inst.addVisual();
|
||||
inst.nodeChanged();
|
||||
inst.execCommand('mceEndUndoLevel');
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
|
||||
function updateRow(tr_elm, skip_id, skip_parent) {
|
||||
var inst = tinyMCEPopup.editor;
|
||||
var formObj = document.forms[0];
|
||||
var dom = inst.dom;
|
||||
var curRowType = tr_elm.parentNode.nodeName.toLowerCase();
|
||||
var rowtype = getSelectValue(formObj, 'rowtype');
|
||||
var doc = inst.getDoc();
|
||||
|
||||
// Update row element
|
||||
if (!skip_id)
|
||||
dom.setAttrib(tr_elm, 'id', formObj.id.value);
|
||||
|
||||
dom.setAttrib(tr_elm, 'align', getSelectValue(formObj, 'align'));
|
||||
dom.setAttrib(tr_elm, 'vAlign', getSelectValue(formObj, 'valign'));
|
||||
dom.setAttrib(tr_elm, 'lang', formObj.lang.value);
|
||||
dom.setAttrib(tr_elm, 'dir', getSelectValue(formObj, 'dir'));
|
||||
dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(formObj.style.value)));
|
||||
dom.setAttrib(tr_elm, 'class', getSelectValue(formObj, 'class'));
|
||||
|
||||
// Clear deprecated attributes
|
||||
dom.setAttrib(tr_elm, 'background', '');
|
||||
dom.setAttrib(tr_elm, 'bgColor', '');
|
||||
dom.setAttrib(tr_elm, 'height', '');
|
||||
|
||||
// Set styles
|
||||
tr_elm.style.height = getCSSSize(formObj.height.value);
|
||||
tr_elm.style.backgroundColor = formObj.bgcolor.value;
|
||||
|
||||
if (formObj.backgroundimage.value != "")
|
||||
tr_elm.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
|
||||
else
|
||||
tr_elm.style.backgroundImage = '';
|
||||
|
||||
// Setup new rowtype
|
||||
if (curRowType != rowtype && !skip_parent) {
|
||||
// first, clone the node we are working on
|
||||
var newRow = tr_elm.cloneNode(1);
|
||||
|
||||
// next, find the parent of its new destination (creating it if necessary)
|
||||
var theTable = dom.getParent(tr_elm, "table");
|
||||
var dest = rowtype;
|
||||
var newParent = null;
|
||||
for (var i = 0; i < theTable.childNodes.length; i++) {
|
||||
if (theTable.childNodes[i].nodeName.toLowerCase() == dest)
|
||||
newParent = theTable.childNodes[i];
|
||||
}
|
||||
|
||||
if (newParent == null) {
|
||||
newParent = doc.createElement(dest);
|
||||
|
||||
if (theTable.firstChild.nodeName == 'CAPTION')
|
||||
inst.dom.insertAfter(newParent, theTable.firstChild);
|
||||
else
|
||||
theTable.insertBefore(newParent, theTable.firstChild);
|
||||
}
|
||||
|
||||
// append the row to the new parent
|
||||
newParent.appendChild(newRow);
|
||||
|
||||
// remove the original
|
||||
tr_elm.parentNode.removeChild(tr_elm);
|
||||
|
||||
// set tr_elm to the new node
|
||||
tr_elm = newRow;
|
||||
}
|
||||
|
||||
dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(tr_elm.style.cssText)));
|
||||
}
|
||||
|
||||
function changedBackgroundImage() {
|
||||
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
||||
var st = dom.parseStyle(formObj.style.value);
|
||||
|
||||
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
||||
|
||||
formObj.style.value = dom.serializeStyle(st);
|
||||
}
|
||||
|
||||
function changedStyle() {
|
||||
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
||||
var st = dom.parseStyle(formObj.style.value);
|
||||
|
||||
if (st['background-image'])
|
||||
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
||||
else
|
||||
formObj.backgroundimage.value = '';
|
||||
|
||||
if (st['height'])
|
||||
formObj.height.value = trimSize(st['height']);
|
||||
|
||||
if (st['background-color']) {
|
||||
formObj.bgcolor.value = st['background-color'];
|
||||
updateColor('bgcolor_pick','bgcolor');
|
||||
}
|
||||
}
|
||||
|
||||
function changedSize() {
|
||||
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
||||
var st = dom.parseStyle(formObj.style.value);
|
||||
|
||||
var height = formObj.height.value;
|
||||
if (height != "")
|
||||
st['height'] = getCSSSize(height);
|
||||
else
|
||||
st['height'] = "";
|
||||
|
||||
formObj.style.value = dom.serializeStyle(st);
|
||||
}
|
||||
|
||||
function changedColor() {
|
||||
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
||||
var st = dom.parseStyle(formObj.style.value);
|
||||
|
||||
st['background-color'] = formObj.bgcolor.value;
|
||||
|
||||
formObj.style.value = dom.serializeStyle(st);
|
||||
}
|
||||
|
||||
tinyMCEPopup.onInit.add(init);
|
||||
|
||||
@@ -1,450 +1,450 @@
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var action, orgTableWidth, orgTableHeight, dom = tinyMCEPopup.editor.dom;
|
||||
|
||||
function insertTable() {
|
||||
var formObj = document.forms[0];
|
||||
var inst = tinyMCEPopup.editor, dom = inst.dom;
|
||||
var cols = 2, rows = 2, border = 0, cellpadding = -1, cellspacing = -1, align, width, height, className, caption, frame, rules;
|
||||
var html = '', capEl, elm;
|
||||
var cellLimit, rowLimit, colLimit;
|
||||
|
||||
tinyMCEPopup.restoreSelection();
|
||||
|
||||
if (!AutoValidator.validate(formObj)) {
|
||||
tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
|
||||
return false;
|
||||
}
|
||||
|
||||
elm = dom.getParent(inst.selection.getNode(), 'table');
|
||||
|
||||
// Get form data
|
||||
cols = formObj.elements['cols'].value;
|
||||
rows = formObj.elements['rows'].value;
|
||||
border = formObj.elements['border'].value != "" ? formObj.elements['border'].value : 0;
|
||||
cellpadding = formObj.elements['cellpadding'].value != "" ? formObj.elements['cellpadding'].value : "";
|
||||
cellspacing = formObj.elements['cellspacing'].value != "" ? formObj.elements['cellspacing'].value : "";
|
||||
align = getSelectValue(formObj, "align");
|
||||
frame = getSelectValue(formObj, "tframe");
|
||||
rules = getSelectValue(formObj, "rules");
|
||||
width = formObj.elements['width'].value;
|
||||
height = formObj.elements['height'].value;
|
||||
bordercolor = formObj.elements['bordercolor'].value;
|
||||
bgcolor = formObj.elements['bgcolor'].value;
|
||||
className = getSelectValue(formObj, "class");
|
||||
id = formObj.elements['id'].value;
|
||||
summary = formObj.elements['summary'].value;
|
||||
style = formObj.elements['style'].value;
|
||||
dir = formObj.elements['dir'].value;
|
||||
lang = formObj.elements['lang'].value;
|
||||
background = formObj.elements['backgroundimage'].value;
|
||||
caption = formObj.elements['caption'].checked;
|
||||
|
||||
cellLimit = tinyMCEPopup.getParam('table_cell_limit', false);
|
||||
rowLimit = tinyMCEPopup.getParam('table_row_limit', false);
|
||||
colLimit = tinyMCEPopup.getParam('table_col_limit', false);
|
||||
|
||||
// Validate table size
|
||||
if (colLimit && cols > colLimit) {
|
||||
tinyMCEPopup.alert(inst.getLang('table_dlg.col_limit').replace(/\{\$cols\}/g, colLimit));
|
||||
return false;
|
||||
} else if (rowLimit && rows > rowLimit) {
|
||||
tinyMCEPopup.alert(inst.getLang('table_dlg.row_limit').replace(/\{\$rows\}/g, rowLimit));
|
||||
return false;
|
||||
} else if (cellLimit && cols * rows > cellLimit) {
|
||||
tinyMCEPopup.alert(inst.getLang('table_dlg.cell_limit').replace(/\{\$cells\}/g, cellLimit));
|
||||
return false;
|
||||
}
|
||||
|
||||
// Update table
|
||||
if (action == "update") {
|
||||
dom.setAttrib(elm, 'cellPadding', cellpadding, true);
|
||||
dom.setAttrib(elm, 'cellSpacing', cellspacing, true);
|
||||
dom.setAttrib(elm, 'border', border);
|
||||
dom.setAttrib(elm, 'align', align);
|
||||
dom.setAttrib(elm, 'frame', frame);
|
||||
dom.setAttrib(elm, 'rules', rules);
|
||||
dom.setAttrib(elm, 'class', className);
|
||||
dom.setAttrib(elm, 'style', style);
|
||||
dom.setAttrib(elm, 'id', id);
|
||||
dom.setAttrib(elm, 'summary', summary);
|
||||
dom.setAttrib(elm, 'dir', dir);
|
||||
dom.setAttrib(elm, 'lang', lang);
|
||||
|
||||
capEl = inst.dom.select('caption', elm)[0];
|
||||
|
||||
if (capEl && !caption)
|
||||
capEl.parentNode.removeChild(capEl);
|
||||
|
||||
if (!capEl && caption) {
|
||||
capEl = elm.ownerDocument.createElement('caption');
|
||||
|
||||
if (!tinymce.isIE)
|
||||
capEl.innerHTML = '<br data-mce-bogus="1"/>';
|
||||
|
||||
elm.insertBefore(capEl, elm.firstChild);
|
||||
}
|
||||
|
||||
if (width && inst.settings.inline_styles) {
|
||||
dom.setStyle(elm, 'width', width);
|
||||
dom.setAttrib(elm, 'width', '');
|
||||
} else {
|
||||
dom.setAttrib(elm, 'width', width, true);
|
||||
dom.setStyle(elm, 'width', '');
|
||||
}
|
||||
|
||||
// Remove these since they are not valid XHTML
|
||||
dom.setAttrib(elm, 'borderColor', '');
|
||||
dom.setAttrib(elm, 'bgColor', '');
|
||||
dom.setAttrib(elm, 'background', '');
|
||||
|
||||
if (height && inst.settings.inline_styles) {
|
||||
dom.setStyle(elm, 'height', height);
|
||||
dom.setAttrib(elm, 'height', '');
|
||||
} else {
|
||||
dom.setAttrib(elm, 'height', height, true);
|
||||
dom.setStyle(elm, 'height', '');
|
||||
}
|
||||
|
||||
if (background != '')
|
||||
elm.style.backgroundImage = "url('" + background + "')";
|
||||
else
|
||||
elm.style.backgroundImage = '';
|
||||
|
||||
/* if (tinyMCEPopup.getParam("inline_styles")) {
|
||||
if (width != '')
|
||||
elm.style.width = getCSSSize(width);
|
||||
}*/
|
||||
|
||||
if (bordercolor != "") {
|
||||
elm.style.borderColor = bordercolor;
|
||||
elm.style.borderStyle = elm.style.borderStyle == "" ? "solid" : elm.style.borderStyle;
|
||||
elm.style.borderWidth = border == "" ? "1px" : border;
|
||||
} else
|
||||
elm.style.borderColor = '';
|
||||
|
||||
elm.style.backgroundColor = bgcolor;
|
||||
elm.style.height = getCSSSize(height);
|
||||
|
||||
inst.addVisual();
|
||||
|
||||
// Fix for stange MSIE align bug
|
||||
//elm.outerHTML = elm.outerHTML;
|
||||
|
||||
inst.nodeChanged();
|
||||
inst.execCommand('mceEndUndoLevel');
|
||||
|
||||
// Repaint if dimensions changed
|
||||
if (formObj.width.value != orgTableWidth || formObj.height.value != orgTableHeight)
|
||||
inst.execCommand('mceRepaint');
|
||||
|
||||
tinyMCEPopup.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
// Create new table
|
||||
html += '<table';
|
||||
|
||||
html += makeAttrib('id', id);
|
||||
html += makeAttrib('border', border);
|
||||
html += makeAttrib('cellpadding', cellpadding);
|
||||
html += makeAttrib('cellspacing', cellspacing);
|
||||
html += makeAttrib('data-mce-new', '1');
|
||||
|
||||
if (width && inst.settings.inline_styles) {
|
||||
if (style)
|
||||
style += '; ';
|
||||
|
||||
// Force px
|
||||
if (/^[0-9\.]+$/.test(width))
|
||||
width += 'px';
|
||||
|
||||
style += 'width: ' + width;
|
||||
} else
|
||||
html += makeAttrib('width', width);
|
||||
|
||||
/* if (height) {
|
||||
if (style)
|
||||
style += '; ';
|
||||
|
||||
style += 'height: ' + height;
|
||||
}*/
|
||||
|
||||
//html += makeAttrib('height', height);
|
||||
//html += makeAttrib('bordercolor', bordercolor);
|
||||
//html += makeAttrib('bgcolor', bgcolor);
|
||||
html += makeAttrib('align', align);
|
||||
html += makeAttrib('frame', frame);
|
||||
html += makeAttrib('rules', rules);
|
||||
html += makeAttrib('class', className);
|
||||
html += makeAttrib('style', style);
|
||||
html += makeAttrib('summary', summary);
|
||||
html += makeAttrib('dir', dir);
|
||||
html += makeAttrib('lang', lang);
|
||||
html += '>';
|
||||
|
||||
if (caption) {
|
||||
if (!tinymce.isIE)
|
||||
html += '<caption><br data-mce-bogus="1"/></caption>';
|
||||
else
|
||||
html += '<caption></caption>';
|
||||
}
|
||||
|
||||
for (var y=0; y<rows; y++) {
|
||||
html += "<tr>";
|
||||
|
||||
for (var x=0; x<cols; x++) {
|
||||
if (!tinymce.isIE)
|
||||
html += '<td><br data-mce-bogus="1"/></td>';
|
||||
else
|
||||
html += '<td></td>';
|
||||
}
|
||||
|
||||
html += "</tr>";
|
||||
}
|
||||
|
||||
html += "</table>";
|
||||
|
||||
// Move table
|
||||
if (inst.settings.fix_table_elements) {
|
||||
var patt = '';
|
||||
|
||||
inst.focus();
|
||||
inst.selection.setContent('<br class="_mce_marker" />');
|
||||
|
||||
tinymce.each('h1,h2,h3,h4,h5,h6,p'.split(','), function(n) {
|
||||
if (patt)
|
||||
patt += ',';
|
||||
|
||||
patt += n + ' ._mce_marker';
|
||||
});
|
||||
|
||||
tinymce.each(inst.dom.select(patt), function(n) {
|
||||
inst.dom.split(inst.dom.getParent(n, 'h1,h2,h3,h4,h5,h6,p'), n);
|
||||
});
|
||||
|
||||
dom.setOuterHTML(dom.select('br._mce_marker')[0], html);
|
||||
} else
|
||||
inst.execCommand('mceInsertContent', false, html);
|
||||
|
||||
tinymce.each(dom.select('table[data-mce-new]'), function(node) {
|
||||
var td = dom.select('td', node);
|
||||
|
||||
try {
|
||||
// IE9 might fail to do this selection
|
||||
inst.selection.select(td[0], true);
|
||||
inst.selection.collapse();
|
||||
} catch (ex) {
|
||||
// Ignore
|
||||
}
|
||||
|
||||
dom.setAttrib(node, 'data-mce-new', '');
|
||||
});
|
||||
|
||||
inst.addVisual();
|
||||
inst.execCommand('mceEndUndoLevel');
|
||||
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
|
||||
function makeAttrib(attrib, value) {
|
||||
var formObj = document.forms[0];
|
||||
var valueElm = formObj.elements[attrib];
|
||||
|
||||
if (typeof(value) == "undefined" || value == null) {
|
||||
value = "";
|
||||
|
||||
if (valueElm)
|
||||
value = valueElm.value;
|
||||
}
|
||||
|
||||
if (value == "")
|
||||
return "";
|
||||
|
||||
// XML encode it
|
||||
value = value.replace(/&/g, '&');
|
||||
value = value.replace(/\"/g, '"');
|
||||
value = value.replace(/</g, '<');
|
||||
value = value.replace(/>/g, '>');
|
||||
|
||||
return ' ' + attrib + '="' + value + '"';
|
||||
}
|
||||
|
||||
function init() {
|
||||
tinyMCEPopup.resizeToInnerSize();
|
||||
|
||||
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
||||
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
||||
document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor');
|
||||
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
|
||||
|
||||
var cols = 2, rows = 2, border = tinyMCEPopup.getParam('table_default_border', '0'), cellpadding = tinyMCEPopup.getParam('table_default_cellpadding', ''), cellspacing = tinyMCEPopup.getParam('table_default_cellspacing', '');
|
||||
var align = "", width = "", height = "", bordercolor = "", bgcolor = "", className = "";
|
||||
var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "", rules = "", frame = "";
|
||||
var inst = tinyMCEPopup.editor, dom = inst.dom;
|
||||
var formObj = document.forms[0];
|
||||
var elm = dom.getParent(inst.selection.getNode(), "table");
|
||||
|
||||
action = tinyMCEPopup.getWindowArg('action');
|
||||
|
||||
if (!action)
|
||||
action = elm ? "update" : "insert";
|
||||
|
||||
if (elm && action != "insert") {
|
||||
var rowsAr = elm.rows;
|
||||
var cols = 0;
|
||||
for (var i=0; i<rowsAr.length; i++)
|
||||
if (rowsAr[i].cells.length > cols)
|
||||
cols = rowsAr[i].cells.length;
|
||||
|
||||
cols = cols;
|
||||
rows = rowsAr.length;
|
||||
|
||||
st = dom.parseStyle(dom.getAttrib(elm, "style"));
|
||||
border = trimSize(getStyle(elm, 'border', 'borderWidth'));
|
||||
cellpadding = dom.getAttrib(elm, 'cellpadding', "");
|
||||
cellspacing = dom.getAttrib(elm, 'cellspacing', "");
|
||||
width = trimSize(getStyle(elm, 'width', 'width'));
|
||||
height = trimSize(getStyle(elm, 'height', 'height'));
|
||||
bordercolor = convertRGBToHex(getStyle(elm, 'bordercolor', 'borderLeftColor'));
|
||||
bgcolor = convertRGBToHex(getStyle(elm, 'bgcolor', 'backgroundColor'));
|
||||
align = dom.getAttrib(elm, 'align', align);
|
||||
frame = dom.getAttrib(elm, 'frame');
|
||||
rules = dom.getAttrib(elm, 'rules');
|
||||
className = tinymce.trim(dom.getAttrib(elm, 'class').replace(/mceItem.+/g, ''));
|
||||
id = dom.getAttrib(elm, 'id');
|
||||
summary = dom.getAttrib(elm, 'summary');
|
||||
style = dom.serializeStyle(st);
|
||||
dir = dom.getAttrib(elm, 'dir');
|
||||
lang = dom.getAttrib(elm, 'lang');
|
||||
background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
|
||||
formObj.caption.checked = elm.getElementsByTagName('caption').length > 0;
|
||||
|
||||
orgTableWidth = width;
|
||||
orgTableHeight = height;
|
||||
|
||||
action = "update";
|
||||
formObj.insert.value = inst.getLang('update');
|
||||
}
|
||||
|
||||
addClassesToList('class', "table_styles");
|
||||
TinyMCE_EditableSelects.init();
|
||||
|
||||
// Update form
|
||||
selectByValue(formObj, 'align', align);
|
||||
selectByValue(formObj, 'tframe', frame);
|
||||
selectByValue(formObj, 'rules', rules);
|
||||
selectByValue(formObj, 'class', className, true, true);
|
||||
formObj.cols.value = cols;
|
||||
formObj.rows.value = rows;
|
||||
formObj.border.value = border;
|
||||
formObj.cellpadding.value = cellpadding;
|
||||
formObj.cellspacing.value = cellspacing;
|
||||
formObj.width.value = width;
|
||||
formObj.height.value = height;
|
||||
formObj.bordercolor.value = bordercolor;
|
||||
formObj.bgcolor.value = bgcolor;
|
||||
formObj.id.value = id;
|
||||
formObj.summary.value = summary;
|
||||
formObj.style.value = style;
|
||||
formObj.dir.value = dir;
|
||||
formObj.lang.value = lang;
|
||||
formObj.backgroundimage.value = background;
|
||||
|
||||
updateColor('bordercolor_pick', 'bordercolor');
|
||||
updateColor('bgcolor_pick', 'bgcolor');
|
||||
|
||||
// Resize some elements
|
||||
if (isVisible('backgroundimagebrowser'))
|
||||
document.getElementById('backgroundimage').style.width = '180px';
|
||||
|
||||
// Disable some fields in update mode
|
||||
if (action == "update") {
|
||||
formObj.cols.disabled = true;
|
||||
formObj.rows.disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
function changedSize() {
|
||||
var formObj = document.forms[0];
|
||||
var st = dom.parseStyle(formObj.style.value);
|
||||
|
||||
/* var width = formObj.width.value;
|
||||
if (width != "")
|
||||
st['width'] = tinyMCEPopup.getParam("inline_styles") ? getCSSSize(width) : "";
|
||||
else
|
||||
st['width'] = "";*/
|
||||
|
||||
var height = formObj.height.value;
|
||||
if (height != "")
|
||||
st['height'] = getCSSSize(height);
|
||||
else
|
||||
st['height'] = "";
|
||||
|
||||
formObj.style.value = dom.serializeStyle(st);
|
||||
}
|
||||
|
||||
function changedBackgroundImage() {
|
||||
var formObj = document.forms[0];
|
||||
var st = dom.parseStyle(formObj.style.value);
|
||||
|
||||
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
||||
|
||||
formObj.style.value = dom.serializeStyle(st);
|
||||
}
|
||||
|
||||
function changedBorder() {
|
||||
var formObj = document.forms[0];
|
||||
var st = dom.parseStyle(formObj.style.value);
|
||||
|
||||
// Update border width if the element has a color
|
||||
if (formObj.border.value != "" && formObj.bordercolor.value != "")
|
||||
st['border-width'] = formObj.border.value + "px";
|
||||
|
||||
formObj.style.value = dom.serializeStyle(st);
|
||||
}
|
||||
|
||||
function changedColor() {
|
||||
var formObj = document.forms[0];
|
||||
var st = dom.parseStyle(formObj.style.value);
|
||||
|
||||
st['background-color'] = formObj.bgcolor.value;
|
||||
|
||||
if (formObj.bordercolor.value != "") {
|
||||
st['border-color'] = formObj.bordercolor.value;
|
||||
|
||||
// Add border-width if it's missing
|
||||
if (!st['border-width'])
|
||||
st['border-width'] = formObj.border.value == "" ? "1px" : formObj.border.value + "px";
|
||||
}
|
||||
|
||||
formObj.style.value = dom.serializeStyle(st);
|
||||
}
|
||||
|
||||
function changedStyle() {
|
||||
var formObj = document.forms[0];
|
||||
var st = dom.parseStyle(formObj.style.value);
|
||||
|
||||
if (st['background-image'])
|
||||
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
|
||||
else
|
||||
formObj.backgroundimage.value = '';
|
||||
|
||||
if (st['width'])
|
||||
formObj.width.value = trimSize(st['width']);
|
||||
|
||||
if (st['height'])
|
||||
formObj.height.value = trimSize(st['height']);
|
||||
|
||||
if (st['background-color']) {
|
||||
formObj.bgcolor.value = st['background-color'];
|
||||
updateColor('bgcolor_pick','bgcolor');
|
||||
}
|
||||
|
||||
if (st['border-color']) {
|
||||
formObj.bordercolor.value = st['border-color'];
|
||||
updateColor('bordercolor_pick','bordercolor');
|
||||
}
|
||||
}
|
||||
|
||||
tinyMCEPopup.onInit.add(init);
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var action, orgTableWidth, orgTableHeight, dom = tinyMCEPopup.editor.dom;
|
||||
|
||||
function insertTable() {
|
||||
var formObj = document.forms[0];
|
||||
var inst = tinyMCEPopup.editor, dom = inst.dom;
|
||||
var cols = 2, rows = 2, border = 0, cellpadding = -1, cellspacing = -1, align, width, height, className, caption, frame, rules;
|
||||
var html = '', capEl, elm;
|
||||
var cellLimit, rowLimit, colLimit;
|
||||
|
||||
tinyMCEPopup.restoreSelection();
|
||||
|
||||
if (!AutoValidator.validate(formObj)) {
|
||||
tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
|
||||
return false;
|
||||
}
|
||||
|
||||
elm = dom.getParent(inst.selection.getNode(), 'table');
|
||||
|
||||
// Get form data
|
||||
cols = formObj.elements['cols'].value;
|
||||
rows = formObj.elements['rows'].value;
|
||||
border = formObj.elements['border'].value != "" ? formObj.elements['border'].value : 0;
|
||||
cellpadding = formObj.elements['cellpadding'].value != "" ? formObj.elements['cellpadding'].value : "";
|
||||
cellspacing = formObj.elements['cellspacing'].value != "" ? formObj.elements['cellspacing'].value : "";
|
||||
align = getSelectValue(formObj, "align");
|
||||
frame = getSelectValue(formObj, "tframe");
|
||||
rules = getSelectValue(formObj, "rules");
|
||||
width = formObj.elements['width'].value;
|
||||
height = formObj.elements['height'].value;
|
||||
bordercolor = formObj.elements['bordercolor'].value;
|
||||
bgcolor = formObj.elements['bgcolor'].value;
|
||||
className = getSelectValue(formObj, "class");
|
||||
id = formObj.elements['id'].value;
|
||||
summary = formObj.elements['summary'].value;
|
||||
style = formObj.elements['style'].value;
|
||||
dir = formObj.elements['dir'].value;
|
||||
lang = formObj.elements['lang'].value;
|
||||
background = formObj.elements['backgroundimage'].value;
|
||||
caption = formObj.elements['caption'].checked;
|
||||
|
||||
cellLimit = tinyMCEPopup.getParam('table_cell_limit', false);
|
||||
rowLimit = tinyMCEPopup.getParam('table_row_limit', false);
|
||||
colLimit = tinyMCEPopup.getParam('table_col_limit', false);
|
||||
|
||||
// Validate table size
|
||||
if (colLimit && cols > colLimit) {
|
||||
tinyMCEPopup.alert(inst.getLang('table_dlg.col_limit').replace(/\{\$cols\}/g, colLimit));
|
||||
return false;
|
||||
} else if (rowLimit && rows > rowLimit) {
|
||||
tinyMCEPopup.alert(inst.getLang('table_dlg.row_limit').replace(/\{\$rows\}/g, rowLimit));
|
||||
return false;
|
||||
} else if (cellLimit && cols * rows > cellLimit) {
|
||||
tinyMCEPopup.alert(inst.getLang('table_dlg.cell_limit').replace(/\{\$cells\}/g, cellLimit));
|
||||
return false;
|
||||
}
|
||||
|
||||
// Update table
|
||||
if (action == "update") {
|
||||
dom.setAttrib(elm, 'cellPadding', cellpadding, true);
|
||||
dom.setAttrib(elm, 'cellSpacing', cellspacing, true);
|
||||
dom.setAttrib(elm, 'border', border);
|
||||
dom.setAttrib(elm, 'align', align);
|
||||
dom.setAttrib(elm, 'frame', frame);
|
||||
dom.setAttrib(elm, 'rules', rules);
|
||||
dom.setAttrib(elm, 'class', className);
|
||||
dom.setAttrib(elm, 'style', style);
|
||||
dom.setAttrib(elm, 'id', id);
|
||||
dom.setAttrib(elm, 'summary', summary);
|
||||
dom.setAttrib(elm, 'dir', dir);
|
||||
dom.setAttrib(elm, 'lang', lang);
|
||||
|
||||
capEl = inst.dom.select('caption', elm)[0];
|
||||
|
||||
if (capEl && !caption)
|
||||
capEl.parentNode.removeChild(capEl);
|
||||
|
||||
if (!capEl && caption) {
|
||||
capEl = elm.ownerDocument.createElement('caption');
|
||||
|
||||
if (!tinymce.isIE)
|
||||
capEl.innerHTML = '<br data-mce-bogus="1"/>';
|
||||
|
||||
elm.insertBefore(capEl, elm.firstChild);
|
||||
}
|
||||
|
||||
if (width && inst.settings.inline_styles) {
|
||||
dom.setStyle(elm, 'width', width);
|
||||
dom.setAttrib(elm, 'width', '');
|
||||
} else {
|
||||
dom.setAttrib(elm, 'width', width, true);
|
||||
dom.setStyle(elm, 'width', '');
|
||||
}
|
||||
|
||||
// Remove these since they are not valid XHTML
|
||||
dom.setAttrib(elm, 'borderColor', '');
|
||||
dom.setAttrib(elm, 'bgColor', '');
|
||||
dom.setAttrib(elm, 'background', '');
|
||||
|
||||
if (height && inst.settings.inline_styles) {
|
||||
dom.setStyle(elm, 'height', height);
|
||||
dom.setAttrib(elm, 'height', '');
|
||||
} else {
|
||||
dom.setAttrib(elm, 'height', height, true);
|
||||
dom.setStyle(elm, 'height', '');
|
||||
}
|
||||
|
||||
if (background != '')
|
||||
elm.style.backgroundImage = "url('" + background + "')";
|
||||
else
|
||||
elm.style.backgroundImage = '';
|
||||
|
||||
/* if (tinyMCEPopup.getParam("inline_styles")) {
|
||||
if (width != '')
|
||||
elm.style.width = getCSSSize(width);
|
||||
}*/
|
||||
|
||||
if (bordercolor != "") {
|
||||
elm.style.borderColor = bordercolor;
|
||||
elm.style.borderStyle = elm.style.borderStyle == "" ? "solid" : elm.style.borderStyle;
|
||||
elm.style.borderWidth = border == "" ? "1px" : border;
|
||||
} else
|
||||
elm.style.borderColor = '';
|
||||
|
||||
elm.style.backgroundColor = bgcolor;
|
||||
elm.style.height = getCSSSize(height);
|
||||
|
||||
inst.addVisual();
|
||||
|
||||
// Fix for stange MSIE align bug
|
||||
//elm.outerHTML = elm.outerHTML;
|
||||
|
||||
inst.nodeChanged();
|
||||
inst.execCommand('mceEndUndoLevel');
|
||||
|
||||
// Repaint if dimensions changed
|
||||
if (formObj.width.value != orgTableWidth || formObj.height.value != orgTableHeight)
|
||||
inst.execCommand('mceRepaint');
|
||||
|
||||
tinyMCEPopup.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
// Create new table
|
||||
html += '<table';
|
||||
|
||||
html += makeAttrib('id', id);
|
||||
html += makeAttrib('border', border);
|
||||
html += makeAttrib('cellpadding', cellpadding);
|
||||
html += makeAttrib('cellspacing', cellspacing);
|
||||
html += makeAttrib('data-mce-new', '1');
|
||||
|
||||
if (width && inst.settings.inline_styles) {
|
||||
if (style)
|
||||
style += '; ';
|
||||
|
||||
// Force px
|
||||
if (/^[0-9\.]+$/.test(width))
|
||||
width += 'px';
|
||||
|
||||
style += 'width: ' + width;
|
||||
} else
|
||||
html += makeAttrib('width', width);
|
||||
|
||||
/* if (height) {
|
||||
if (style)
|
||||
style += '; ';
|
||||
|
||||
style += 'height: ' + height;
|
||||
}*/
|
||||
|
||||
//html += makeAttrib('height', height);
|
||||
//html += makeAttrib('bordercolor', bordercolor);
|
||||
//html += makeAttrib('bgcolor', bgcolor);
|
||||
html += makeAttrib('align', align);
|
||||
html += makeAttrib('frame', frame);
|
||||
html += makeAttrib('rules', rules);
|
||||
html += makeAttrib('class', className);
|
||||
html += makeAttrib('style', style);
|
||||
html += makeAttrib('summary', summary);
|
||||
html += makeAttrib('dir', dir);
|
||||
html += makeAttrib('lang', lang);
|
||||
html += '>';
|
||||
|
||||
if (caption) {
|
||||
if (!tinymce.isIE)
|
||||
html += '<caption><br data-mce-bogus="1"/></caption>';
|
||||
else
|
||||
html += '<caption></caption>';
|
||||
}
|
||||
|
||||
for (var y=0; y<rows; y++) {
|
||||
html += "<tr>";
|
||||
|
||||
for (var x=0; x<cols; x++) {
|
||||
if (!tinymce.isIE)
|
||||
html += '<td><br data-mce-bogus="1"/></td>';
|
||||
else
|
||||
html += '<td></td>';
|
||||
}
|
||||
|
||||
html += "</tr>";
|
||||
}
|
||||
|
||||
html += "</table>";
|
||||
|
||||
// Move table
|
||||
if (inst.settings.fix_table_elements) {
|
||||
var patt = '';
|
||||
|
||||
inst.focus();
|
||||
inst.selection.setContent('<br class="_mce_marker" />');
|
||||
|
||||
tinymce.each('h1,h2,h3,h4,h5,h6,p'.split(','), function(n) {
|
||||
if (patt)
|
||||
patt += ',';
|
||||
|
||||
patt += n + ' ._mce_marker';
|
||||
});
|
||||
|
||||
tinymce.each(inst.dom.select(patt), function(n) {
|
||||
inst.dom.split(inst.dom.getParent(n, 'h1,h2,h3,h4,h5,h6,p'), n);
|
||||
});
|
||||
|
||||
dom.setOuterHTML(dom.select('br._mce_marker')[0], html);
|
||||
} else
|
||||
inst.execCommand('mceInsertContent', false, html);
|
||||
|
||||
tinymce.each(dom.select('table[data-mce-new]'), function(node) {
|
||||
var td = dom.select('td', node);
|
||||
|
||||
try {
|
||||
// IE9 might fail to do this selection
|
||||
inst.selection.select(td[0], true);
|
||||
inst.selection.collapse();
|
||||
} catch (ex) {
|
||||
// Ignore
|
||||
}
|
||||
|
||||
dom.setAttrib(node, 'data-mce-new', '');
|
||||
});
|
||||
|
||||
inst.addVisual();
|
||||
inst.execCommand('mceEndUndoLevel');
|
||||
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
|
||||
function makeAttrib(attrib, value) {
|
||||
var formObj = document.forms[0];
|
||||
var valueElm = formObj.elements[attrib];
|
||||
|
||||
if (typeof(value) == "undefined" || value == null) {
|
||||
value = "";
|
||||
|
||||
if (valueElm)
|
||||
value = valueElm.value;
|
||||
}
|
||||
|
||||
if (value == "")
|
||||
return "";
|
||||
|
||||
// XML encode it
|
||||
value = value.replace(/&/g, '&');
|
||||
value = value.replace(/\"/g, '"');
|
||||
value = value.replace(/</g, '<');
|
||||
value = value.replace(/>/g, '>');
|
||||
|
||||
return ' ' + attrib + '="' + value + '"';
|
||||
}
|
||||
|
||||
function init() {
|
||||
tinyMCEPopup.resizeToInnerSize();
|
||||
|
||||
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
||||
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
||||
document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor');
|
||||
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
|
||||
|
||||
var cols = 2, rows = 2, border = tinyMCEPopup.getParam('table_default_border', '0'), cellpadding = tinyMCEPopup.getParam('table_default_cellpadding', ''), cellspacing = tinyMCEPopup.getParam('table_default_cellspacing', '');
|
||||
var align = "", width = "", height = "", bordercolor = "", bgcolor = "", className = "";
|
||||
var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "", rules = "", frame = "";
|
||||
var inst = tinyMCEPopup.editor, dom = inst.dom;
|
||||
var formObj = document.forms[0];
|
||||
var elm = dom.getParent(inst.selection.getNode(), "table");
|
||||
|
||||
action = tinyMCEPopup.getWindowArg('action');
|
||||
|
||||
if (!action)
|
||||
action = elm ? "update" : "insert";
|
||||
|
||||
if (elm && action != "insert") {
|
||||
var rowsAr = elm.rows;
|
||||
var cols = 0;
|
||||
for (var i=0; i<rowsAr.length; i++)
|
||||
if (rowsAr[i].cells.length > cols)
|
||||
cols = rowsAr[i].cells.length;
|
||||
|
||||
cols = cols;
|
||||
rows = rowsAr.length;
|
||||
|
||||
st = dom.parseStyle(dom.getAttrib(elm, "style"));
|
||||
border = trimSize(getStyle(elm, 'border', 'borderWidth'));
|
||||
cellpadding = dom.getAttrib(elm, 'cellpadding', "");
|
||||
cellspacing = dom.getAttrib(elm, 'cellspacing', "");
|
||||
width = trimSize(getStyle(elm, 'width', 'width'));
|
||||
height = trimSize(getStyle(elm, 'height', 'height'));
|
||||
bordercolor = convertRGBToHex(getStyle(elm, 'bordercolor', 'borderLeftColor'));
|
||||
bgcolor = convertRGBToHex(getStyle(elm, 'bgcolor', 'backgroundColor'));
|
||||
align = dom.getAttrib(elm, 'align', align);
|
||||
frame = dom.getAttrib(elm, 'frame');
|
||||
rules = dom.getAttrib(elm, 'rules');
|
||||
className = tinymce.trim(dom.getAttrib(elm, 'class').replace(/mceItem.+/g, ''));
|
||||
id = dom.getAttrib(elm, 'id');
|
||||
summary = dom.getAttrib(elm, 'summary');
|
||||
style = dom.serializeStyle(st);
|
||||
dir = dom.getAttrib(elm, 'dir');
|
||||
lang = dom.getAttrib(elm, 'lang');
|
||||
background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
|
||||
formObj.caption.checked = elm.getElementsByTagName('caption').length > 0;
|
||||
|
||||
orgTableWidth = width;
|
||||
orgTableHeight = height;
|
||||
|
||||
action = "update";
|
||||
formObj.insert.value = inst.getLang('update');
|
||||
}
|
||||
|
||||
addClassesToList('class', "table_styles");
|
||||
TinyMCE_EditableSelects.init();
|
||||
|
||||
// Update form
|
||||
selectByValue(formObj, 'align', align);
|
||||
selectByValue(formObj, 'tframe', frame);
|
||||
selectByValue(formObj, 'rules', rules);
|
||||
selectByValue(formObj, 'class', className, true, true);
|
||||
formObj.cols.value = cols;
|
||||
formObj.rows.value = rows;
|
||||
formObj.border.value = border;
|
||||
formObj.cellpadding.value = cellpadding;
|
||||
formObj.cellspacing.value = cellspacing;
|
||||
formObj.width.value = width;
|
||||
formObj.height.value = height;
|
||||
formObj.bordercolor.value = bordercolor;
|
||||
formObj.bgcolor.value = bgcolor;
|
||||
formObj.id.value = id;
|
||||
formObj.summary.value = summary;
|
||||
formObj.style.value = style;
|
||||
formObj.dir.value = dir;
|
||||
formObj.lang.value = lang;
|
||||
formObj.backgroundimage.value = background;
|
||||
|
||||
updateColor('bordercolor_pick', 'bordercolor');
|
||||
updateColor('bgcolor_pick', 'bgcolor');
|
||||
|
||||
// Resize some elements
|
||||
if (isVisible('backgroundimagebrowser'))
|
||||
document.getElementById('backgroundimage').style.width = '180px';
|
||||
|
||||
// Disable some fields in update mode
|
||||
if (action == "update") {
|
||||
formObj.cols.disabled = true;
|
||||
formObj.rows.disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
function changedSize() {
|
||||
var formObj = document.forms[0];
|
||||
var st = dom.parseStyle(formObj.style.value);
|
||||
|
||||
/* var width = formObj.width.value;
|
||||
if (width != "")
|
||||
st['width'] = tinyMCEPopup.getParam("inline_styles") ? getCSSSize(width) : "";
|
||||
else
|
||||
st['width'] = "";*/
|
||||
|
||||
var height = formObj.height.value;
|
||||
if (height != "")
|
||||
st['height'] = getCSSSize(height);
|
||||
else
|
||||
st['height'] = "";
|
||||
|
||||
formObj.style.value = dom.serializeStyle(st);
|
||||
}
|
||||
|
||||
function changedBackgroundImage() {
|
||||
var formObj = document.forms[0];
|
||||
var st = dom.parseStyle(formObj.style.value);
|
||||
|
||||
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
||||
|
||||
formObj.style.value = dom.serializeStyle(st);
|
||||
}
|
||||
|
||||
function changedBorder() {
|
||||
var formObj = document.forms[0];
|
||||
var st = dom.parseStyle(formObj.style.value);
|
||||
|
||||
// Update border width if the element has a color
|
||||
if (formObj.border.value != "" && formObj.bordercolor.value != "")
|
||||
st['border-width'] = formObj.border.value + "px";
|
||||
|
||||
formObj.style.value = dom.serializeStyle(st);
|
||||
}
|
||||
|
||||
function changedColor() {
|
||||
var formObj = document.forms[0];
|
||||
var st = dom.parseStyle(formObj.style.value);
|
||||
|
||||
st['background-color'] = formObj.bgcolor.value;
|
||||
|
||||
if (formObj.bordercolor.value != "") {
|
||||
st['border-color'] = formObj.bordercolor.value;
|
||||
|
||||
// Add border-width if it's missing
|
||||
if (!st['border-width'])
|
||||
st['border-width'] = formObj.border.value == "" ? "1px" : formObj.border.value + "px";
|
||||
}
|
||||
|
||||
formObj.style.value = dom.serializeStyle(st);
|
||||
}
|
||||
|
||||
function changedStyle() {
|
||||
var formObj = document.forms[0];
|
||||
var st = dom.parseStyle(formObj.style.value);
|
||||
|
||||
if (st['background-image'])
|
||||
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
|
||||
else
|
||||
formObj.backgroundimage.value = '';
|
||||
|
||||
if (st['width'])
|
||||
formObj.width.value = trimSize(st['width']);
|
||||
|
||||
if (st['height'])
|
||||
formObj.height.value = trimSize(st['height']);
|
||||
|
||||
if (st['background-color']) {
|
||||
formObj.bgcolor.value = st['background-color'];
|
||||
updateColor('bgcolor_pick','bgcolor');
|
||||
}
|
||||
|
||||
if (st['border-color']) {
|
||||
formObj.bordercolor.value = st['border-color'];
|
||||
updateColor('bordercolor_pick','bordercolor');
|
||||
}
|
||||
}
|
||||
|
||||
tinyMCEPopup.onInit.add(init);
|
||||
|
||||
@@ -1,74 +1,74 @@
|
||||
tinyMCE.addI18n('en.table_dlg',{
|
||||
general_tab:"General",
|
||||
advanced_tab:"Advanced",
|
||||
general_props:"General properties",
|
||||
advanced_props:"Advanced properties",
|
||||
rowtype:"Row in table part",
|
||||
title:"Insert/Modify table",
|
||||
width:"Width",
|
||||
height:"Height",
|
||||
cols:"Columns",
|
||||
rows:"Rows",
|
||||
cellspacing:"Cellspacing",
|
||||
cellpadding:"Cellpadding",
|
||||
border:"Border",
|
||||
align:"Alignment",
|
||||
align_default:"Default",
|
||||
align_left:"Left",
|
||||
align_right:"Right",
|
||||
align_middle:"Center",
|
||||
row_title:"Table row properties",
|
||||
cell_title:"Table cell properties",
|
||||
cell_type:"Cell type",
|
||||
valign:"Vertical alignment",
|
||||
align_top:"Top",
|
||||
align_bottom:"Bottom",
|
||||
bordercolor:"Border color",
|
||||
bgcolor:"Background color",
|
||||
merge_cells_title:"Merge table cells",
|
||||
id:"Id",
|
||||
style:"Style",
|
||||
langdir:"Language direction",
|
||||
langcode:"Language code",
|
||||
mime:"Target MIME type",
|
||||
ltr:"Left to right",
|
||||
rtl:"Right to left",
|
||||
bgimage:"Background image",
|
||||
summary:"Summary",
|
||||
td:"Data",
|
||||
th:"Header",
|
||||
cell_cell:"Update current cell",
|
||||
cell_row:"Update all cells in row",
|
||||
cell_all:"Update all cells in table",
|
||||
row_row:"Update current row",
|
||||
row_odd:"Update odd rows in table",
|
||||
row_even:"Update even rows in table",
|
||||
row_all:"Update all rows in table",
|
||||
thead:"Table Head",
|
||||
tbody:"Table Body",
|
||||
tfoot:"Table Foot",
|
||||
scope:"Scope",
|
||||
rowgroup:"Row Group",
|
||||
colgroup:"Col Group",
|
||||
col_limit:"You've exceeded the maximum number of columns of {$cols}.",
|
||||
row_limit:"You've exceeded the maximum number of rows of {$rows}.",
|
||||
cell_limit:"You've exceeded the maximum number of cells of {$cells}.",
|
||||
missing_scope:"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.",
|
||||
caption:"Table caption",
|
||||
frame:"Frame",
|
||||
frame_none:"none",
|
||||
frame_groups:"groups",
|
||||
frame_rows:"rows",
|
||||
frame_cols:"cols",
|
||||
frame_all:"all",
|
||||
rules:"Rules",
|
||||
rules_void:"void",
|
||||
rules_above:"above",
|
||||
rules_below:"below",
|
||||
rules_hsides:"hsides",
|
||||
rules_lhs:"lhs",
|
||||
rules_rhs:"rhs",
|
||||
rules_vsides:"vsides",
|
||||
rules_box:"box",
|
||||
rules_border:"border"
|
||||
tinyMCE.addI18n('en.table_dlg',{
|
||||
general_tab:"General",
|
||||
advanced_tab:"Advanced",
|
||||
general_props:"General properties",
|
||||
advanced_props:"Advanced properties",
|
||||
rowtype:"Row in table part",
|
||||
title:"Insert/Modify table",
|
||||
width:"Width",
|
||||
height:"Height",
|
||||
cols:"Columns",
|
||||
rows:"Rows",
|
||||
cellspacing:"Cellspacing",
|
||||
cellpadding:"Cellpadding",
|
||||
border:"Border",
|
||||
align:"Alignment",
|
||||
align_default:"Default",
|
||||
align_left:"Left",
|
||||
align_right:"Right",
|
||||
align_middle:"Center",
|
||||
row_title:"Table row properties",
|
||||
cell_title:"Table cell properties",
|
||||
cell_type:"Cell type",
|
||||
valign:"Vertical alignment",
|
||||
align_top:"Top",
|
||||
align_bottom:"Bottom",
|
||||
bordercolor:"Border color",
|
||||
bgcolor:"Background color",
|
||||
merge_cells_title:"Merge table cells",
|
||||
id:"Id",
|
||||
style:"Style",
|
||||
langdir:"Language direction",
|
||||
langcode:"Language code",
|
||||
mime:"Target MIME type",
|
||||
ltr:"Left to right",
|
||||
rtl:"Right to left",
|
||||
bgimage:"Background image",
|
||||
summary:"Summary",
|
||||
td:"Data",
|
||||
th:"Header",
|
||||
cell_cell:"Update current cell",
|
||||
cell_row:"Update all cells in row",
|
||||
cell_all:"Update all cells in table",
|
||||
row_row:"Update current row",
|
||||
row_odd:"Update odd rows in table",
|
||||
row_even:"Update even rows in table",
|
||||
row_all:"Update all rows in table",
|
||||
thead:"Table Head",
|
||||
tbody:"Table Body",
|
||||
tfoot:"Table Foot",
|
||||
scope:"Scope",
|
||||
rowgroup:"Row Group",
|
||||
colgroup:"Col Group",
|
||||
col_limit:"You've exceeded the maximum number of columns of {$cols}.",
|
||||
row_limit:"You've exceeded the maximum number of rows of {$rows}.",
|
||||
cell_limit:"You've exceeded the maximum number of cells of {$cells}.",
|
||||
missing_scope:"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.",
|
||||
caption:"Table caption",
|
||||
frame:"Frame",
|
||||
frame_none:"none",
|
||||
frame_groups:"groups",
|
||||
frame_rows:"rows",
|
||||
frame_cols:"cols",
|
||||
frame_all:"all",
|
||||
rules:"Rules",
|
||||
rules_void:"void",
|
||||
rules_above:"above",
|
||||
rules_below:"below",
|
||||
rules_hsides:"hsides",
|
||||
rules_lhs:"lhs",
|
||||
rules_rhs:"rhs",
|
||||
rules_vsides:"vsides",
|
||||
rules_box:"box",
|
||||
rules_border:"border"
|
||||
});
|
||||
@@ -1,32 +1,32 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#table_dlg.merge_cells_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script type="text/javascript" src="../../utils/validate.js"></script>
|
||||
<script type="text/javascript" src="js/merge_cells.js"></script>
|
||||
</head>
|
||||
<body style="margin: 8px" role="application">
|
||||
<form onsubmit="MergeCellsDialog.merge();return false;" action="#">
|
||||
<fieldset>
|
||||
<legend>{#table_dlg.merge_cells_title}</legend>
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="3" width="100%">
|
||||
<tr>
|
||||
<td><label for="numcols">{#table_dlg.cols}</label>:</td>
|
||||
<td align="right"><input type="text" id="numcols" name="numcols" value="" class="number min1 mceFocus" style="width: 30px" aria-required="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="numrows">{#table_dlg.rows}</label>:</td>
|
||||
<td align="right"><input type="text" id="numrows" name="numrows" value="" class="number min1" style="width: 30px" aria-required="true" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<input type="submit" id="insert" name="insert" value="{#update}" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#table_dlg.merge_cells_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script type="text/javascript" src="../../utils/validate.js"></script>
|
||||
<script type="text/javascript" src="js/merge_cells.js"></script>
|
||||
</head>
|
||||
<body style="margin: 8px" role="application">
|
||||
<form onsubmit="MergeCellsDialog.merge();return false;" action="#">
|
||||
<fieldset>
|
||||
<legend>{#table_dlg.merge_cells_title}</legend>
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="3" width="100%">
|
||||
<tr>
|
||||
<td><label for="numcols">{#table_dlg.cols}</label>:</td>
|
||||
<td align="right"><input type="text" id="numcols" name="numcols" value="" class="number min1 mceFocus" style="width: 30px" aria-required="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="numrows">{#table_dlg.rows}</label>:</td>
|
||||
<td align="right"><input type="text" id="numrows" name="numrows" value="" class="number min1" style="width: 30px" aria-required="true" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<input type="submit" id="insert" name="insert" value="{#update}" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,157 +1,157 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#table_dlg.row_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
||||
<script type="text/javascript" src="../../utils/editable_selects.js"></script>
|
||||
<script type="text/javascript" src="js/row.js"></script>
|
||||
<link href="css/row.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body id="tablerow" style="display: none" role="application">
|
||||
<form onsubmit="updateAction();return false;" action="#">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
|
||||
<li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div id="general_panel" class="panel current">
|
||||
<fieldset>
|
||||
<legend>{#table_dlg.general_props}</legend>
|
||||
|
||||
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td><label for="rowtype">{#table_dlg.rowtype}</label></td>
|
||||
<td class="col2">
|
||||
<select id="rowtype" name="rowtype" class="mceFocus">
|
||||
<option value="thead">{#table_dlg.thead}</option>
|
||||
<option value="tbody">{#table_dlg.tbody}</option>
|
||||
<option value="tfoot">{#table_dlg.tfoot}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="align">{#table_dlg.align}</label></td>
|
||||
<td class="col2">
|
||||
<select id="align" name="align">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="center">{#table_dlg.align_middle}</option>
|
||||
<option value="left">{#table_dlg.align_left}</option>
|
||||
<option value="right">{#table_dlg.align_right}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="valign">{#table_dlg.valign}</label></td>
|
||||
<td class="col2">
|
||||
<select id="valign" name="valign">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="top">{#table_dlg.align_top}</option>
|
||||
<option value="middle">{#table_dlg.align_middle}</option>
|
||||
<option value="bottom">{#table_dlg.align_bottom}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="styleSelectRow">
|
||||
<td><label for="class">{#class_name}</label></td>
|
||||
<td class="col2">
|
||||
<select id="class" name="class" class="mceEditableSelect">
|
||||
<option value="" selected="selected">{#not_set}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="height">{#table_dlg.height}</label></td>
|
||||
<td class="col2"><input name="height" type="text" id="height" value="" size="4" maxlength="4" onchange="changedSize();" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="advanced_panel" class="panel">
|
||||
<fieldset>
|
||||
<legend>{#table_dlg.advanced_props}</legend>
|
||||
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
|
||||
<tr>
|
||||
<td class="column1"><label for="id">{#table_dlg.id}</label></td>
|
||||
<td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="style">{#table_dlg.style}</label></td>
|
||||
<td><input type="text" id="style" name="style" value="" style="width: 200px;" onchange="changedStyle();" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
|
||||
<td>
|
||||
<select id="dir" name="dir" style="width: 200px">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="ltr">{#table_dlg.ltr}</option>
|
||||
<option value="rtl">{#table_dlg.rtl}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="lang">{#table_dlg.langcode}</label></td>
|
||||
<td>
|
||||
<input id="lang" name="lang" type="text" value="" style="width: 200px" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
|
||||
<td>
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td>
|
||||
<td id="backgroundimagebrowsercontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="bgcolor" id="bgcolor_label">{#table_dlg.bgcolor}</label></td>
|
||||
<td>
|
||||
<span role="group" aria-labelledby="bgcolor_label">
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
|
||||
<td id="bgcolor_pickcontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<div>
|
||||
<select id="action" name="action">
|
||||
<option value="row">{#table_dlg.row_row}</option>
|
||||
<option value="odd">{#table_dlg.row_odd}</option>
|
||||
<option value="even">{#table_dlg.row_even}</option>
|
||||
<option value="all">{#table_dlg.row_all}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<input type="submit" id="insert" name="insert" value="{#update}" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#table_dlg.row_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
||||
<script type="text/javascript" src="../../utils/editable_selects.js"></script>
|
||||
<script type="text/javascript" src="js/row.js"></script>
|
||||
<link href="css/row.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body id="tablerow" style="display: none" role="application">
|
||||
<form onsubmit="updateAction();return false;" action="#">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
|
||||
<li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div id="general_panel" class="panel current">
|
||||
<fieldset>
|
||||
<legend>{#table_dlg.general_props}</legend>
|
||||
|
||||
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td><label for="rowtype">{#table_dlg.rowtype}</label></td>
|
||||
<td class="col2">
|
||||
<select id="rowtype" name="rowtype" class="mceFocus">
|
||||
<option value="thead">{#table_dlg.thead}</option>
|
||||
<option value="tbody">{#table_dlg.tbody}</option>
|
||||
<option value="tfoot">{#table_dlg.tfoot}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="align">{#table_dlg.align}</label></td>
|
||||
<td class="col2">
|
||||
<select id="align" name="align">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="center">{#table_dlg.align_middle}</option>
|
||||
<option value="left">{#table_dlg.align_left}</option>
|
||||
<option value="right">{#table_dlg.align_right}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="valign">{#table_dlg.valign}</label></td>
|
||||
<td class="col2">
|
||||
<select id="valign" name="valign">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="top">{#table_dlg.align_top}</option>
|
||||
<option value="middle">{#table_dlg.align_middle}</option>
|
||||
<option value="bottom">{#table_dlg.align_bottom}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="styleSelectRow">
|
||||
<td><label for="class">{#class_name}</label></td>
|
||||
<td class="col2">
|
||||
<select id="class" name="class" class="mceEditableSelect">
|
||||
<option value="" selected="selected">{#not_set}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="height">{#table_dlg.height}</label></td>
|
||||
<td class="col2"><input name="height" type="text" id="height" value="" size="4" maxlength="4" onchange="changedSize();" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="advanced_panel" class="panel">
|
||||
<fieldset>
|
||||
<legend>{#table_dlg.advanced_props}</legend>
|
||||
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
|
||||
<tr>
|
||||
<td class="column1"><label for="id">{#table_dlg.id}</label></td>
|
||||
<td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="style">{#table_dlg.style}</label></td>
|
||||
<td><input type="text" id="style" name="style" value="" style="width: 200px;" onchange="changedStyle();" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
|
||||
<td>
|
||||
<select id="dir" name="dir" style="width: 200px">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="ltr">{#table_dlg.ltr}</option>
|
||||
<option value="rtl">{#table_dlg.rtl}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="lang">{#table_dlg.langcode}</label></td>
|
||||
<td>
|
||||
<input id="lang" name="lang" type="text" value="" style="width: 200px" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
|
||||
<td>
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td>
|
||||
<td id="backgroundimagebrowsercontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="bgcolor" id="bgcolor_label">{#table_dlg.bgcolor}</label></td>
|
||||
<td>
|
||||
<span role="group" aria-labelledby="bgcolor_label">
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
|
||||
<td id="bgcolor_pickcontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<div>
|
||||
<select id="action" name="action">
|
||||
<option value="row">{#table_dlg.row_row}</option>
|
||||
<option value="odd">{#table_dlg.row_odd}</option>
|
||||
<option value="even">{#table_dlg.row_even}</option>
|
||||
<option value="all">{#table_dlg.row_all}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<input type="submit" id="insert" name="insert" value="{#update}" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,188 +1,188 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#table_dlg.title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
||||
<script type="text/javascript" src="../../utils/validate.js"></script>
|
||||
<script type="text/javascript" src="../../utils/editable_selects.js"></script>
|
||||
<script type="text/javascript" src="js/table.js"></script>
|
||||
<link href="css/table.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body id="table" style="display: none" role="application" aria-labelledby="app_title">
|
||||
<span style="display:none;" id="app_title">{#table_dlg.title}</span>
|
||||
<form onsubmit="insertTable();return false;" action="#">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="general_tab" aria-controls="general_panel" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
|
||||
<li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div id="general_panel" class="panel current">
|
||||
<fieldset>
|
||||
<legend>{#table_dlg.general_props}</legend>
|
||||
<table role="presentation" border="0" cellpadding="4" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td><label id="colslabel" for="cols">{#table_dlg.cols}</label></td>
|
||||
<td><input id="cols" name="cols" type="text" value="" size="3" maxlength="3" class="required number min1 mceFocus" aria-required="true" /></td>
|
||||
<td><label id="rowslabel" for="rows">{#table_dlg.rows}</label></td>
|
||||
<td><input id="rows" name="rows" type="text" value="" size="3" maxlength="3" class="required number min1" aria-required="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label id="cellpaddinglabel" for="cellpadding">{#table_dlg.cellpadding}</label></td>
|
||||
<td><input id="cellpadding" name="cellpadding" type="text" value="" size="3" maxlength="3" class="number" /></td>
|
||||
<td><label id="cellspacinglabel" for="cellspacing">{#table_dlg.cellspacing}</label></td>
|
||||
<td><input id="cellspacing" name="cellspacing" type="text" value="" size="3" maxlength="3" class="number" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label id="alignlabel" for="align">{#table_dlg.align}</label></td>
|
||||
<td><select id="align" name="align">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="center">{#table_dlg.align_middle}</option>
|
||||
<option value="left">{#table_dlg.align_left}</option>
|
||||
<option value="right">{#table_dlg.align_right}</option>
|
||||
</select></td>
|
||||
<td><label id="borderlabel" for="border">{#table_dlg.border}</label></td>
|
||||
<td><input id="border" name="border" type="text" value="" size="3" maxlength="3" onchange="changedBorder();" class="number" /></td>
|
||||
</tr>
|
||||
<tr id="width_row">
|
||||
<td><label id="widthlabel" for="width">{#table_dlg.width}</label></td>
|
||||
<td><input name="width" type="text" id="width" value="" size="4" maxlength="4" onchange="changedSize();" class="size" /></td>
|
||||
<td><label id="heightlabel" for="height">{#table_dlg.height}</label></td>
|
||||
<td><input name="height" type="text" id="height" value="" size="4" maxlength="4" onchange="changedSize();" class="size" /></td>
|
||||
</tr>
|
||||
<tr id="styleSelectRow" >
|
||||
<td><label id="classlabel" for="class">{#class_name}</label></td>
|
||||
<td colspan="3" >
|
||||
<select id="class" name="class" class="mceEditableSelect">
|
||||
<option value="" selected="selected">{#not_set}</option>
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="column1" ><label for="caption">{#table_dlg.caption}</label></td>
|
||||
<td><input id="caption" name="caption" type="checkbox" class="checkbox" value="true" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="advanced_panel" class="panel">
|
||||
<fieldset>
|
||||
<legend>{#table_dlg.advanced_props}</legend>
|
||||
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
|
||||
<tr>
|
||||
<td class="column1"><label for="id">{#table_dlg.id}</label></td>
|
||||
<td><input id="id" name="id" type="text" value="" class="advfield" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="summary">{#table_dlg.summary}</label></td>
|
||||
<td><input id="summary" name="summary" type="text" value="" class="advfield" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="style">{#table_dlg.style}</label></td>
|
||||
<td><input type="text" id="style" name="style" value="" class="advfield" onchange="changedStyle();" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label id="langlabel" for="lang">{#table_dlg.langcode}</label></td>
|
||||
<td>
|
||||
<input id="lang" name="lang" type="text" value="" class="advfield" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
|
||||
<td>
|
||||
<table role="presentation" aria-labelledby="backgroundimage_label" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input id="backgroundimage" name="backgroundimage" type="text" value="" class="advfield" onchange="changedBackgroundImage();" /></td>
|
||||
<td id="backgroundimagebrowsercontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="tframe">{#table_dlg.frame}</label></td>
|
||||
<td>
|
||||
<select id="tframe" name="tframe" class="advfield">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="void">{#table_dlg.rules_void}</option>
|
||||
<option value="above">{#table_dlg.rules_above}</option>
|
||||
<option value="below">{#table_dlg.rules_below}</option>
|
||||
<option value="hsides">{#table_dlg.rules_hsides}</option>
|
||||
<option value="lhs">{#table_dlg.rules_lhs}</option>
|
||||
<option value="rhs">{#table_dlg.rules_rhs}</option>
|
||||
<option value="vsides">{#table_dlg.rules_vsides}</option>
|
||||
<option value="box">{#table_dlg.rules_box}</option>
|
||||
<option value="border">{#table_dlg.rules_border}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="rules">{#table_dlg.rules}</label></td>
|
||||
<td>
|
||||
<select id="rules" name="rules" class="advfield">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="none">{#table_dlg.frame_none}</option>
|
||||
<option value="groups">{#table_dlg.frame_groups}</option>
|
||||
<option value="rows">{#table_dlg.frame_rows}</option>
|
||||
<option value="cols">{#table_dlg.frame_cols}</option>
|
||||
<option value="all">{#table_dlg.frame_all}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
|
||||
<td>
|
||||
<select id="dir" name="dir" class="advfield">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="ltr">{#table_dlg.ltr}</option>
|
||||
<option value="rtl">{#table_dlg.rtl}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr role="group" aria-labelledby="bordercolor_label">
|
||||
<td class="column1"><label id="bordercolor_label" for="bordercolor">{#table_dlg.bordercolor}</label></td>
|
||||
<td>
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td>
|
||||
<td id="bordercolor_pickcontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr role="group" aria-labelledby="bgcolor_label">
|
||||
<td class="column1"><label id="bgcolor_label" for="bgcolor">{#table_dlg.bgcolor}</label></td>
|
||||
<td>
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
|
||||
<td id="bgcolor_pickcontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#table_dlg.title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
||||
<script type="text/javascript" src="../../utils/validate.js"></script>
|
||||
<script type="text/javascript" src="../../utils/editable_selects.js"></script>
|
||||
<script type="text/javascript" src="js/table.js"></script>
|
||||
<link href="css/table.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body id="table" style="display: none" role="application" aria-labelledby="app_title">
|
||||
<span style="display:none;" id="app_title">{#table_dlg.title}</span>
|
||||
<form onsubmit="insertTable();return false;" action="#">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="general_tab" aria-controls="general_panel" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
|
||||
<li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div id="general_panel" class="panel current">
|
||||
<fieldset>
|
||||
<legend>{#table_dlg.general_props}</legend>
|
||||
<table role="presentation" border="0" cellpadding="4" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td><label id="colslabel" for="cols">{#table_dlg.cols}</label></td>
|
||||
<td><input id="cols" name="cols" type="text" value="" size="3" maxlength="3" class="required number min1 mceFocus" aria-required="true" /></td>
|
||||
<td><label id="rowslabel" for="rows">{#table_dlg.rows}</label></td>
|
||||
<td><input id="rows" name="rows" type="text" value="" size="3" maxlength="3" class="required number min1" aria-required="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label id="cellpaddinglabel" for="cellpadding">{#table_dlg.cellpadding}</label></td>
|
||||
<td><input id="cellpadding" name="cellpadding" type="text" value="" size="3" maxlength="3" class="number" /></td>
|
||||
<td><label id="cellspacinglabel" for="cellspacing">{#table_dlg.cellspacing}</label></td>
|
||||
<td><input id="cellspacing" name="cellspacing" type="text" value="" size="3" maxlength="3" class="number" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label id="alignlabel" for="align">{#table_dlg.align}</label></td>
|
||||
<td><select id="align" name="align">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="center">{#table_dlg.align_middle}</option>
|
||||
<option value="left">{#table_dlg.align_left}</option>
|
||||
<option value="right">{#table_dlg.align_right}</option>
|
||||
</select></td>
|
||||
<td><label id="borderlabel" for="border">{#table_dlg.border}</label></td>
|
||||
<td><input id="border" name="border" type="text" value="" size="3" maxlength="3" onchange="changedBorder();" class="number" /></td>
|
||||
</tr>
|
||||
<tr id="width_row">
|
||||
<td><label id="widthlabel" for="width">{#table_dlg.width}</label></td>
|
||||
<td><input name="width" type="text" id="width" value="" size="4" maxlength="4" onchange="changedSize();" class="size" /></td>
|
||||
<td><label id="heightlabel" for="height">{#table_dlg.height}</label></td>
|
||||
<td><input name="height" type="text" id="height" value="" size="4" maxlength="4" onchange="changedSize();" class="size" /></td>
|
||||
</tr>
|
||||
<tr id="styleSelectRow" >
|
||||
<td><label id="classlabel" for="class">{#class_name}</label></td>
|
||||
<td colspan="3" >
|
||||
<select id="class" name="class" class="mceEditableSelect">
|
||||
<option value="" selected="selected">{#not_set}</option>
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="column1" ><label for="caption">{#table_dlg.caption}</label></td>
|
||||
<td><input id="caption" name="caption" type="checkbox" class="checkbox" value="true" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="advanced_panel" class="panel">
|
||||
<fieldset>
|
||||
<legend>{#table_dlg.advanced_props}</legend>
|
||||
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
|
||||
<tr>
|
||||
<td class="column1"><label for="id">{#table_dlg.id}</label></td>
|
||||
<td><input id="id" name="id" type="text" value="" class="advfield" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="summary">{#table_dlg.summary}</label></td>
|
||||
<td><input id="summary" name="summary" type="text" value="" class="advfield" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="style">{#table_dlg.style}</label></td>
|
||||
<td><input type="text" id="style" name="style" value="" class="advfield" onchange="changedStyle();" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label id="langlabel" for="lang">{#table_dlg.langcode}</label></td>
|
||||
<td>
|
||||
<input id="lang" name="lang" type="text" value="" class="advfield" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
|
||||
<td>
|
||||
<table role="presentation" aria-labelledby="backgroundimage_label" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input id="backgroundimage" name="backgroundimage" type="text" value="" class="advfield" onchange="changedBackgroundImage();" /></td>
|
||||
<td id="backgroundimagebrowsercontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="tframe">{#table_dlg.frame}</label></td>
|
||||
<td>
|
||||
<select id="tframe" name="tframe" class="advfield">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="void">{#table_dlg.rules_void}</option>
|
||||
<option value="above">{#table_dlg.rules_above}</option>
|
||||
<option value="below">{#table_dlg.rules_below}</option>
|
||||
<option value="hsides">{#table_dlg.rules_hsides}</option>
|
||||
<option value="lhs">{#table_dlg.rules_lhs}</option>
|
||||
<option value="rhs">{#table_dlg.rules_rhs}</option>
|
||||
<option value="vsides">{#table_dlg.rules_vsides}</option>
|
||||
<option value="box">{#table_dlg.rules_box}</option>
|
||||
<option value="border">{#table_dlg.rules_border}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="rules">{#table_dlg.rules}</label></td>
|
||||
<td>
|
||||
<select id="rules" name="rules" class="advfield">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="none">{#table_dlg.frame_none}</option>
|
||||
<option value="groups">{#table_dlg.frame_groups}</option>
|
||||
<option value="rows">{#table_dlg.frame_rows}</option>
|
||||
<option value="cols">{#table_dlg.frame_cols}</option>
|
||||
<option value="all">{#table_dlg.frame_all}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
|
||||
<td>
|
||||
<select id="dir" name="dir" class="advfield">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="ltr">{#table_dlg.ltr}</option>
|
||||
<option value="rtl">{#table_dlg.rtl}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr role="group" aria-labelledby="bordercolor_label">
|
||||
<td class="column1"><label id="bordercolor_label" for="bordercolor">{#table_dlg.bordercolor}</label></td>
|
||||
<td>
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td>
|
||||
<td id="bordercolor_pickcontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr role="group" aria-labelledby="bgcolor_label">
|
||||
<td class="column1"><label id="bgcolor_label" for="bgcolor">{#table_dlg.bgcolor}</label></td>
|
||||
<td>
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
|
||||
<td id="bgcolor_pickcontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,52 +1,52 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#advanced_dlg.about_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script type="text/javascript" src="js/about.js"></script>
|
||||
</head>
|
||||
<body id="about" style="display: none">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.about_general}</a></span></li>
|
||||
<li id="help_tab" style="display:none" aria-hidden="true" aria-controls="help_panel"><span><a href="javascript:mcTabs.displayTab('help_tab','help_panel');" onmousedown="return false;">{#advanced_dlg.about_help}</a></span></li>
|
||||
<li id="plugins_tab" aria-controls="plugins_panel"><span><a href="javascript:mcTabs.displayTab('plugins_tab','plugins_panel');" onmousedown="return false;">{#advanced_dlg.about_plugins}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div id="general_panel" class="panel current">
|
||||
<h3>{#advanced_dlg.about_title}</h3>
|
||||
<p>Version: <span id="version"></span> (<span id="date"></span>)</p>
|
||||
<p>TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under <a href="../../license.txt" target="_blank">LGPL</a>
|
||||
by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.</p>
|
||||
<p>Copyright © 2003-2008, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.</p>
|
||||
<p>For more information about this software visit the <a href="http://tinymce.moxiecode.com" target="_blank">TinyMCE website</a>.</p>
|
||||
|
||||
<div id="buttoncontainer">
|
||||
<a href="http://www.moxiecode.com" target="_blank"><img src="http://tinymce.moxiecode.com/images/gotmoxie.png" alt="Got Moxie?" border="0" /></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="plugins_panel" class="panel">
|
||||
<div id="pluginscontainer">
|
||||
<h3>{#advanced_dlg.about_loaded}</h3>
|
||||
|
||||
<div id="plugintablecontainer">
|
||||
</div>
|
||||
|
||||
<p> </p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="help_panel" class="panel noscroll" style="overflow: visible;">
|
||||
<div id="iframecontainer"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<input type="button" id="cancel" name="cancel" value="{#close}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#advanced_dlg.about_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script type="text/javascript" src="js/about.js"></script>
|
||||
</head>
|
||||
<body id="about" style="display: none">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.about_general}</a></span></li>
|
||||
<li id="help_tab" style="display:none" aria-hidden="true" aria-controls="help_panel"><span><a href="javascript:mcTabs.displayTab('help_tab','help_panel');" onmousedown="return false;">{#advanced_dlg.about_help}</a></span></li>
|
||||
<li id="plugins_tab" aria-controls="plugins_panel"><span><a href="javascript:mcTabs.displayTab('plugins_tab','plugins_panel');" onmousedown="return false;">{#advanced_dlg.about_plugins}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div id="general_panel" class="panel current">
|
||||
<h3>{#advanced_dlg.about_title}</h3>
|
||||
<p>Version: <span id="version"></span> (<span id="date"></span>)</p>
|
||||
<p>TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under <a href="../../license.txt" target="_blank">LGPL</a>
|
||||
by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.</p>
|
||||
<p>Copyright © 2003-2008, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.</p>
|
||||
<p>For more information about this software visit the <a href="http://tinymce.moxiecode.com" target="_blank">TinyMCE website</a>.</p>
|
||||
|
||||
<div id="buttoncontainer">
|
||||
<a href="http://www.moxiecode.com" target="_blank"><img src="http://tinymce.moxiecode.com/images/gotmoxie.png" alt="Got Moxie?" border="0" /></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="plugins_panel" class="panel">
|
||||
<div id="pluginscontainer">
|
||||
<h3>{#advanced_dlg.about_loaded}</h3>
|
||||
|
||||
<div id="plugintablecontainer">
|
||||
</div>
|
||||
|
||||
<p> </p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="help_panel" class="panel noscroll" style="overflow: visible;">
|
||||
<div id="iframecontainer"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<input type="button" id="cancel" name="cancel" value="{#close}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#advanced_dlg.anchor_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="js/anchor.js"></script>
|
||||
</head>
|
||||
<body style="display: none" role="application" aria-labelledby="app_title">
|
||||
<form onsubmit="AnchorDialog.update();return false;" action="#">
|
||||
<table border="0" cellpadding="4" cellspacing="0" role="presentation">
|
||||
<tr>
|
||||
<td colspan="2" class="title" id="app_title">{#advanced_dlg.anchor_title}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="nowrap"><label for="anchorName">{#advanced_dlg.anchor_name}:</label></td>
|
||||
<td><input name="anchorName" type="text" class="mceFocus" id="anchorName" value="" style="width: 200px" aria-required="true" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<input type="submit" id="insert" name="insert" value="{#update}" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#advanced_dlg.anchor_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="js/anchor.js"></script>
|
||||
</head>
|
||||
<body style="display: none" role="application" aria-labelledby="app_title">
|
||||
<form onsubmit="AnchorDialog.update();return false;" action="#">
|
||||
<table border="0" cellpadding="4" cellspacing="0" role="presentation">
|
||||
<tr>
|
||||
<td colspan="2" class="title" id="app_title">{#advanced_dlg.anchor_title}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="nowrap"><label for="anchorName">{#advanced_dlg.anchor_name}:</label></td>
|
||||
<td><input name="anchorName" type="text" class="mceFocus" id="anchorName" value="" style="width: 200px" aria-required="true" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<input type="submit" id="insert" name="insert" value="{#update}" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,51 +1,51 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#advanced_dlg.charmap_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="js/charmap.js"></script>
|
||||
</head>
|
||||
<body id="charmap" style="display:none">
|
||||
<table align="center" border="0" cellspacing="0" cellpadding="2" role="presentation">
|
||||
<tr>
|
||||
<td colspan="2" class="title" ><label for="charmapView" id="charmap_label">{#advanced_dlg.charmap_title}</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="charmapView" rowspan="2" align="left" valign="top">
|
||||
<!-- Chars will be rendered here -->
|
||||
</td>
|
||||
<td width="100" align="center" valign="top">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100" style="height:100px" role="presentation">
|
||||
<tr>
|
||||
<td id="codeV"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="codeN"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="bottom" style="padding-bottom: 3px;">
|
||||
<table width="100" align="center" border="0" cellpadding="2" cellspacing="0" role="presentation">
|
||||
<tr>
|
||||
<td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;"><label for="codeA">HTML-Code</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;" id="codeA" align="center"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 1px;"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;"><label for="codeB">NUM-Code</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;" id="codeB" align="center"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#advanced_dlg.charmap_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="js/charmap.js"></script>
|
||||
</head>
|
||||
<body id="charmap" style="display:none">
|
||||
<table align="center" border="0" cellspacing="0" cellpadding="2" role="presentation">
|
||||
<tr>
|
||||
<td colspan="2" class="title" ><label for="charmapView" id="charmap_label">{#advanced_dlg.charmap_title}</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="charmapView" rowspan="2" align="left" valign="top">
|
||||
<!-- Chars will be rendered here -->
|
||||
</td>
|
||||
<td width="100" align="center" valign="top">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100" style="height:100px" role="presentation">
|
||||
<tr>
|
||||
<td id="codeV"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="codeN"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="bottom" style="padding-bottom: 3px;">
|
||||
<table width="100" align="center" border="0" cellpadding="2" cellspacing="0" role="presentation">
|
||||
<tr>
|
||||
<td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;"><label for="codeA">HTML-Code</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;" id="codeA" align="center"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 1px;"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;"><label for="codeB">NUM-Code</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;" id="codeB" align="center"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,74 +1,74 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#advanced_dlg.colorpicker_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script type="text/javascript" src="js/color_picker.js"></script>
|
||||
</head>
|
||||
<body id="colorpicker" style="display: none" role="application" aria-labelledby="app_label">
|
||||
<span class="mceVoiceLabel" id="app_label" style="display:none;">{#advanced_dlg.colorpicker_title}</span>
|
||||
<form onsubmit="insertAction();return false" action="#">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="picker_tab" aria-controls="picker_panel" class="current"><span><a href="javascript:mcTabs.displayTab('picker_tab','picker_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_picker_tab}</a></span></li>
|
||||
<li id="rgb_tab" aria-controls="rgb_panel"><span><a href="javascript:;" onclick="mcTabs.displayTab('rgb_tab','rgb_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_palette_tab}</a></span></li>
|
||||
<li id="named_tab" aria-controls="named_panel"><span><a href="javascript:;" onclick="javascript:mcTabs.displayTab('named_tab','named_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_named_tab}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div id="picker_panel" class="panel current">
|
||||
<fieldset>
|
||||
<legend>{#advanced_dlg.colorpicker_picker_title}</legend>
|
||||
<div id="picker">
|
||||
<img id="colors" src="img/colorpicker.jpg" onclick="computeColor(event)" onmousedown="isMouseDown = true;return false;" onmouseup="isMouseDown = false;" onmousemove="if (isMouseDown && isMouseOver) computeColor(event); return false;" onmouseover="isMouseOver=true;" onmouseout="isMouseOver=false;" alt="" />
|
||||
|
||||
<div id="light">
|
||||
<!-- Will be filled with divs -->
|
||||
</div>
|
||||
|
||||
<br style="clear: both" />
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="rgb_panel" class="panel">
|
||||
<fieldset>
|
||||
<legend id="webcolors_title">{#advanced_dlg.colorpicker_palette_title}</legend>
|
||||
<div id="webcolors">
|
||||
<!-- Gets filled with web safe colors-->
|
||||
</div>
|
||||
|
||||
<br style="clear: both" />
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="named_panel" class="panel">
|
||||
<fieldset id="named_picker_label">
|
||||
<legend id="named_title">{#advanced_dlg.colorpicker_named_title}</legend>
|
||||
<div id="namedcolors" role="listbox" tabindex="0" aria-labelledby="named_picker_label">
|
||||
<!-- Gets filled with named colors-->
|
||||
</div>
|
||||
|
||||
<br style="clear: both" />
|
||||
|
||||
<div id="colornamecontainer">
|
||||
{#advanced_dlg.colorpicker_name} <span id="colorname"></span>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<input type="submit" id="insert" name="insert" value="{#apply}" />
|
||||
|
||||
<div id="preview"></div>
|
||||
|
||||
<div id="previewblock">
|
||||
<label for="color">{#advanced_dlg.colorpicker_color}</label> <input id="color" type="text" size="8" class="text mceFocus" aria-required="true" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#advanced_dlg.colorpicker_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script type="text/javascript" src="js/color_picker.js"></script>
|
||||
</head>
|
||||
<body id="colorpicker" style="display: none" role="application" aria-labelledby="app_label">
|
||||
<span class="mceVoiceLabel" id="app_label" style="display:none;">{#advanced_dlg.colorpicker_title}</span>
|
||||
<form onsubmit="insertAction();return false" action="#">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="picker_tab" aria-controls="picker_panel" class="current"><span><a href="javascript:mcTabs.displayTab('picker_tab','picker_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_picker_tab}</a></span></li>
|
||||
<li id="rgb_tab" aria-controls="rgb_panel"><span><a href="javascript:;" onclick="mcTabs.displayTab('rgb_tab','rgb_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_palette_tab}</a></span></li>
|
||||
<li id="named_tab" aria-controls="named_panel"><span><a href="javascript:;" onclick="javascript:mcTabs.displayTab('named_tab','named_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_named_tab}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div id="picker_panel" class="panel current">
|
||||
<fieldset>
|
||||
<legend>{#advanced_dlg.colorpicker_picker_title}</legend>
|
||||
<div id="picker">
|
||||
<img id="colors" src="img/colorpicker.jpg" onclick="computeColor(event)" onmousedown="isMouseDown = true;return false;" onmouseup="isMouseDown = false;" onmousemove="if (isMouseDown && isMouseOver) computeColor(event); return false;" onmouseover="isMouseOver=true;" onmouseout="isMouseOver=false;" alt="" />
|
||||
|
||||
<div id="light">
|
||||
<!-- Will be filled with divs -->
|
||||
</div>
|
||||
|
||||
<br style="clear: both" />
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="rgb_panel" class="panel">
|
||||
<fieldset>
|
||||
<legend id="webcolors_title">{#advanced_dlg.colorpicker_palette_title}</legend>
|
||||
<div id="webcolors">
|
||||
<!-- Gets filled with web safe colors-->
|
||||
</div>
|
||||
|
||||
<br style="clear: both" />
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="named_panel" class="panel">
|
||||
<fieldset id="named_picker_label">
|
||||
<legend id="named_title">{#advanced_dlg.colorpicker_named_title}</legend>
|
||||
<div id="namedcolors" role="listbox" tabindex="0" aria-labelledby="named_picker_label">
|
||||
<!-- Gets filled with named colors-->
|
||||
</div>
|
||||
|
||||
<br style="clear: both" />
|
||||
|
||||
<div id="colornamecontainer">
|
||||
{#advanced_dlg.colorpicker_name} <span id="colorname"></span>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<input type="submit" id="insert" name="insert" value="{#apply}" />
|
||||
|
||||
<div id="preview"></div>
|
||||
|
||||
<div id="previewblock">
|
||||
<label for="color">{#advanced_dlg.colorpicker_color}</label> <input id="color" type="text" size="8" class="text mceFocus" aria-required="true" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,80 +1,80 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#advanced_dlg.image_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
||||
<script type="text/javascript" src="js/image.js"></script>
|
||||
</head>
|
||||
<body id="image" style="display: none">
|
||||
<form onsubmit="ImageDialog.update();return false;" action="#">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.image_title}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div id="general_panel" class="panel current">
|
||||
<table border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td class="nowrap"><label for="src">{#advanced_dlg.image_src}</label></td>
|
||||
<td><table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input id="src" name="src" type="text" class="mceFocus" value="" style="width: 200px" onchange="ImageDialog.getImageData();" /></td>
|
||||
<td id="srcbrowsercontainer"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="image_list">{#advanced_dlg.image_list}</label></td>
|
||||
<td><select id="image_list" name="image_list" onchange="document.getElementById('src').value=this.options[this.selectedIndex].value;document.getElementById('alt').value=this.options[this.selectedIndex].text;"></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="nowrap"><label for="alt">{#advanced_dlg.image_alt}</label></td>
|
||||
<td><input id="alt" name="alt" type="text" value="" style="width: 200px" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="nowrap"><label for="align">{#advanced_dlg.image_align}</label></td>
|
||||
<td><select id="align" name="align" onchange="ImageDialog.updateStyle();">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="baseline">{#advanced_dlg.image_align_baseline}</option>
|
||||
<option value="top">{#advanced_dlg.image_align_top}</option>
|
||||
<option value="middle">{#advanced_dlg.image_align_middle}</option>
|
||||
<option value="bottom">{#advanced_dlg.image_align_bottom}</option>
|
||||
<option value="text-top">{#advanced_dlg.image_align_texttop}</option>
|
||||
<option value="text-bottom">{#advanced_dlg.image_align_textbottom}</option>
|
||||
<option value="left">{#advanced_dlg.image_align_left}</option>
|
||||
<option value="right">{#advanced_dlg.image_align_right}</option>
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="nowrap"><label for="width">{#advanced_dlg.image_dimensions}</label></td>
|
||||
<td><input id="width" name="width" type="text" value="" size="3" maxlength="5" />
|
||||
x
|
||||
<input id="height" name="height" type="text" value="" size="3" maxlength="5" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="nowrap"><label for="border">{#advanced_dlg.image_border}</label></td>
|
||||
<td><input id="border" name="border" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="nowrap"><label for="vspace">{#advanced_dlg.image_vspace}</label></td>
|
||||
<td><input id="vspace" name="vspace" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="nowrap"><label for="hspace">{#advanced_dlg.image_hspace}</label></td>
|
||||
<td><input id="hspace" name="hspace" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#advanced_dlg.image_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
||||
<script type="text/javascript" src="js/image.js"></script>
|
||||
</head>
|
||||
<body id="image" style="display: none">
|
||||
<form onsubmit="ImageDialog.update();return false;" action="#">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.image_title}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div id="general_panel" class="panel current">
|
||||
<table border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td class="nowrap"><label for="src">{#advanced_dlg.image_src}</label></td>
|
||||
<td><table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input id="src" name="src" type="text" class="mceFocus" value="" style="width: 200px" onchange="ImageDialog.getImageData();" /></td>
|
||||
<td id="srcbrowsercontainer"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="image_list">{#advanced_dlg.image_list}</label></td>
|
||||
<td><select id="image_list" name="image_list" onchange="document.getElementById('src').value=this.options[this.selectedIndex].value;document.getElementById('alt').value=this.options[this.selectedIndex].text;"></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="nowrap"><label for="alt">{#advanced_dlg.image_alt}</label></td>
|
||||
<td><input id="alt" name="alt" type="text" value="" style="width: 200px" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="nowrap"><label for="align">{#advanced_dlg.image_align}</label></td>
|
||||
<td><select id="align" name="align" onchange="ImageDialog.updateStyle();">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="baseline">{#advanced_dlg.image_align_baseline}</option>
|
||||
<option value="top">{#advanced_dlg.image_align_top}</option>
|
||||
<option value="middle">{#advanced_dlg.image_align_middle}</option>
|
||||
<option value="bottom">{#advanced_dlg.image_align_bottom}</option>
|
||||
<option value="text-top">{#advanced_dlg.image_align_texttop}</option>
|
||||
<option value="text-bottom">{#advanced_dlg.image_align_textbottom}</option>
|
||||
<option value="left">{#advanced_dlg.image_align_left}</option>
|
||||
<option value="right">{#advanced_dlg.image_align_right}</option>
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="nowrap"><label for="width">{#advanced_dlg.image_dimensions}</label></td>
|
||||
<td><input id="width" name="width" type="text" value="" size="3" maxlength="5" />
|
||||
x
|
||||
<input id="height" name="height" type="text" value="" size="3" maxlength="5" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="nowrap"><label for="border">{#advanced_dlg.image_border}</label></td>
|
||||
<td><input id="border" name="border" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="nowrap"><label for="vspace">{#advanced_dlg.image_vspace}</label></td>
|
||||
<td><input id="vspace" name="vspace" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="nowrap"><label for="hspace">{#advanced_dlg.image_hspace}</label></td>
|
||||
<td><input id="hspace" name="hspace" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,73 +1,73 @@
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
function init() {
|
||||
var ed, tcont;
|
||||
|
||||
tinyMCEPopup.resizeToInnerSize();
|
||||
ed = tinyMCEPopup.editor;
|
||||
|
||||
// Give FF some time
|
||||
window.setTimeout(insertHelpIFrame, 10);
|
||||
|
||||
tcont = document.getElementById('plugintablecontainer');
|
||||
document.getElementById('plugins_tab').style.display = 'none';
|
||||
|
||||
var html = "";
|
||||
html += '<table id="plugintable">';
|
||||
html += '<thead>';
|
||||
html += '<tr>';
|
||||
html += '<td>' + ed.getLang('advanced_dlg.about_plugin') + '</td>';
|
||||
html += '<td>' + ed.getLang('advanced_dlg.about_author') + '</td>';
|
||||
html += '<td>' + ed.getLang('advanced_dlg.about_version') + '</td>';
|
||||
html += '</tr>';
|
||||
html += '</thead>';
|
||||
html += '<tbody>';
|
||||
|
||||
tinymce.each(ed.plugins, function(p, n) {
|
||||
var info;
|
||||
|
||||
if (!p.getInfo)
|
||||
return;
|
||||
|
||||
html += '<tr>';
|
||||
|
||||
info = p.getInfo();
|
||||
|
||||
if (info.infourl != null && info.infourl != '')
|
||||
html += '<td width="50%" title="' + n + '"><a href="' + info.infourl + '" target="_blank">' + info.longname + '</a></td>';
|
||||
else
|
||||
html += '<td width="50%" title="' + n + '">' + info.longname + '</td>';
|
||||
|
||||
if (info.authorurl != null && info.authorurl != '')
|
||||
html += '<td width="35%"><a href="' + info.authorurl + '" target="_blank">' + info.author + '</a></td>';
|
||||
else
|
||||
html += '<td width="35%">' + info.author + '</td>';
|
||||
|
||||
html += '<td width="15%">' + info.version + '</td>';
|
||||
html += '</tr>';
|
||||
|
||||
document.getElementById('plugins_tab').style.display = '';
|
||||
|
||||
});
|
||||
|
||||
html += '</tbody>';
|
||||
html += '</table>';
|
||||
|
||||
tcont.innerHTML = html;
|
||||
|
||||
tinyMCEPopup.dom.get('version').innerHTML = tinymce.majorVersion + "." + tinymce.minorVersion;
|
||||
tinyMCEPopup.dom.get('date').innerHTML = tinymce.releaseDate;
|
||||
}
|
||||
|
||||
function insertHelpIFrame() {
|
||||
var html;
|
||||
|
||||
if (tinyMCEPopup.getParam('docs_url')) {
|
||||
html = '<iframe width="100%" height="300" src="' + tinyMCEPopup.editor.baseURI.toAbsolute(tinyMCEPopup.getParam('docs_url')) + '"></iframe>';
|
||||
document.getElementById('iframecontainer').innerHTML = html;
|
||||
document.getElementById('help_tab').style.display = 'block';
|
||||
document.getElementById('help_tab').setAttribute("aria-hidden", "false");
|
||||
}
|
||||
}
|
||||
|
||||
tinyMCEPopup.onInit.add(init);
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
function init() {
|
||||
var ed, tcont;
|
||||
|
||||
tinyMCEPopup.resizeToInnerSize();
|
||||
ed = tinyMCEPopup.editor;
|
||||
|
||||
// Give FF some time
|
||||
window.setTimeout(insertHelpIFrame, 10);
|
||||
|
||||
tcont = document.getElementById('plugintablecontainer');
|
||||
document.getElementById('plugins_tab').style.display = 'none';
|
||||
|
||||
var html = "";
|
||||
html += '<table id="plugintable">';
|
||||
html += '<thead>';
|
||||
html += '<tr>';
|
||||
html += '<td>' + ed.getLang('advanced_dlg.about_plugin') + '</td>';
|
||||
html += '<td>' + ed.getLang('advanced_dlg.about_author') + '</td>';
|
||||
html += '<td>' + ed.getLang('advanced_dlg.about_version') + '</td>';
|
||||
html += '</tr>';
|
||||
html += '</thead>';
|
||||
html += '<tbody>';
|
||||
|
||||
tinymce.each(ed.plugins, function(p, n) {
|
||||
var info;
|
||||
|
||||
if (!p.getInfo)
|
||||
return;
|
||||
|
||||
html += '<tr>';
|
||||
|
||||
info = p.getInfo();
|
||||
|
||||
if (info.infourl != null && info.infourl != '')
|
||||
html += '<td width="50%" title="' + n + '"><a href="' + info.infourl + '" target="_blank">' + info.longname + '</a></td>';
|
||||
else
|
||||
html += '<td width="50%" title="' + n + '">' + info.longname + '</td>';
|
||||
|
||||
if (info.authorurl != null && info.authorurl != '')
|
||||
html += '<td width="35%"><a href="' + info.authorurl + '" target="_blank">' + info.author + '</a></td>';
|
||||
else
|
||||
html += '<td width="35%">' + info.author + '</td>';
|
||||
|
||||
html += '<td width="15%">' + info.version + '</td>';
|
||||
html += '</tr>';
|
||||
|
||||
document.getElementById('plugins_tab').style.display = '';
|
||||
|
||||
});
|
||||
|
||||
html += '</tbody>';
|
||||
html += '</table>';
|
||||
|
||||
tcont.innerHTML = html;
|
||||
|
||||
tinyMCEPopup.dom.get('version').innerHTML = tinymce.majorVersion + "." + tinymce.minorVersion;
|
||||
tinyMCEPopup.dom.get('date').innerHTML = tinymce.releaseDate;
|
||||
}
|
||||
|
||||
function insertHelpIFrame() {
|
||||
var html;
|
||||
|
||||
if (tinyMCEPopup.getParam('docs_url')) {
|
||||
html = '<iframe width="100%" height="300" src="' + tinyMCEPopup.editor.baseURI.toAbsolute(tinyMCEPopup.getParam('docs_url')) + '"></iframe>';
|
||||
document.getElementById('iframecontainer').innerHTML = html;
|
||||
document.getElementById('help_tab').style.display = 'block';
|
||||
document.getElementById('help_tab').setAttribute("aria-hidden", "false");
|
||||
}
|
||||
}
|
||||
|
||||
tinyMCEPopup.onInit.add(init);
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var AnchorDialog = {
|
||||
init : function(ed) {
|
||||
var action, elm, f = document.forms[0];
|
||||
|
||||
this.editor = ed;
|
||||
elm = ed.dom.getParent(ed.selection.getNode(), 'A');
|
||||
v = ed.dom.getAttrib(elm, 'name');
|
||||
|
||||
if (v) {
|
||||
this.action = 'update';
|
||||
f.anchorName.value = v;
|
||||
}
|
||||
|
||||
f.insert.value = ed.getLang(elm ? 'update' : 'insert');
|
||||
},
|
||||
|
||||
update : function() {
|
||||
var ed = this.editor, elm, name = document.forms[0].anchorName.value;
|
||||
|
||||
if (!name || !/^[a-z][a-z0-9\-\_:\.]*$/i.test(name)) {
|
||||
tinyMCEPopup.alert('advanced_dlg.anchor_invalid');
|
||||
return;
|
||||
}
|
||||
|
||||
tinyMCEPopup.restoreSelection();
|
||||
|
||||
if (this.action != 'update')
|
||||
ed.selection.collapse(1);
|
||||
|
||||
elm = ed.dom.getParent(ed.selection.getNode(), 'A');
|
||||
if (elm)
|
||||
elm.name = name;
|
||||
else
|
||||
ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : name, 'class' : 'mceItemAnchor'}, ''));
|
||||
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
};
|
||||
|
||||
tinyMCEPopup.onInit.add(AnchorDialog.init, AnchorDialog);
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var AnchorDialog = {
|
||||
init : function(ed) {
|
||||
var action, elm, f = document.forms[0];
|
||||
|
||||
this.editor = ed;
|
||||
elm = ed.dom.getParent(ed.selection.getNode(), 'A');
|
||||
v = ed.dom.getAttrib(elm, 'name');
|
||||
|
||||
if (v) {
|
||||
this.action = 'update';
|
||||
f.anchorName.value = v;
|
||||
}
|
||||
|
||||
f.insert.value = ed.getLang(elm ? 'update' : 'insert');
|
||||
},
|
||||
|
||||
update : function() {
|
||||
var ed = this.editor, elm, name = document.forms[0].anchorName.value;
|
||||
|
||||
if (!name || !/^[a-z][a-z0-9\-\_:\.]*$/i.test(name)) {
|
||||
tinyMCEPopup.alert('advanced_dlg.anchor_invalid');
|
||||
return;
|
||||
}
|
||||
|
||||
tinyMCEPopup.restoreSelection();
|
||||
|
||||
if (this.action != 'update')
|
||||
ed.selection.collapse(1);
|
||||
|
||||
elm = ed.dom.getParent(ed.selection.getNode(), 'A');
|
||||
if (elm)
|
||||
elm.name = name;
|
||||
else
|
||||
ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : name, 'class' : 'mceItemAnchor'}, ''));
|
||||
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
};
|
||||
|
||||
tinyMCEPopup.onInit.add(AnchorDialog.init, AnchorDialog);
|
||||
|
||||
@@ -1,355 +1,355 @@
|
||||
/**
|
||||
* charmap.js
|
||||
*
|
||||
* Copyright 2009, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://tinymce.moxiecode.com/license
|
||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||
*/
|
||||
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var charmap = [
|
||||
[' ', ' ', true, 'no-break space'],
|
||||
['&', '&', true, 'ampersand'],
|
||||
['"', '"', true, 'quotation mark'],
|
||||
// finance
|
||||
['¢', '¢', true, 'cent sign'],
|
||||
['€', '€', true, 'euro sign'],
|
||||
['£', '£', true, 'pound sign'],
|
||||
['¥', '¥', true, 'yen sign'],
|
||||
// signs
|
||||
['©', '©', true, 'copyright sign'],
|
||||
['®', '®', true, 'registered sign'],
|
||||
['™', '™', true, 'trade mark sign'],
|
||||
['‰', '‰', true, 'per mille sign'],
|
||||
['µ', 'µ', true, 'micro sign'],
|
||||
['·', '·', true, 'middle dot'],
|
||||
['•', '•', true, 'bullet'],
|
||||
['…', '…', true, 'three dot leader'],
|
||||
['′', '′', true, 'minutes / feet'],
|
||||
['″', '″', true, 'seconds / inches'],
|
||||
['§', '§', true, 'section sign'],
|
||||
['¶', '¶', true, 'paragraph sign'],
|
||||
['ß', 'ß', true, 'sharp s / ess-zed'],
|
||||
// quotations
|
||||
['‹', '‹', true, 'single left-pointing angle quotation mark'],
|
||||
['›', '›', true, 'single right-pointing angle quotation mark'],
|
||||
['«', '«', true, 'left pointing guillemet'],
|
||||
['»', '»', true, 'right pointing guillemet'],
|
||||
['‘', '‘', true, 'left single quotation mark'],
|
||||
['’', '’', true, 'right single quotation mark'],
|
||||
['“', '“', true, 'left double quotation mark'],
|
||||
['”', '”', true, 'right double quotation mark'],
|
||||
['‚', '‚', true, 'single low-9 quotation mark'],
|
||||
['„', '„', true, 'double low-9 quotation mark'],
|
||||
['<', '<', true, 'less-than sign'],
|
||||
['>', '>', true, 'greater-than sign'],
|
||||
['≤', '≤', true, 'less-than or equal to'],
|
||||
['≥', '≥', true, 'greater-than or equal to'],
|
||||
['–', '–', true, 'en dash'],
|
||||
['—', '—', true, 'em dash'],
|
||||
['¯', '¯', true, 'macron'],
|
||||
['‾', '‾', true, 'overline'],
|
||||
['¤', '¤', true, 'currency sign'],
|
||||
['¦', '¦', true, 'broken bar'],
|
||||
['¨', '¨', true, 'diaeresis'],
|
||||
['¡', '¡', true, 'inverted exclamation mark'],
|
||||
['¿', '¿', true, 'turned question mark'],
|
||||
['ˆ', 'ˆ', true, 'circumflex accent'],
|
||||
['˜', '˜', true, 'small tilde'],
|
||||
['°', '°', true, 'degree sign'],
|
||||
['−', '−', true, 'minus sign'],
|
||||
['±', '±', true, 'plus-minus sign'],
|
||||
['÷', '÷', true, 'division sign'],
|
||||
['⁄', '⁄', true, 'fraction slash'],
|
||||
['×', '×', true, 'multiplication sign'],
|
||||
['¹', '¹', true, 'superscript one'],
|
||||
['²', '²', true, 'superscript two'],
|
||||
['³', '³', true, 'superscript three'],
|
||||
['¼', '¼', true, 'fraction one quarter'],
|
||||
['½', '½', true, 'fraction one half'],
|
||||
['¾', '¾', true, 'fraction three quarters'],
|
||||
// math / logical
|
||||
['ƒ', 'ƒ', true, 'function / florin'],
|
||||
['∫', '∫', true, 'integral'],
|
||||
['∑', '∑', true, 'n-ary sumation'],
|
||||
['∞', '∞', true, 'infinity'],
|
||||
['√', '√', true, 'square root'],
|
||||
['∼', '∼', false,'similar to'],
|
||||
['≅', '≅', false,'approximately equal to'],
|
||||
['≈', '≈', true, 'almost equal to'],
|
||||
['≠', '≠', true, 'not equal to'],
|
||||
['≡', '≡', true, 'identical to'],
|
||||
['∈', '∈', false,'element of'],
|
||||
['∉', '∉', false,'not an element of'],
|
||||
['∋', '∋', false,'contains as member'],
|
||||
['∏', '∏', true, 'n-ary product'],
|
||||
['∧', '∧', false,'logical and'],
|
||||
['∨', '∨', false,'logical or'],
|
||||
['¬', '¬', true, 'not sign'],
|
||||
['∩', '∩', true, 'intersection'],
|
||||
['∪', '∪', false,'union'],
|
||||
['∂', '∂', true, 'partial differential'],
|
||||
['∀', '∀', false,'for all'],
|
||||
['∃', '∃', false,'there exists'],
|
||||
['∅', '∅', false,'diameter'],
|
||||
['∇', '∇', false,'backward difference'],
|
||||
['∗', '∗', false,'asterisk operator'],
|
||||
['∝', '∝', false,'proportional to'],
|
||||
['∠', '∠', false,'angle'],
|
||||
// undefined
|
||||
['´', '´', true, 'acute accent'],
|
||||
['¸', '¸', true, 'cedilla'],
|
||||
['ª', 'ª', true, 'feminine ordinal indicator'],
|
||||
['º', 'º', true, 'masculine ordinal indicator'],
|
||||
['†', '†', true, 'dagger'],
|
||||
['‡', '‡', true, 'double dagger'],
|
||||
// alphabetical special chars
|
||||
['À', 'À', true, 'A - grave'],
|
||||
['Á', 'Á', true, 'A - acute'],
|
||||
['Â', 'Â', true, 'A - circumflex'],
|
||||
['Ã', 'Ã', true, 'A - tilde'],
|
||||
['Ä', 'Ä', true, 'A - diaeresis'],
|
||||
['Å', 'Å', true, 'A - ring above'],
|
||||
['Æ', 'Æ', true, 'ligature AE'],
|
||||
['Ç', 'Ç', true, 'C - cedilla'],
|
||||
['È', 'È', true, 'E - grave'],
|
||||
['É', 'É', true, 'E - acute'],
|
||||
['Ê', 'Ê', true, 'E - circumflex'],
|
||||
['Ë', 'Ë', true, 'E - diaeresis'],
|
||||
['Ì', 'Ì', true, 'I - grave'],
|
||||
['Í', 'Í', true, 'I - acute'],
|
||||
['Î', 'Î', true, 'I - circumflex'],
|
||||
['Ï', 'Ï', true, 'I - diaeresis'],
|
||||
['Ð', 'Ð', true, 'ETH'],
|
||||
['Ñ', 'Ñ', true, 'N - tilde'],
|
||||
['Ò', 'Ò', true, 'O - grave'],
|
||||
['Ó', 'Ó', true, 'O - acute'],
|
||||
['Ô', 'Ô', true, 'O - circumflex'],
|
||||
['Õ', 'Õ', true, 'O - tilde'],
|
||||
['Ö', 'Ö', true, 'O - diaeresis'],
|
||||
['Ø', 'Ø', true, 'O - slash'],
|
||||
['Œ', 'Œ', true, 'ligature OE'],
|
||||
['Š', 'Š', true, 'S - caron'],
|
||||
['Ù', 'Ù', true, 'U - grave'],
|
||||
['Ú', 'Ú', true, 'U - acute'],
|
||||
['Û', 'Û', true, 'U - circumflex'],
|
||||
['Ü', 'Ü', true, 'U - diaeresis'],
|
||||
['Ý', 'Ý', true, 'Y - acute'],
|
||||
['Ÿ', 'Ÿ', true, 'Y - diaeresis'],
|
||||
['Þ', 'Þ', true, 'THORN'],
|
||||
['à', 'à', true, 'a - grave'],
|
||||
['á', 'á', true, 'a - acute'],
|
||||
['â', 'â', true, 'a - circumflex'],
|
||||
['ã', 'ã', true, 'a - tilde'],
|
||||
['ä', 'ä', true, 'a - diaeresis'],
|
||||
['å', 'å', true, 'a - ring above'],
|
||||
['æ', 'æ', true, 'ligature ae'],
|
||||
['ç', 'ç', true, 'c - cedilla'],
|
||||
['è', 'è', true, 'e - grave'],
|
||||
['é', 'é', true, 'e - acute'],
|
||||
['ê', 'ê', true, 'e - circumflex'],
|
||||
['ë', 'ë', true, 'e - diaeresis'],
|
||||
['ì', 'ì', true, 'i - grave'],
|
||||
['í', 'í', true, 'i - acute'],
|
||||
['î', 'î', true, 'i - circumflex'],
|
||||
['ï', 'ï', true, 'i - diaeresis'],
|
||||
['ð', 'ð', true, 'eth'],
|
||||
['ñ', 'ñ', true, 'n - tilde'],
|
||||
['ò', 'ò', true, 'o - grave'],
|
||||
['ó', 'ó', true, 'o - acute'],
|
||||
['ô', 'ô', true, 'o - circumflex'],
|
||||
['õ', 'õ', true, 'o - tilde'],
|
||||
['ö', 'ö', true, 'o - diaeresis'],
|
||||
['ø', 'ø', true, 'o slash'],
|
||||
['œ', 'œ', true, 'ligature oe'],
|
||||
['š', 'š', true, 's - caron'],
|
||||
['ù', 'ù', true, 'u - grave'],
|
||||
['ú', 'ú', true, 'u - acute'],
|
||||
['û', 'û', true, 'u - circumflex'],
|
||||
['ü', 'ü', true, 'u - diaeresis'],
|
||||
['ý', 'ý', true, 'y - acute'],
|
||||
['þ', 'þ', true, 'thorn'],
|
||||
['ÿ', 'ÿ', true, 'y - diaeresis'],
|
||||
['Α', 'Α', true, 'Alpha'],
|
||||
['Β', 'Β', true, 'Beta'],
|
||||
['Γ', 'Γ', true, 'Gamma'],
|
||||
['Δ', 'Δ', true, 'Delta'],
|
||||
['Ε', 'Ε', true, 'Epsilon'],
|
||||
['Ζ', 'Ζ', true, 'Zeta'],
|
||||
['Η', 'Η', true, 'Eta'],
|
||||
['Θ', 'Θ', true, 'Theta'],
|
||||
['Ι', 'Ι', true, 'Iota'],
|
||||
['Κ', 'Κ', true, 'Kappa'],
|
||||
['Λ', 'Λ', true, 'Lambda'],
|
||||
['Μ', 'Μ', true, 'Mu'],
|
||||
['Ν', 'Ν', true, 'Nu'],
|
||||
['Ξ', 'Ξ', true, 'Xi'],
|
||||
['Ο', 'Ο', true, 'Omicron'],
|
||||
['Π', 'Π', true, 'Pi'],
|
||||
['Ρ', 'Ρ', true, 'Rho'],
|
||||
['Σ', 'Σ', true, 'Sigma'],
|
||||
['Τ', 'Τ', true, 'Tau'],
|
||||
['Υ', 'Υ', true, 'Upsilon'],
|
||||
['Φ', 'Φ', true, 'Phi'],
|
||||
['Χ', 'Χ', true, 'Chi'],
|
||||
['Ψ', 'Ψ', true, 'Psi'],
|
||||
['Ω', 'Ω', true, 'Omega'],
|
||||
['α', 'α', true, 'alpha'],
|
||||
['β', 'β', true, 'beta'],
|
||||
['γ', 'γ', true, 'gamma'],
|
||||
['δ', 'δ', true, 'delta'],
|
||||
['ε', 'ε', true, 'epsilon'],
|
||||
['ζ', 'ζ', true, 'zeta'],
|
||||
['η', 'η', true, 'eta'],
|
||||
['θ', 'θ', true, 'theta'],
|
||||
['ι', 'ι', true, 'iota'],
|
||||
['κ', 'κ', true, 'kappa'],
|
||||
['λ', 'λ', true, 'lambda'],
|
||||
['μ', 'μ', true, 'mu'],
|
||||
['ν', 'ν', true, 'nu'],
|
||||
['ξ', 'ξ', true, 'xi'],
|
||||
['ο', 'ο', true, 'omicron'],
|
||||
['π', 'π', true, 'pi'],
|
||||
['ρ', 'ρ', true, 'rho'],
|
||||
['ς', 'ς', true, 'final sigma'],
|
||||
['σ', 'σ', true, 'sigma'],
|
||||
['τ', 'τ', true, 'tau'],
|
||||
['υ', 'υ', true, 'upsilon'],
|
||||
['φ', 'φ', true, 'phi'],
|
||||
['χ', 'χ', true, 'chi'],
|
||||
['ψ', 'ψ', true, 'psi'],
|
||||
['ω', 'ω', true, 'omega'],
|
||||
// symbols
|
||||
['ℵ', 'ℵ', false,'alef symbol'],
|
||||
['ϖ', 'ϖ', false,'pi symbol'],
|
||||
['ℜ', 'ℜ', false,'real part symbol'],
|
||||
['ϑ','ϑ', false,'theta symbol'],
|
||||
['ϒ', 'ϒ', false,'upsilon - hook symbol'],
|
||||
['℘', '℘', false,'Weierstrass p'],
|
||||
['ℑ', 'ℑ', false,'imaginary part'],
|
||||
// arrows
|
||||
['←', '←', true, 'leftwards arrow'],
|
||||
['↑', '↑', true, 'upwards arrow'],
|
||||
['→', '→', true, 'rightwards arrow'],
|
||||
['↓', '↓', true, 'downwards arrow'],
|
||||
['↔', '↔', true, 'left right arrow'],
|
||||
['↵', '↵', false,'carriage return'],
|
||||
['⇐', '⇐', false,'leftwards double arrow'],
|
||||
['⇑', '⇑', false,'upwards double arrow'],
|
||||
['⇒', '⇒', false,'rightwards double arrow'],
|
||||
['⇓', '⇓', false,'downwards double arrow'],
|
||||
['⇔', '⇔', false,'left right double arrow'],
|
||||
['∴', '∴', false,'therefore'],
|
||||
['⊂', '⊂', false,'subset of'],
|
||||
['⊃', '⊃', false,'superset of'],
|
||||
['⊄', '⊄', false,'not a subset of'],
|
||||
['⊆', '⊆', false,'subset of or equal to'],
|
||||
['⊇', '⊇', false,'superset of or equal to'],
|
||||
['⊕', '⊕', false,'circled plus'],
|
||||
['⊗', '⊗', false,'circled times'],
|
||||
['⊥', '⊥', false,'perpendicular'],
|
||||
['⋅', '⋅', false,'dot operator'],
|
||||
['⌈', '⌈', false,'left ceiling'],
|
||||
['⌉', '⌉', false,'right ceiling'],
|
||||
['⌊', '⌊', false,'left floor'],
|
||||
['⌋', '⌋', false,'right floor'],
|
||||
['⟨', '〈', false,'left-pointing angle bracket'],
|
||||
['⟩', '〉', false,'right-pointing angle bracket'],
|
||||
['◊', '◊', true, 'lozenge'],
|
||||
['♠', '♠', true, 'black spade suit'],
|
||||
['♣', '♣', true, 'black club suit'],
|
||||
['♥', '♥', true, 'black heart suit'],
|
||||
['♦', '♦', true, 'black diamond suit'],
|
||||
[' ', ' ', false,'en space'],
|
||||
[' ', ' ', false,'em space'],
|
||||
[' ', ' ', false,'thin space'],
|
||||
['‌', '‌', false,'zero width non-joiner'],
|
||||
['‍', '‍', false,'zero width joiner'],
|
||||
['‎', '‎', false,'left-to-right mark'],
|
||||
['‏', '‏', false,'right-to-left mark'],
|
||||
['­', '­', false,'soft hyphen']
|
||||
];
|
||||
|
||||
tinyMCEPopup.onInit.add(function() {
|
||||
tinyMCEPopup.dom.setHTML('charmapView', renderCharMapHTML());
|
||||
addKeyboardNavigation();
|
||||
});
|
||||
|
||||
function addKeyboardNavigation(){
|
||||
var tableElm, cells, settings;
|
||||
|
||||
cells = tinyMCEPopup.dom.select(".charmaplink", "charmapgroup");
|
||||
|
||||
settings ={
|
||||
root: "charmapgroup",
|
||||
items: cells
|
||||
};
|
||||
|
||||
tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', settings, tinyMCEPopup.dom);
|
||||
}
|
||||
|
||||
function renderCharMapHTML() {
|
||||
var charsPerRow = 20, tdWidth=20, tdHeight=20, i;
|
||||
var html = '<div id="charmapgroup" aria-labelledby="charmap_label" tabindex="0" role="listbox">'+
|
||||
'<table role="presentation" border="0" cellspacing="1" cellpadding="0" width="' + (tdWidth*charsPerRow) +
|
||||
'"><tr height="' + tdHeight + '">';
|
||||
var cols=-1;
|
||||
|
||||
for (i=0; i<charmap.length; i++) {
|
||||
var previewCharFn;
|
||||
|
||||
if (charmap[i][2]==true) {
|
||||
cols++;
|
||||
previewCharFn = 'previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');';
|
||||
html += ''
|
||||
+ '<td class="charmap">'
|
||||
+ '<a class="charmaplink" role="button" onmouseover="'+previewCharFn+'" onfocus="'+previewCharFn+'" href="javascript:void(0)" onclick="insertChar(\'' + charmap[i][1].substring(2,charmap[i][1].length-1) + '\');" onclick="return false;" onmousedown="return false;" title="' + charmap[i][3] + '">'
|
||||
+ charmap[i][1]
|
||||
+ '</a></td>';
|
||||
if ((cols+1) % charsPerRow == 0)
|
||||
html += '</tr><tr height="' + tdHeight + '">';
|
||||
}
|
||||
}
|
||||
|
||||
if (cols % charsPerRow > 0) {
|
||||
var padd = charsPerRow - (cols % charsPerRow);
|
||||
for (var i=0; i<padd-1; i++)
|
||||
html += '<td width="' + tdWidth + '" height="' + tdHeight + '" class="charmap"> </td>';
|
||||
}
|
||||
|
||||
html += '</tr></table></div>';
|
||||
html = html.replace(/<tr height="20"><\/tr>/g, '');
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
function insertChar(chr) {
|
||||
tinyMCEPopup.execCommand('mceInsertContent', false, '&#' + chr + ';');
|
||||
|
||||
// Refocus in window
|
||||
if (tinyMCEPopup.isWindow)
|
||||
window.focus();
|
||||
|
||||
tinyMCEPopup.editor.focus();
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
|
||||
function previewChar(codeA, codeB, codeN) {
|
||||
var elmA = document.getElementById('codeA');
|
||||
var elmB = document.getElementById('codeB');
|
||||
var elmV = document.getElementById('codeV');
|
||||
var elmN = document.getElementById('codeN');
|
||||
|
||||
if (codeA=='#160;') {
|
||||
elmV.innerHTML = '__';
|
||||
} else {
|
||||
elmV.innerHTML = '&' + codeA;
|
||||
}
|
||||
|
||||
elmB.innerHTML = '&' + codeA;
|
||||
elmA.innerHTML = '&' + codeB;
|
||||
elmN.innerHTML = codeN;
|
||||
}
|
||||
/**
|
||||
* charmap.js
|
||||
*
|
||||
* Copyright 2009, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://tinymce.moxiecode.com/license
|
||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||
*/
|
||||
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var charmap = [
|
||||
[' ', ' ', true, 'no-break space'],
|
||||
['&', '&', true, 'ampersand'],
|
||||
['"', '"', true, 'quotation mark'],
|
||||
// finance
|
||||
['¢', '¢', true, 'cent sign'],
|
||||
['€', '€', true, 'euro sign'],
|
||||
['£', '£', true, 'pound sign'],
|
||||
['¥', '¥', true, 'yen sign'],
|
||||
// signs
|
||||
['©', '©', true, 'copyright sign'],
|
||||
['®', '®', true, 'registered sign'],
|
||||
['™', '™', true, 'trade mark sign'],
|
||||
['‰', '‰', true, 'per mille sign'],
|
||||
['µ', 'µ', true, 'micro sign'],
|
||||
['·', '·', true, 'middle dot'],
|
||||
['•', '•', true, 'bullet'],
|
||||
['…', '…', true, 'three dot leader'],
|
||||
['′', '′', true, 'minutes / feet'],
|
||||
['″', '″', true, 'seconds / inches'],
|
||||
['§', '§', true, 'section sign'],
|
||||
['¶', '¶', true, 'paragraph sign'],
|
||||
['ß', 'ß', true, 'sharp s / ess-zed'],
|
||||
// quotations
|
||||
['‹', '‹', true, 'single left-pointing angle quotation mark'],
|
||||
['›', '›', true, 'single right-pointing angle quotation mark'],
|
||||
['«', '«', true, 'left pointing guillemet'],
|
||||
['»', '»', true, 'right pointing guillemet'],
|
||||
['‘', '‘', true, 'left single quotation mark'],
|
||||
['’', '’', true, 'right single quotation mark'],
|
||||
['“', '“', true, 'left double quotation mark'],
|
||||
['”', '”', true, 'right double quotation mark'],
|
||||
['‚', '‚', true, 'single low-9 quotation mark'],
|
||||
['„', '„', true, 'double low-9 quotation mark'],
|
||||
['<', '<', true, 'less-than sign'],
|
||||
['>', '>', true, 'greater-than sign'],
|
||||
['≤', '≤', true, 'less-than or equal to'],
|
||||
['≥', '≥', true, 'greater-than or equal to'],
|
||||
['–', '–', true, 'en dash'],
|
||||
['—', '—', true, 'em dash'],
|
||||
['¯', '¯', true, 'macron'],
|
||||
['‾', '‾', true, 'overline'],
|
||||
['¤', '¤', true, 'currency sign'],
|
||||
['¦', '¦', true, 'broken bar'],
|
||||
['¨', '¨', true, 'diaeresis'],
|
||||
['¡', '¡', true, 'inverted exclamation mark'],
|
||||
['¿', '¿', true, 'turned question mark'],
|
||||
['ˆ', 'ˆ', true, 'circumflex accent'],
|
||||
['˜', '˜', true, 'small tilde'],
|
||||
['°', '°', true, 'degree sign'],
|
||||
['−', '−', true, 'minus sign'],
|
||||
['±', '±', true, 'plus-minus sign'],
|
||||
['÷', '÷', true, 'division sign'],
|
||||
['⁄', '⁄', true, 'fraction slash'],
|
||||
['×', '×', true, 'multiplication sign'],
|
||||
['¹', '¹', true, 'superscript one'],
|
||||
['²', '²', true, 'superscript two'],
|
||||
['³', '³', true, 'superscript three'],
|
||||
['¼', '¼', true, 'fraction one quarter'],
|
||||
['½', '½', true, 'fraction one half'],
|
||||
['¾', '¾', true, 'fraction three quarters'],
|
||||
// math / logical
|
||||
['ƒ', 'ƒ', true, 'function / florin'],
|
||||
['∫', '∫', true, 'integral'],
|
||||
['∑', '∑', true, 'n-ary sumation'],
|
||||
['∞', '∞', true, 'infinity'],
|
||||
['√', '√', true, 'square root'],
|
||||
['∼', '∼', false,'similar to'],
|
||||
['≅', '≅', false,'approximately equal to'],
|
||||
['≈', '≈', true, 'almost equal to'],
|
||||
['≠', '≠', true, 'not equal to'],
|
||||
['≡', '≡', true, 'identical to'],
|
||||
['∈', '∈', false,'element of'],
|
||||
['∉', '∉', false,'not an element of'],
|
||||
['∋', '∋', false,'contains as member'],
|
||||
['∏', '∏', true, 'n-ary product'],
|
||||
['∧', '∧', false,'logical and'],
|
||||
['∨', '∨', false,'logical or'],
|
||||
['¬', '¬', true, 'not sign'],
|
||||
['∩', '∩', true, 'intersection'],
|
||||
['∪', '∪', false,'union'],
|
||||
['∂', '∂', true, 'partial differential'],
|
||||
['∀', '∀', false,'for all'],
|
||||
['∃', '∃', false,'there exists'],
|
||||
['∅', '∅', false,'diameter'],
|
||||
['∇', '∇', false,'backward difference'],
|
||||
['∗', '∗', false,'asterisk operator'],
|
||||
['∝', '∝', false,'proportional to'],
|
||||
['∠', '∠', false,'angle'],
|
||||
// undefined
|
||||
['´', '´', true, 'acute accent'],
|
||||
['¸', '¸', true, 'cedilla'],
|
||||
['ª', 'ª', true, 'feminine ordinal indicator'],
|
||||
['º', 'º', true, 'masculine ordinal indicator'],
|
||||
['†', '†', true, 'dagger'],
|
||||
['‡', '‡', true, 'double dagger'],
|
||||
// alphabetical special chars
|
||||
['À', 'À', true, 'A - grave'],
|
||||
['Á', 'Á', true, 'A - acute'],
|
||||
['Â', 'Â', true, 'A - circumflex'],
|
||||
['Ã', 'Ã', true, 'A - tilde'],
|
||||
['Ä', 'Ä', true, 'A - diaeresis'],
|
||||
['Å', 'Å', true, 'A - ring above'],
|
||||
['Æ', 'Æ', true, 'ligature AE'],
|
||||
['Ç', 'Ç', true, 'C - cedilla'],
|
||||
['È', 'È', true, 'E - grave'],
|
||||
['É', 'É', true, 'E - acute'],
|
||||
['Ê', 'Ê', true, 'E - circumflex'],
|
||||
['Ë', 'Ë', true, 'E - diaeresis'],
|
||||
['Ì', 'Ì', true, 'I - grave'],
|
||||
['Í', 'Í', true, 'I - acute'],
|
||||
['Î', 'Î', true, 'I - circumflex'],
|
||||
['Ï', 'Ï', true, 'I - diaeresis'],
|
||||
['Ð', 'Ð', true, 'ETH'],
|
||||
['Ñ', 'Ñ', true, 'N - tilde'],
|
||||
['Ò', 'Ò', true, 'O - grave'],
|
||||
['Ó', 'Ó', true, 'O - acute'],
|
||||
['Ô', 'Ô', true, 'O - circumflex'],
|
||||
['Õ', 'Õ', true, 'O - tilde'],
|
||||
['Ö', 'Ö', true, 'O - diaeresis'],
|
||||
['Ø', 'Ø', true, 'O - slash'],
|
||||
['Œ', 'Œ', true, 'ligature OE'],
|
||||
['Š', 'Š', true, 'S - caron'],
|
||||
['Ù', 'Ù', true, 'U - grave'],
|
||||
['Ú', 'Ú', true, 'U - acute'],
|
||||
['Û', 'Û', true, 'U - circumflex'],
|
||||
['Ü', 'Ü', true, 'U - diaeresis'],
|
||||
['Ý', 'Ý', true, 'Y - acute'],
|
||||
['Ÿ', 'Ÿ', true, 'Y - diaeresis'],
|
||||
['Þ', 'Þ', true, 'THORN'],
|
||||
['à', 'à', true, 'a - grave'],
|
||||
['á', 'á', true, 'a - acute'],
|
||||
['â', 'â', true, 'a - circumflex'],
|
||||
['ã', 'ã', true, 'a - tilde'],
|
||||
['ä', 'ä', true, 'a - diaeresis'],
|
||||
['å', 'å', true, 'a - ring above'],
|
||||
['æ', 'æ', true, 'ligature ae'],
|
||||
['ç', 'ç', true, 'c - cedilla'],
|
||||
['è', 'è', true, 'e - grave'],
|
||||
['é', 'é', true, 'e - acute'],
|
||||
['ê', 'ê', true, 'e - circumflex'],
|
||||
['ë', 'ë', true, 'e - diaeresis'],
|
||||
['ì', 'ì', true, 'i - grave'],
|
||||
['í', 'í', true, 'i - acute'],
|
||||
['î', 'î', true, 'i - circumflex'],
|
||||
['ï', 'ï', true, 'i - diaeresis'],
|
||||
['ð', 'ð', true, 'eth'],
|
||||
['ñ', 'ñ', true, 'n - tilde'],
|
||||
['ò', 'ò', true, 'o - grave'],
|
||||
['ó', 'ó', true, 'o - acute'],
|
||||
['ô', 'ô', true, 'o - circumflex'],
|
||||
['õ', 'õ', true, 'o - tilde'],
|
||||
['ö', 'ö', true, 'o - diaeresis'],
|
||||
['ø', 'ø', true, 'o slash'],
|
||||
['œ', 'œ', true, 'ligature oe'],
|
||||
['š', 'š', true, 's - caron'],
|
||||
['ù', 'ù', true, 'u - grave'],
|
||||
['ú', 'ú', true, 'u - acute'],
|
||||
['û', 'û', true, 'u - circumflex'],
|
||||
['ü', 'ü', true, 'u - diaeresis'],
|
||||
['ý', 'ý', true, 'y - acute'],
|
||||
['þ', 'þ', true, 'thorn'],
|
||||
['ÿ', 'ÿ', true, 'y - diaeresis'],
|
||||
['Α', 'Α', true, 'Alpha'],
|
||||
['Β', 'Β', true, 'Beta'],
|
||||
['Γ', 'Γ', true, 'Gamma'],
|
||||
['Δ', 'Δ', true, 'Delta'],
|
||||
['Ε', 'Ε', true, 'Epsilon'],
|
||||
['Ζ', 'Ζ', true, 'Zeta'],
|
||||
['Η', 'Η', true, 'Eta'],
|
||||
['Θ', 'Θ', true, 'Theta'],
|
||||
['Ι', 'Ι', true, 'Iota'],
|
||||
['Κ', 'Κ', true, 'Kappa'],
|
||||
['Λ', 'Λ', true, 'Lambda'],
|
||||
['Μ', 'Μ', true, 'Mu'],
|
||||
['Ν', 'Ν', true, 'Nu'],
|
||||
['Ξ', 'Ξ', true, 'Xi'],
|
||||
['Ο', 'Ο', true, 'Omicron'],
|
||||
['Π', 'Π', true, 'Pi'],
|
||||
['Ρ', 'Ρ', true, 'Rho'],
|
||||
['Σ', 'Σ', true, 'Sigma'],
|
||||
['Τ', 'Τ', true, 'Tau'],
|
||||
['Υ', 'Υ', true, 'Upsilon'],
|
||||
['Φ', 'Φ', true, 'Phi'],
|
||||
['Χ', 'Χ', true, 'Chi'],
|
||||
['Ψ', 'Ψ', true, 'Psi'],
|
||||
['Ω', 'Ω', true, 'Omega'],
|
||||
['α', 'α', true, 'alpha'],
|
||||
['β', 'β', true, 'beta'],
|
||||
['γ', 'γ', true, 'gamma'],
|
||||
['δ', 'δ', true, 'delta'],
|
||||
['ε', 'ε', true, 'epsilon'],
|
||||
['ζ', 'ζ', true, 'zeta'],
|
||||
['η', 'η', true, 'eta'],
|
||||
['θ', 'θ', true, 'theta'],
|
||||
['ι', 'ι', true, 'iota'],
|
||||
['κ', 'κ', true, 'kappa'],
|
||||
['λ', 'λ', true, 'lambda'],
|
||||
['μ', 'μ', true, 'mu'],
|
||||
['ν', 'ν', true, 'nu'],
|
||||
['ξ', 'ξ', true, 'xi'],
|
||||
['ο', 'ο', true, 'omicron'],
|
||||
['π', 'π', true, 'pi'],
|
||||
['ρ', 'ρ', true, 'rho'],
|
||||
['ς', 'ς', true, 'final sigma'],
|
||||
['σ', 'σ', true, 'sigma'],
|
||||
['τ', 'τ', true, 'tau'],
|
||||
['υ', 'υ', true, 'upsilon'],
|
||||
['φ', 'φ', true, 'phi'],
|
||||
['χ', 'χ', true, 'chi'],
|
||||
['ψ', 'ψ', true, 'psi'],
|
||||
['ω', 'ω', true, 'omega'],
|
||||
// symbols
|
||||
['ℵ', 'ℵ', false,'alef symbol'],
|
||||
['ϖ', 'ϖ', false,'pi symbol'],
|
||||
['ℜ', 'ℜ', false,'real part symbol'],
|
||||
['ϑ','ϑ', false,'theta symbol'],
|
||||
['ϒ', 'ϒ', false,'upsilon - hook symbol'],
|
||||
['℘', '℘', false,'Weierstrass p'],
|
||||
['ℑ', 'ℑ', false,'imaginary part'],
|
||||
// arrows
|
||||
['←', '←', true, 'leftwards arrow'],
|
||||
['↑', '↑', true, 'upwards arrow'],
|
||||
['→', '→', true, 'rightwards arrow'],
|
||||
['↓', '↓', true, 'downwards arrow'],
|
||||
['↔', '↔', true, 'left right arrow'],
|
||||
['↵', '↵', false,'carriage return'],
|
||||
['⇐', '⇐', false,'leftwards double arrow'],
|
||||
['⇑', '⇑', false,'upwards double arrow'],
|
||||
['⇒', '⇒', false,'rightwards double arrow'],
|
||||
['⇓', '⇓', false,'downwards double arrow'],
|
||||
['⇔', '⇔', false,'left right double arrow'],
|
||||
['∴', '∴', false,'therefore'],
|
||||
['⊂', '⊂', false,'subset of'],
|
||||
['⊃', '⊃', false,'superset of'],
|
||||
['⊄', '⊄', false,'not a subset of'],
|
||||
['⊆', '⊆', false,'subset of or equal to'],
|
||||
['⊇', '⊇', false,'superset of or equal to'],
|
||||
['⊕', '⊕', false,'circled plus'],
|
||||
['⊗', '⊗', false,'circled times'],
|
||||
['⊥', '⊥', false,'perpendicular'],
|
||||
['⋅', '⋅', false,'dot operator'],
|
||||
['⌈', '⌈', false,'left ceiling'],
|
||||
['⌉', '⌉', false,'right ceiling'],
|
||||
['⌊', '⌊', false,'left floor'],
|
||||
['⌋', '⌋', false,'right floor'],
|
||||
['⟨', '〈', false,'left-pointing angle bracket'],
|
||||
['⟩', '〉', false,'right-pointing angle bracket'],
|
||||
['◊', '◊', true, 'lozenge'],
|
||||
['♠', '♠', true, 'black spade suit'],
|
||||
['♣', '♣', true, 'black club suit'],
|
||||
['♥', '♥', true, 'black heart suit'],
|
||||
['♦', '♦', true, 'black diamond suit'],
|
||||
[' ', ' ', false,'en space'],
|
||||
[' ', ' ', false,'em space'],
|
||||
[' ', ' ', false,'thin space'],
|
||||
['‌', '‌', false,'zero width non-joiner'],
|
||||
['‍', '‍', false,'zero width joiner'],
|
||||
['‎', '‎', false,'left-to-right mark'],
|
||||
['‏', '‏', false,'right-to-left mark'],
|
||||
['­', '­', false,'soft hyphen']
|
||||
];
|
||||
|
||||
tinyMCEPopup.onInit.add(function() {
|
||||
tinyMCEPopup.dom.setHTML('charmapView', renderCharMapHTML());
|
||||
addKeyboardNavigation();
|
||||
});
|
||||
|
||||
function addKeyboardNavigation(){
|
||||
var tableElm, cells, settings;
|
||||
|
||||
cells = tinyMCEPopup.dom.select(".charmaplink", "charmapgroup");
|
||||
|
||||
settings ={
|
||||
root: "charmapgroup",
|
||||
items: cells
|
||||
};
|
||||
|
||||
tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', settings, tinyMCEPopup.dom);
|
||||
}
|
||||
|
||||
function renderCharMapHTML() {
|
||||
var charsPerRow = 20, tdWidth=20, tdHeight=20, i;
|
||||
var html = '<div id="charmapgroup" aria-labelledby="charmap_label" tabindex="0" role="listbox">'+
|
||||
'<table role="presentation" border="0" cellspacing="1" cellpadding="0" width="' + (tdWidth*charsPerRow) +
|
||||
'"><tr height="' + tdHeight + '">';
|
||||
var cols=-1;
|
||||
|
||||
for (i=0; i<charmap.length; i++) {
|
||||
var previewCharFn;
|
||||
|
||||
if (charmap[i][2]==true) {
|
||||
cols++;
|
||||
previewCharFn = 'previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');';
|
||||
html += ''
|
||||
+ '<td class="charmap">'
|
||||
+ '<a class="charmaplink" role="button" onmouseover="'+previewCharFn+'" onfocus="'+previewCharFn+'" href="javascript:void(0)" onclick="insertChar(\'' + charmap[i][1].substring(2,charmap[i][1].length-1) + '\');" onclick="return false;" onmousedown="return false;" title="' + charmap[i][3] + '">'
|
||||
+ charmap[i][1]
|
||||
+ '</a></td>';
|
||||
if ((cols+1) % charsPerRow == 0)
|
||||
html += '</tr><tr height="' + tdHeight + '">';
|
||||
}
|
||||
}
|
||||
|
||||
if (cols % charsPerRow > 0) {
|
||||
var padd = charsPerRow - (cols % charsPerRow);
|
||||
for (var i=0; i<padd-1; i++)
|
||||
html += '<td width="' + tdWidth + '" height="' + tdHeight + '" class="charmap"> </td>';
|
||||
}
|
||||
|
||||
html += '</tr></table></div>';
|
||||
html = html.replace(/<tr height="20"><\/tr>/g, '');
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
function insertChar(chr) {
|
||||
tinyMCEPopup.execCommand('mceInsertContent', false, '&#' + chr + ';');
|
||||
|
||||
// Refocus in window
|
||||
if (tinyMCEPopup.isWindow)
|
||||
window.focus();
|
||||
|
||||
tinyMCEPopup.editor.focus();
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
|
||||
function previewChar(codeA, codeB, codeN) {
|
||||
var elmA = document.getElementById('codeA');
|
||||
var elmB = document.getElementById('codeB');
|
||||
var elmV = document.getElementById('codeV');
|
||||
var elmN = document.getElementById('codeN');
|
||||
|
||||
if (codeA=='#160;') {
|
||||
elmV.innerHTML = '__';
|
||||
} else {
|
||||
elmV.innerHTML = '&' + codeA;
|
||||
}
|
||||
|
||||
elmB.innerHTML = '&' + codeA;
|
||||
elmA.innerHTML = '&' + codeB;
|
||||
elmN.innerHTML = codeN;
|
||||
}
|
||||
|
||||
@@ -1,329 +1,329 @@
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var detail = 50, strhex = "0123456789ABCDEF", i, isMouseDown = false, isMouseOver = false;
|
||||
|
||||
var colors = [
|
||||
"#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033",
|
||||
"#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099",
|
||||
"#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff",
|
||||
"#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033",
|
||||
"#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399",
|
||||
"#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff",
|
||||
"#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333",
|
||||
"#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399",
|
||||
"#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff",
|
||||
"#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633",
|
||||
"#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699",
|
||||
"#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff",
|
||||
"#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633",
|
||||
"#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999",
|
||||
"#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff",
|
||||
"#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933",
|
||||
"#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999",
|
||||
"#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff",
|
||||
"#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33",
|
||||
"#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99",
|
||||
"#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff",
|
||||
"#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33",
|
||||
"#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99",
|
||||
"#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff",
|
||||
"#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33",
|
||||
"#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99",
|
||||
"#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff"
|
||||
];
|
||||
|
||||
var named = {
|
||||
'#F0F8FF':'Alice Blue','#FAEBD7':'Antique White','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige',
|
||||
'#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'Blanched Almond','#0000FF':'Blue','#8A2BE2':'Blue Violet','#A52A2A':'Brown',
|
||||
'#DEB887':'Burly Wood','#5F9EA0':'Cadet Blue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'Cornflower Blue',
|
||||
'#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'Dark Blue','#008B8B':'Dark Cyan','#B8860B':'Dark Golden Rod',
|
||||
'#A9A9A9':'Dark Gray','#A9A9A9':'Dark Grey','#006400':'Dark Green','#BDB76B':'Dark Khaki','#8B008B':'Dark Magenta','#556B2F':'Dark Olive Green',
|
||||
'#FF8C00':'Darkorange','#9932CC':'Dark Orchid','#8B0000':'Dark Red','#E9967A':'Dark Salmon','#8FBC8F':'Dark Sea Green','#483D8B':'Dark Slate Blue',
|
||||
'#2F4F4F':'Dark Slate Gray','#2F4F4F':'Dark Slate Grey','#00CED1':'Dark Turquoise','#9400D3':'Dark Violet','#FF1493':'Deep Pink','#00BFFF':'Deep Sky Blue',
|
||||
'#696969':'Dim Gray','#696969':'Dim Grey','#1E90FF':'Dodger Blue','#B22222':'Fire Brick','#FFFAF0':'Floral White','#228B22':'Forest Green',
|
||||
'#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'Ghost White','#FFD700':'Gold','#DAA520':'Golden Rod','#808080':'Gray','#808080':'Grey',
|
||||
'#008000':'Green','#ADFF2F':'Green Yellow','#F0FFF0':'Honey Dew','#FF69B4':'Hot Pink','#CD5C5C':'Indian Red','#4B0082':'Indigo','#FFFFF0':'Ivory',
|
||||
'#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'Lavender Blush','#7CFC00':'Lawn Green','#FFFACD':'Lemon Chiffon','#ADD8E6':'Light Blue',
|
||||
'#F08080':'Light Coral','#E0FFFF':'Light Cyan','#FAFAD2':'Light Golden Rod Yellow','#D3D3D3':'Light Gray','#D3D3D3':'Light Grey','#90EE90':'Light Green',
|
||||
'#FFB6C1':'Light Pink','#FFA07A':'Light Salmon','#20B2AA':'Light Sea Green','#87CEFA':'Light Sky Blue','#778899':'Light Slate Gray','#778899':'Light Slate Grey',
|
||||
'#B0C4DE':'Light Steel Blue','#FFFFE0':'Light Yellow','#00FF00':'Lime','#32CD32':'Lime Green','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon',
|
||||
'#66CDAA':'Medium Aqua Marine','#0000CD':'Medium Blue','#BA55D3':'Medium Orchid','#9370D8':'Medium Purple','#3CB371':'Medium Sea Green','#7B68EE':'Medium Slate Blue',
|
||||
'#00FA9A':'Medium Spring Green','#48D1CC':'Medium Turquoise','#C71585':'Medium Violet Red','#191970':'Midnight Blue','#F5FFFA':'Mint Cream','#FFE4E1':'Misty Rose','#FFE4B5':'Moccasin',
|
||||
'#FFDEAD':'Navajo White','#000080':'Navy','#FDF5E6':'Old Lace','#808000':'Olive','#6B8E23':'Olive Drab','#FFA500':'Orange','#FF4500':'Orange Red','#DA70D6':'Orchid',
|
||||
'#EEE8AA':'Pale Golden Rod','#98FB98':'Pale Green','#AFEEEE':'Pale Turquoise','#D87093':'Pale Violet Red','#FFEFD5':'Papaya Whip','#FFDAB9':'Peach Puff',
|
||||
'#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'Powder Blue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'Rosy Brown','#4169E1':'Royal Blue',
|
||||
'#8B4513':'Saddle Brown','#FA8072':'Salmon','#F4A460':'Sandy Brown','#2E8B57':'Sea Green','#FFF5EE':'Sea Shell','#A0522D':'Sienna','#C0C0C0':'Silver',
|
||||
'#87CEEB':'Sky Blue','#6A5ACD':'Slate Blue','#708090':'Slate Gray','#708090':'Slate Grey','#FFFAFA':'Snow','#00FF7F':'Spring Green',
|
||||
'#4682B4':'Steel Blue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet',
|
||||
'#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'White Smoke','#FFFF00':'Yellow','#9ACD32':'Yellow Green'
|
||||
};
|
||||
|
||||
var namedLookup = {};
|
||||
|
||||
function init() {
|
||||
var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')), key, value;
|
||||
|
||||
tinyMCEPopup.resizeToInnerSize();
|
||||
|
||||
generatePicker();
|
||||
generateWebColors();
|
||||
generateNamedColors();
|
||||
|
||||
if (inputColor) {
|
||||
changeFinalColor(inputColor);
|
||||
|
||||
col = convertHexToRGB(inputColor);
|
||||
|
||||
if (col)
|
||||
updateLight(col.r, col.g, col.b);
|
||||
}
|
||||
|
||||
for (key in named) {
|
||||
value = named[key];
|
||||
namedLookup[value.replace(/\s+/, '').toLowerCase()] = key.replace(/#/, '').toLowerCase();
|
||||
}
|
||||
}
|
||||
|
||||
function toHexColor(color) {
|
||||
var matches, red, green, blue, toInt = parseInt;
|
||||
|
||||
function hex(value) {
|
||||
value = parseInt(value).toString(16);
|
||||
|
||||
return value.length > 1 ? value : '0' + value; // Padd with leading zero
|
||||
};
|
||||
|
||||
color = color.replace(/[\s#]+/g, '').toLowerCase();
|
||||
color = namedLookup[color] || color;
|
||||
matches = /^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)|([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})|([a-f0-9])([a-f0-9])([a-f0-9])$/.exec(color);
|
||||
|
||||
if (matches) {
|
||||
if (matches[1]) {
|
||||
red = toInt(matches[1]);
|
||||
green = toInt(matches[2]);
|
||||
blue = toInt(matches[3]);
|
||||
} else if (matches[4]) {
|
||||
red = toInt(matches[4], 16);
|
||||
green = toInt(matches[5], 16);
|
||||
blue = toInt(matches[6], 16);
|
||||
} else if (matches[7]) {
|
||||
red = toInt(matches[7] + matches[7], 16);
|
||||
green = toInt(matches[8] + matches[8], 16);
|
||||
blue = toInt(matches[9] + matches[9], 16);
|
||||
}
|
||||
|
||||
return '#' + hex(red) + hex(green) + hex(blue);
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
function insertAction() {
|
||||
var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func');
|
||||
|
||||
tinyMCEPopup.restoreSelection();
|
||||
|
||||
if (f)
|
||||
f(toHexColor(color));
|
||||
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
|
||||
function showColor(color, name) {
|
||||
if (name)
|
||||
document.getElementById("colorname").innerHTML = name;
|
||||
|
||||
document.getElementById("preview").style.backgroundColor = color;
|
||||
document.getElementById("color").value = color.toUpperCase();
|
||||
}
|
||||
|
||||
function convertRGBToHex(col) {
|
||||
var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
|
||||
|
||||
if (!col)
|
||||
return col;
|
||||
|
||||
var rgb = col.replace(re, "$1,$2,$3").split(',');
|
||||
if (rgb.length == 3) {
|
||||
r = parseInt(rgb[0]).toString(16);
|
||||
g = parseInt(rgb[1]).toString(16);
|
||||
b = parseInt(rgb[2]).toString(16);
|
||||
|
||||
r = r.length == 1 ? '0' + r : r;
|
||||
g = g.length == 1 ? '0' + g : g;
|
||||
b = b.length == 1 ? '0' + b : b;
|
||||
|
||||
return "#" + r + g + b;
|
||||
}
|
||||
|
||||
return col;
|
||||
}
|
||||
|
||||
function convertHexToRGB(col) {
|
||||
if (col.indexOf('#') != -1) {
|
||||
col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
|
||||
|
||||
r = parseInt(col.substring(0, 2), 16);
|
||||
g = parseInt(col.substring(2, 4), 16);
|
||||
b = parseInt(col.substring(4, 6), 16);
|
||||
|
||||
return {r : r, g : g, b : b};
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function generatePicker() {
|
||||
var el = document.getElementById('light'), h = '', i;
|
||||
|
||||
for (i = 0; i < detail; i++){
|
||||
h += '<div id="gs'+i+'" style="background-color:#000000; width:15px; height:3px; border-style:none; border-width:0px;"'
|
||||
+ ' onclick="changeFinalColor(this.style.backgroundColor)"'
|
||||
+ ' onmousedown="isMouseDown = true; return false;"'
|
||||
+ ' onmouseup="isMouseDown = false;"'
|
||||
+ ' onmousemove="if (isMouseDown && isMouseOver) changeFinalColor(this.style.backgroundColor); return false;"'
|
||||
+ ' onmouseover="isMouseOver = true;"'
|
||||
+ ' onmouseout="isMouseOver = false;"'
|
||||
+ '></div>';
|
||||
}
|
||||
|
||||
el.innerHTML = h;
|
||||
}
|
||||
|
||||
function generateWebColors() {
|
||||
var el = document.getElementById('webcolors'), h = '', i;
|
||||
|
||||
if (el.className == 'generated')
|
||||
return;
|
||||
|
||||
// TODO: VoiceOver doesn't seem to support legend as a label referenced by labelledby.
|
||||
h += '<div role="listbox" aria-labelledby="webcolors_title" tabindex="0"><table role="presentation" border="0" cellspacing="1" cellpadding="0">'
|
||||
+ '<tr>';
|
||||
|
||||
for (i=0; i<colors.length; i++) {
|
||||
h += '<td bgcolor="' + colors[i] + '" width="10" height="10">'
|
||||
+ '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="web_colors_' + i + '" onfocus="showColor(\'' + colors[i] + '\');" onmouseover="showColor(\'' + colors[i] + '\');" style="display:block;width:10px;height:10px;overflow:hidden;">';
|
||||
if (tinyMCEPopup.editor.forcedHighContrastMode) {
|
||||
h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
|
||||
}
|
||||
h += '<span class="mceVoiceLabel" style="display:none;" id="web_colors_' + i + '">' + colors[i].toUpperCase() + '</span>';
|
||||
h += '</a></td>';
|
||||
if ((i+1) % 18 == 0)
|
||||
h += '</tr><tr>';
|
||||
}
|
||||
|
||||
h += '</table></div>';
|
||||
|
||||
el.innerHTML = h;
|
||||
el.className = 'generated';
|
||||
|
||||
paintCanvas(el);
|
||||
enableKeyboardNavigation(el.firstChild);
|
||||
}
|
||||
|
||||
function paintCanvas(el) {
|
||||
tinyMCEPopup.getWin().tinymce.each(tinyMCEPopup.dom.select('canvas.mceColorSwatch', el), function(canvas) {
|
||||
var context;
|
||||
if (canvas.getContext && (context = canvas.getContext("2d"))) {
|
||||
context.fillStyle = canvas.getAttribute('data-color');
|
||||
context.fillRect(0, 0, 10, 10);
|
||||
}
|
||||
});
|
||||
}
|
||||
function generateNamedColors() {
|
||||
var el = document.getElementById('namedcolors'), h = '', n, v, i = 0;
|
||||
|
||||
if (el.className == 'generated')
|
||||
return;
|
||||
|
||||
for (n in named) {
|
||||
v = named[n];
|
||||
h += '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="named_colors_' + i + '" onfocus="showColor(\'' + n + '\',\'' + v + '\');" onmouseover="showColor(\'' + n + '\',\'' + v + '\');" style="background-color: ' + n + '">';
|
||||
if (tinyMCEPopup.editor.forcedHighContrastMode) {
|
||||
h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
|
||||
}
|
||||
h += '<span class="mceVoiceLabel" style="display:none;" id="named_colors_' + i + '">' + v + '</span>';
|
||||
h += '</a>';
|
||||
i++;
|
||||
}
|
||||
|
||||
el.innerHTML = h;
|
||||
el.className = 'generated';
|
||||
|
||||
paintCanvas(el);
|
||||
enableKeyboardNavigation(el);
|
||||
}
|
||||
|
||||
function enableKeyboardNavigation(el) {
|
||||
tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
|
||||
root: el,
|
||||
items: tinyMCEPopup.dom.select('a', el)
|
||||
}, tinyMCEPopup.dom);
|
||||
}
|
||||
|
||||
function dechex(n) {
|
||||
return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16);
|
||||
}
|
||||
|
||||
function computeColor(e) {
|
||||
var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB;
|
||||
|
||||
x = e.offsetX ? e.offsetX : (e.target ? e.clientX - e.target.x : 0);
|
||||
y = e.offsetY ? e.offsetY : (e.target ? e.clientY - e.target.y : 0);
|
||||
|
||||
partWidth = document.getElementById('colors').width / 6;
|
||||
partDetail = detail / 2;
|
||||
imHeight = document.getElementById('colors').height;
|
||||
|
||||
r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255;
|
||||
g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth);
|
||||
b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth);
|
||||
|
||||
coef = (imHeight - y) / imHeight;
|
||||
r = 128 + (r - 128) * coef;
|
||||
g = 128 + (g - 128) * coef;
|
||||
b = 128 + (b - 128) * coef;
|
||||
|
||||
changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b));
|
||||
updateLight(r, g, b);
|
||||
}
|
||||
|
||||
function updateLight(r, g, b) {
|
||||
var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color;
|
||||
|
||||
for (i=0; i<detail; i++) {
|
||||
if ((i>=0) && (i<partDetail)) {
|
||||
finalCoef = i / partDetail;
|
||||
finalR = dechex(255 - (255 - r) * finalCoef);
|
||||
finalG = dechex(255 - (255 - g) * finalCoef);
|
||||
finalB = dechex(255 - (255 - b) * finalCoef);
|
||||
} else {
|
||||
finalCoef = 2 - i / partDetail;
|
||||
finalR = dechex(r * finalCoef);
|
||||
finalG = dechex(g * finalCoef);
|
||||
finalB = dechex(b * finalCoef);
|
||||
}
|
||||
|
||||
color = finalR + finalG + finalB;
|
||||
|
||||
setCol('gs' + i, '#'+color);
|
||||
}
|
||||
}
|
||||
|
||||
function changeFinalColor(color) {
|
||||
if (color.indexOf('#') == -1)
|
||||
color = convertRGBToHex(color);
|
||||
|
||||
setCol('preview', color);
|
||||
document.getElementById('color').value = color;
|
||||
}
|
||||
|
||||
function setCol(e, c) {
|
||||
try {
|
||||
document.getElementById(e).style.backgroundColor = c;
|
||||
} catch (ex) {
|
||||
// Ignore IE warning
|
||||
}
|
||||
}
|
||||
|
||||
tinyMCEPopup.onInit.add(init);
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var detail = 50, strhex = "0123456789ABCDEF", i, isMouseDown = false, isMouseOver = false;
|
||||
|
||||
var colors = [
|
||||
"#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033",
|
||||
"#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099",
|
||||
"#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff",
|
||||
"#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033",
|
||||
"#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399",
|
||||
"#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff",
|
||||
"#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333",
|
||||
"#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399",
|
||||
"#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff",
|
||||
"#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633",
|
||||
"#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699",
|
||||
"#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff",
|
||||
"#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633",
|
||||
"#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999",
|
||||
"#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff",
|
||||
"#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933",
|
||||
"#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999",
|
||||
"#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff",
|
||||
"#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33",
|
||||
"#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99",
|
||||
"#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff",
|
||||
"#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33",
|
||||
"#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99",
|
||||
"#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff",
|
||||
"#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33",
|
||||
"#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99",
|
||||
"#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff"
|
||||
];
|
||||
|
||||
var named = {
|
||||
'#F0F8FF':'Alice Blue','#FAEBD7':'Antique White','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige',
|
||||
'#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'Blanched Almond','#0000FF':'Blue','#8A2BE2':'Blue Violet','#A52A2A':'Brown',
|
||||
'#DEB887':'Burly Wood','#5F9EA0':'Cadet Blue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'Cornflower Blue',
|
||||
'#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'Dark Blue','#008B8B':'Dark Cyan','#B8860B':'Dark Golden Rod',
|
||||
'#A9A9A9':'Dark Gray','#A9A9A9':'Dark Grey','#006400':'Dark Green','#BDB76B':'Dark Khaki','#8B008B':'Dark Magenta','#556B2F':'Dark Olive Green',
|
||||
'#FF8C00':'Darkorange','#9932CC':'Dark Orchid','#8B0000':'Dark Red','#E9967A':'Dark Salmon','#8FBC8F':'Dark Sea Green','#483D8B':'Dark Slate Blue',
|
||||
'#2F4F4F':'Dark Slate Gray','#2F4F4F':'Dark Slate Grey','#00CED1':'Dark Turquoise','#9400D3':'Dark Violet','#FF1493':'Deep Pink','#00BFFF':'Deep Sky Blue',
|
||||
'#696969':'Dim Gray','#696969':'Dim Grey','#1E90FF':'Dodger Blue','#B22222':'Fire Brick','#FFFAF0':'Floral White','#228B22':'Forest Green',
|
||||
'#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'Ghost White','#FFD700':'Gold','#DAA520':'Golden Rod','#808080':'Gray','#808080':'Grey',
|
||||
'#008000':'Green','#ADFF2F':'Green Yellow','#F0FFF0':'Honey Dew','#FF69B4':'Hot Pink','#CD5C5C':'Indian Red','#4B0082':'Indigo','#FFFFF0':'Ivory',
|
||||
'#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'Lavender Blush','#7CFC00':'Lawn Green','#FFFACD':'Lemon Chiffon','#ADD8E6':'Light Blue',
|
||||
'#F08080':'Light Coral','#E0FFFF':'Light Cyan','#FAFAD2':'Light Golden Rod Yellow','#D3D3D3':'Light Gray','#D3D3D3':'Light Grey','#90EE90':'Light Green',
|
||||
'#FFB6C1':'Light Pink','#FFA07A':'Light Salmon','#20B2AA':'Light Sea Green','#87CEFA':'Light Sky Blue','#778899':'Light Slate Gray','#778899':'Light Slate Grey',
|
||||
'#B0C4DE':'Light Steel Blue','#FFFFE0':'Light Yellow','#00FF00':'Lime','#32CD32':'Lime Green','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon',
|
||||
'#66CDAA':'Medium Aqua Marine','#0000CD':'Medium Blue','#BA55D3':'Medium Orchid','#9370D8':'Medium Purple','#3CB371':'Medium Sea Green','#7B68EE':'Medium Slate Blue',
|
||||
'#00FA9A':'Medium Spring Green','#48D1CC':'Medium Turquoise','#C71585':'Medium Violet Red','#191970':'Midnight Blue','#F5FFFA':'Mint Cream','#FFE4E1':'Misty Rose','#FFE4B5':'Moccasin',
|
||||
'#FFDEAD':'Navajo White','#000080':'Navy','#FDF5E6':'Old Lace','#808000':'Olive','#6B8E23':'Olive Drab','#FFA500':'Orange','#FF4500':'Orange Red','#DA70D6':'Orchid',
|
||||
'#EEE8AA':'Pale Golden Rod','#98FB98':'Pale Green','#AFEEEE':'Pale Turquoise','#D87093':'Pale Violet Red','#FFEFD5':'Papaya Whip','#FFDAB9':'Peach Puff',
|
||||
'#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'Powder Blue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'Rosy Brown','#4169E1':'Royal Blue',
|
||||
'#8B4513':'Saddle Brown','#FA8072':'Salmon','#F4A460':'Sandy Brown','#2E8B57':'Sea Green','#FFF5EE':'Sea Shell','#A0522D':'Sienna','#C0C0C0':'Silver',
|
||||
'#87CEEB':'Sky Blue','#6A5ACD':'Slate Blue','#708090':'Slate Gray','#708090':'Slate Grey','#FFFAFA':'Snow','#00FF7F':'Spring Green',
|
||||
'#4682B4':'Steel Blue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet',
|
||||
'#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'White Smoke','#FFFF00':'Yellow','#9ACD32':'Yellow Green'
|
||||
};
|
||||
|
||||
var namedLookup = {};
|
||||
|
||||
function init() {
|
||||
var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')), key, value;
|
||||
|
||||
tinyMCEPopup.resizeToInnerSize();
|
||||
|
||||
generatePicker();
|
||||
generateWebColors();
|
||||
generateNamedColors();
|
||||
|
||||
if (inputColor) {
|
||||
changeFinalColor(inputColor);
|
||||
|
||||
col = convertHexToRGB(inputColor);
|
||||
|
||||
if (col)
|
||||
updateLight(col.r, col.g, col.b);
|
||||
}
|
||||
|
||||
for (key in named) {
|
||||
value = named[key];
|
||||
namedLookup[value.replace(/\s+/, '').toLowerCase()] = key.replace(/#/, '').toLowerCase();
|
||||
}
|
||||
}
|
||||
|
||||
function toHexColor(color) {
|
||||
var matches, red, green, blue, toInt = parseInt;
|
||||
|
||||
function hex(value) {
|
||||
value = parseInt(value).toString(16);
|
||||
|
||||
return value.length > 1 ? value : '0' + value; // Padd with leading zero
|
||||
};
|
||||
|
||||
color = color.replace(/[\s#]+/g, '').toLowerCase();
|
||||
color = namedLookup[color] || color;
|
||||
matches = /^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)|([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})|([a-f0-9])([a-f0-9])([a-f0-9])$/.exec(color);
|
||||
|
||||
if (matches) {
|
||||
if (matches[1]) {
|
||||
red = toInt(matches[1]);
|
||||
green = toInt(matches[2]);
|
||||
blue = toInt(matches[3]);
|
||||
} else if (matches[4]) {
|
||||
red = toInt(matches[4], 16);
|
||||
green = toInt(matches[5], 16);
|
||||
blue = toInt(matches[6], 16);
|
||||
} else if (matches[7]) {
|
||||
red = toInt(matches[7] + matches[7], 16);
|
||||
green = toInt(matches[8] + matches[8], 16);
|
||||
blue = toInt(matches[9] + matches[9], 16);
|
||||
}
|
||||
|
||||
return '#' + hex(red) + hex(green) + hex(blue);
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
function insertAction() {
|
||||
var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func');
|
||||
|
||||
tinyMCEPopup.restoreSelection();
|
||||
|
||||
if (f)
|
||||
f(toHexColor(color));
|
||||
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
|
||||
function showColor(color, name) {
|
||||
if (name)
|
||||
document.getElementById("colorname").innerHTML = name;
|
||||
|
||||
document.getElementById("preview").style.backgroundColor = color;
|
||||
document.getElementById("color").value = color.toUpperCase();
|
||||
}
|
||||
|
||||
function convertRGBToHex(col) {
|
||||
var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
|
||||
|
||||
if (!col)
|
||||
return col;
|
||||
|
||||
var rgb = col.replace(re, "$1,$2,$3").split(',');
|
||||
if (rgb.length == 3) {
|
||||
r = parseInt(rgb[0]).toString(16);
|
||||
g = parseInt(rgb[1]).toString(16);
|
||||
b = parseInt(rgb[2]).toString(16);
|
||||
|
||||
r = r.length == 1 ? '0' + r : r;
|
||||
g = g.length == 1 ? '0' + g : g;
|
||||
b = b.length == 1 ? '0' + b : b;
|
||||
|
||||
return "#" + r + g + b;
|
||||
}
|
||||
|
||||
return col;
|
||||
}
|
||||
|
||||
function convertHexToRGB(col) {
|
||||
if (col.indexOf('#') != -1) {
|
||||
col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
|
||||
|
||||
r = parseInt(col.substring(0, 2), 16);
|
||||
g = parseInt(col.substring(2, 4), 16);
|
||||
b = parseInt(col.substring(4, 6), 16);
|
||||
|
||||
return {r : r, g : g, b : b};
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function generatePicker() {
|
||||
var el = document.getElementById('light'), h = '', i;
|
||||
|
||||
for (i = 0; i < detail; i++){
|
||||
h += '<div id="gs'+i+'" style="background-color:#000000; width:15px; height:3px; border-style:none; border-width:0px;"'
|
||||
+ ' onclick="changeFinalColor(this.style.backgroundColor)"'
|
||||
+ ' onmousedown="isMouseDown = true; return false;"'
|
||||
+ ' onmouseup="isMouseDown = false;"'
|
||||
+ ' onmousemove="if (isMouseDown && isMouseOver) changeFinalColor(this.style.backgroundColor); return false;"'
|
||||
+ ' onmouseover="isMouseOver = true;"'
|
||||
+ ' onmouseout="isMouseOver = false;"'
|
||||
+ '></div>';
|
||||
}
|
||||
|
||||
el.innerHTML = h;
|
||||
}
|
||||
|
||||
function generateWebColors() {
|
||||
var el = document.getElementById('webcolors'), h = '', i;
|
||||
|
||||
if (el.className == 'generated')
|
||||
return;
|
||||
|
||||
// TODO: VoiceOver doesn't seem to support legend as a label referenced by labelledby.
|
||||
h += '<div role="listbox" aria-labelledby="webcolors_title" tabindex="0"><table role="presentation" border="0" cellspacing="1" cellpadding="0">'
|
||||
+ '<tr>';
|
||||
|
||||
for (i=0; i<colors.length; i++) {
|
||||
h += '<td bgcolor="' + colors[i] + '" width="10" height="10">'
|
||||
+ '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="web_colors_' + i + '" onfocus="showColor(\'' + colors[i] + '\');" onmouseover="showColor(\'' + colors[i] + '\');" style="display:block;width:10px;height:10px;overflow:hidden;">';
|
||||
if (tinyMCEPopup.editor.forcedHighContrastMode) {
|
||||
h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
|
||||
}
|
||||
h += '<span class="mceVoiceLabel" style="display:none;" id="web_colors_' + i + '">' + colors[i].toUpperCase() + '</span>';
|
||||
h += '</a></td>';
|
||||
if ((i+1) % 18 == 0)
|
||||
h += '</tr><tr>';
|
||||
}
|
||||
|
||||
h += '</table></div>';
|
||||
|
||||
el.innerHTML = h;
|
||||
el.className = 'generated';
|
||||
|
||||
paintCanvas(el);
|
||||
enableKeyboardNavigation(el.firstChild);
|
||||
}
|
||||
|
||||
function paintCanvas(el) {
|
||||
tinyMCEPopup.getWin().tinymce.each(tinyMCEPopup.dom.select('canvas.mceColorSwatch', el), function(canvas) {
|
||||
var context;
|
||||
if (canvas.getContext && (context = canvas.getContext("2d"))) {
|
||||
context.fillStyle = canvas.getAttribute('data-color');
|
||||
context.fillRect(0, 0, 10, 10);
|
||||
}
|
||||
});
|
||||
}
|
||||
function generateNamedColors() {
|
||||
var el = document.getElementById('namedcolors'), h = '', n, v, i = 0;
|
||||
|
||||
if (el.className == 'generated')
|
||||
return;
|
||||
|
||||
for (n in named) {
|
||||
v = named[n];
|
||||
h += '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="named_colors_' + i + '" onfocus="showColor(\'' + n + '\',\'' + v + '\');" onmouseover="showColor(\'' + n + '\',\'' + v + '\');" style="background-color: ' + n + '">';
|
||||
if (tinyMCEPopup.editor.forcedHighContrastMode) {
|
||||
h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
|
||||
}
|
||||
h += '<span class="mceVoiceLabel" style="display:none;" id="named_colors_' + i + '">' + v + '</span>';
|
||||
h += '</a>';
|
||||
i++;
|
||||
}
|
||||
|
||||
el.innerHTML = h;
|
||||
el.className = 'generated';
|
||||
|
||||
paintCanvas(el);
|
||||
enableKeyboardNavigation(el);
|
||||
}
|
||||
|
||||
function enableKeyboardNavigation(el) {
|
||||
tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
|
||||
root: el,
|
||||
items: tinyMCEPopup.dom.select('a', el)
|
||||
}, tinyMCEPopup.dom);
|
||||
}
|
||||
|
||||
function dechex(n) {
|
||||
return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16);
|
||||
}
|
||||
|
||||
function computeColor(e) {
|
||||
var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB;
|
||||
|
||||
x = e.offsetX ? e.offsetX : (e.target ? e.clientX - e.target.x : 0);
|
||||
y = e.offsetY ? e.offsetY : (e.target ? e.clientY - e.target.y : 0);
|
||||
|
||||
partWidth = document.getElementById('colors').width / 6;
|
||||
partDetail = detail / 2;
|
||||
imHeight = document.getElementById('colors').height;
|
||||
|
||||
r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255;
|
||||
g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth);
|
||||
b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth);
|
||||
|
||||
coef = (imHeight - y) / imHeight;
|
||||
r = 128 + (r - 128) * coef;
|
||||
g = 128 + (g - 128) * coef;
|
||||
b = 128 + (b - 128) * coef;
|
||||
|
||||
changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b));
|
||||
updateLight(r, g, b);
|
||||
}
|
||||
|
||||
function updateLight(r, g, b) {
|
||||
var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color;
|
||||
|
||||
for (i=0; i<detail; i++) {
|
||||
if ((i>=0) && (i<partDetail)) {
|
||||
finalCoef = i / partDetail;
|
||||
finalR = dechex(255 - (255 - r) * finalCoef);
|
||||
finalG = dechex(255 - (255 - g) * finalCoef);
|
||||
finalB = dechex(255 - (255 - b) * finalCoef);
|
||||
} else {
|
||||
finalCoef = 2 - i / partDetail;
|
||||
finalR = dechex(r * finalCoef);
|
||||
finalG = dechex(g * finalCoef);
|
||||
finalB = dechex(b * finalCoef);
|
||||
}
|
||||
|
||||
color = finalR + finalG + finalB;
|
||||
|
||||
setCol('gs' + i, '#'+color);
|
||||
}
|
||||
}
|
||||
|
||||
function changeFinalColor(color) {
|
||||
if (color.indexOf('#') == -1)
|
||||
color = convertRGBToHex(color);
|
||||
|
||||
setCol('preview', color);
|
||||
document.getElementById('color').value = color;
|
||||
}
|
||||
|
||||
function setCol(e, c) {
|
||||
try {
|
||||
document.getElementById(e).style.backgroundColor = c;
|
||||
} catch (ex) {
|
||||
// Ignore IE warning
|
||||
}
|
||||
}
|
||||
|
||||
tinyMCEPopup.onInit.add(init);
|
||||
|
||||
@@ -1,247 +1,247 @@
|
||||
var ImageDialog = {
|
||||
preInit : function() {
|
||||
var url;
|
||||
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
if (url = tinyMCEPopup.getParam("external_image_list_url"))
|
||||
document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
|
||||
},
|
||||
|
||||
init : function() {
|
||||
var f = document.forms[0], ed = tinyMCEPopup.editor;
|
||||
|
||||
// Setup browse button
|
||||
document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image');
|
||||
if (isVisible('srcbrowser'))
|
||||
document.getElementById('src').style.width = '180px';
|
||||
|
||||
e = ed.selection.getNode();
|
||||
|
||||
this.fillFileList('image_list', 'tinyMCEImageList');
|
||||
|
||||
if (e.nodeName == 'IMG') {
|
||||
f.src.value = ed.dom.getAttrib(e, 'src');
|
||||
f.alt.value = ed.dom.getAttrib(e, 'alt');
|
||||
f.border.value = this.getAttrib(e, 'border');
|
||||
f.vspace.value = this.getAttrib(e, 'vspace');
|
||||
f.hspace.value = this.getAttrib(e, 'hspace');
|
||||
f.width.value = ed.dom.getAttrib(e, 'width');
|
||||
f.height.value = ed.dom.getAttrib(e, 'height');
|
||||
f.insert.value = ed.getLang('update');
|
||||
this.styleVal = ed.dom.getAttrib(e, 'style');
|
||||
selectByValue(f, 'image_list', f.src.value);
|
||||
selectByValue(f, 'align', this.getAttrib(e, 'align'));
|
||||
this.updateStyle();
|
||||
}
|
||||
},
|
||||
|
||||
fillFileList : function(id, l) {
|
||||
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
|
||||
|
||||
l = window[l];
|
||||
|
||||
if (l && l.length > 0) {
|
||||
lst.options[lst.options.length] = new Option('', '');
|
||||
|
||||
tinymce.each(l, function(o) {
|
||||
lst.options[lst.options.length] = new Option(o[0], o[1]);
|
||||
});
|
||||
} else
|
||||
dom.remove(dom.getParent(id, 'tr'));
|
||||
},
|
||||
|
||||
update : function() {
|
||||
var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, args = {}, el;
|
||||
|
||||
tinyMCEPopup.restoreSelection();
|
||||
|
||||
if (f.src.value === '') {
|
||||
if (ed.selection.getNode().nodeName == 'IMG') {
|
||||
ed.dom.remove(ed.selection.getNode());
|
||||
ed.execCommand('mceRepaint');
|
||||
}
|
||||
|
||||
tinyMCEPopup.close();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ed.settings.inline_styles) {
|
||||
args = tinymce.extend(args, {
|
||||
vspace : nl.vspace.value,
|
||||
hspace : nl.hspace.value,
|
||||
border : nl.border.value,
|
||||
align : getSelectValue(f, 'align')
|
||||
});
|
||||
} else
|
||||
args.style = this.styleVal;
|
||||
|
||||
tinymce.extend(args, {
|
||||
src : f.src.value.replace(/ /g, '%20'),
|
||||
alt : f.alt.value,
|
||||
width : f.width.value,
|
||||
height : f.height.value
|
||||
});
|
||||
|
||||
el = ed.selection.getNode();
|
||||
|
||||
if (el && el.nodeName == 'IMG') {
|
||||
ed.dom.setAttribs(el, args);
|
||||
tinyMCEPopup.editor.execCommand('mceRepaint');
|
||||
tinyMCEPopup.editor.focus();
|
||||
} else {
|
||||
ed.execCommand('mceInsertContent', false, '<img id="__mce_tmp" />', {skip_undo : 1});
|
||||
ed.dom.setAttribs('__mce_tmp', args);
|
||||
ed.dom.setAttrib('__mce_tmp', 'id', '');
|
||||
ed.undoManager.add();
|
||||
}
|
||||
|
||||
tinyMCEPopup.close();
|
||||
},
|
||||
|
||||
updateStyle : function() {
|
||||
var dom = tinyMCEPopup.dom, st, v, f = document.forms[0];
|
||||
|
||||
if (tinyMCEPopup.editor.settings.inline_styles) {
|
||||
st = tinyMCEPopup.dom.parseStyle(this.styleVal);
|
||||
|
||||
// Handle align
|
||||
v = getSelectValue(f, 'align');
|
||||
if (v) {
|
||||
if (v == 'left' || v == 'right') {
|
||||
st['float'] = v;
|
||||
delete st['vertical-align'];
|
||||
} else {
|
||||
st['vertical-align'] = v;
|
||||
delete st['float'];
|
||||
}
|
||||
} else {
|
||||
delete st['float'];
|
||||
delete st['vertical-align'];
|
||||
}
|
||||
|
||||
// Handle border
|
||||
v = f.border.value;
|
||||
if (v || v == '0') {
|
||||
if (v == '0')
|
||||
st['border'] = '0';
|
||||
else
|
||||
st['border'] = v + 'px solid black';
|
||||
} else
|
||||
delete st['border'];
|
||||
|
||||
// Handle hspace
|
||||
v = f.hspace.value;
|
||||
if (v) {
|
||||
delete st['margin'];
|
||||
st['margin-left'] = v + 'px';
|
||||
st['margin-right'] = v + 'px';
|
||||
} else {
|
||||
delete st['margin-left'];
|
||||
delete st['margin-right'];
|
||||
}
|
||||
|
||||
// Handle vspace
|
||||
v = f.vspace.value;
|
||||
if (v) {
|
||||
delete st['margin'];
|
||||
st['margin-top'] = v + 'px';
|
||||
st['margin-bottom'] = v + 'px';
|
||||
} else {
|
||||
delete st['margin-top'];
|
||||
delete st['margin-bottom'];
|
||||
}
|
||||
|
||||
// Merge
|
||||
st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st), 'img');
|
||||
this.styleVal = dom.serializeStyle(st, 'img');
|
||||
}
|
||||
},
|
||||
|
||||
getAttrib : function(e, at) {
|
||||
var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2;
|
||||
|
||||
if (ed.settings.inline_styles) {
|
||||
switch (at) {
|
||||
case 'align':
|
||||
if (v = dom.getStyle(e, 'float'))
|
||||
return v;
|
||||
|
||||
if (v = dom.getStyle(e, 'vertical-align'))
|
||||
return v;
|
||||
|
||||
break;
|
||||
|
||||
case 'hspace':
|
||||
v = dom.getStyle(e, 'margin-left')
|
||||
v2 = dom.getStyle(e, 'margin-right');
|
||||
if (v && v == v2)
|
||||
return parseInt(v.replace(/[^0-9]/g, ''));
|
||||
|
||||
break;
|
||||
|
||||
case 'vspace':
|
||||
v = dom.getStyle(e, 'margin-top')
|
||||
v2 = dom.getStyle(e, 'margin-bottom');
|
||||
if (v && v == v2)
|
||||
return parseInt(v.replace(/[^0-9]/g, ''));
|
||||
|
||||
break;
|
||||
|
||||
case 'border':
|
||||
v = 0;
|
||||
|
||||
tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) {
|
||||
sv = dom.getStyle(e, 'border-' + sv + '-width');
|
||||
|
||||
// False or not the same as prev
|
||||
if (!sv || (sv != v && v !== 0)) {
|
||||
v = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (sv)
|
||||
v = sv;
|
||||
});
|
||||
|
||||
if (v)
|
||||
return parseInt(v.replace(/[^0-9]/g, ''));
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (v = dom.getAttrib(e, at))
|
||||
return v;
|
||||
|
||||
return '';
|
||||
},
|
||||
|
||||
resetImageData : function() {
|
||||
var f = document.forms[0];
|
||||
|
||||
f.width.value = f.height.value = "";
|
||||
},
|
||||
|
||||
updateImageData : function() {
|
||||
var f = document.forms[0], t = ImageDialog;
|
||||
|
||||
if (f.width.value == "")
|
||||
f.width.value = t.preloadImg.width;
|
||||
|
||||
if (f.height.value == "")
|
||||
f.height.value = t.preloadImg.height;
|
||||
},
|
||||
|
||||
getImageData : function() {
|
||||
var f = document.forms[0];
|
||||
|
||||
this.preloadImg = new Image();
|
||||
this.preloadImg.onload = this.updateImageData;
|
||||
this.preloadImg.onerror = this.resetImageData;
|
||||
this.preloadImg.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.src.value);
|
||||
}
|
||||
};
|
||||
|
||||
ImageDialog.preInit();
|
||||
tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog);
|
||||
var ImageDialog = {
|
||||
preInit : function() {
|
||||
var url;
|
||||
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
if (url = tinyMCEPopup.getParam("external_image_list_url"))
|
||||
document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
|
||||
},
|
||||
|
||||
init : function() {
|
||||
var f = document.forms[0], ed = tinyMCEPopup.editor;
|
||||
|
||||
// Setup browse button
|
||||
document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image');
|
||||
if (isVisible('srcbrowser'))
|
||||
document.getElementById('src').style.width = '180px';
|
||||
|
||||
e = ed.selection.getNode();
|
||||
|
||||
this.fillFileList('image_list', 'tinyMCEImageList');
|
||||
|
||||
if (e.nodeName == 'IMG') {
|
||||
f.src.value = ed.dom.getAttrib(e, 'src');
|
||||
f.alt.value = ed.dom.getAttrib(e, 'alt');
|
||||
f.border.value = this.getAttrib(e, 'border');
|
||||
f.vspace.value = this.getAttrib(e, 'vspace');
|
||||
f.hspace.value = this.getAttrib(e, 'hspace');
|
||||
f.width.value = ed.dom.getAttrib(e, 'width');
|
||||
f.height.value = ed.dom.getAttrib(e, 'height');
|
||||
f.insert.value = ed.getLang('update');
|
||||
this.styleVal = ed.dom.getAttrib(e, 'style');
|
||||
selectByValue(f, 'image_list', f.src.value);
|
||||
selectByValue(f, 'align', this.getAttrib(e, 'align'));
|
||||
this.updateStyle();
|
||||
}
|
||||
},
|
||||
|
||||
fillFileList : function(id, l) {
|
||||
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
|
||||
|
||||
l = window[l];
|
||||
|
||||
if (l && l.length > 0) {
|
||||
lst.options[lst.options.length] = new Option('', '');
|
||||
|
||||
tinymce.each(l, function(o) {
|
||||
lst.options[lst.options.length] = new Option(o[0], o[1]);
|
||||
});
|
||||
} else
|
||||
dom.remove(dom.getParent(id, 'tr'));
|
||||
},
|
||||
|
||||
update : function() {
|
||||
var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, args = {}, el;
|
||||
|
||||
tinyMCEPopup.restoreSelection();
|
||||
|
||||
if (f.src.value === '') {
|
||||
if (ed.selection.getNode().nodeName == 'IMG') {
|
||||
ed.dom.remove(ed.selection.getNode());
|
||||
ed.execCommand('mceRepaint');
|
||||
}
|
||||
|
||||
tinyMCEPopup.close();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ed.settings.inline_styles) {
|
||||
args = tinymce.extend(args, {
|
||||
vspace : nl.vspace.value,
|
||||
hspace : nl.hspace.value,
|
||||
border : nl.border.value,
|
||||
align : getSelectValue(f, 'align')
|
||||
});
|
||||
} else
|
||||
args.style = this.styleVal;
|
||||
|
||||
tinymce.extend(args, {
|
||||
src : f.src.value.replace(/ /g, '%20'),
|
||||
alt : f.alt.value,
|
||||
width : f.width.value,
|
||||
height : f.height.value
|
||||
});
|
||||
|
||||
el = ed.selection.getNode();
|
||||
|
||||
if (el && el.nodeName == 'IMG') {
|
||||
ed.dom.setAttribs(el, args);
|
||||
tinyMCEPopup.editor.execCommand('mceRepaint');
|
||||
tinyMCEPopup.editor.focus();
|
||||
} else {
|
||||
ed.execCommand('mceInsertContent', false, '<img id="__mce_tmp" />', {skip_undo : 1});
|
||||
ed.dom.setAttribs('__mce_tmp', args);
|
||||
ed.dom.setAttrib('__mce_tmp', 'id', '');
|
||||
ed.undoManager.add();
|
||||
}
|
||||
|
||||
tinyMCEPopup.close();
|
||||
},
|
||||
|
||||
updateStyle : function() {
|
||||
var dom = tinyMCEPopup.dom, st, v, f = document.forms[0];
|
||||
|
||||
if (tinyMCEPopup.editor.settings.inline_styles) {
|
||||
st = tinyMCEPopup.dom.parseStyle(this.styleVal);
|
||||
|
||||
// Handle align
|
||||
v = getSelectValue(f, 'align');
|
||||
if (v) {
|
||||
if (v == 'left' || v == 'right') {
|
||||
st['float'] = v;
|
||||
delete st['vertical-align'];
|
||||
} else {
|
||||
st['vertical-align'] = v;
|
||||
delete st['float'];
|
||||
}
|
||||
} else {
|
||||
delete st['float'];
|
||||
delete st['vertical-align'];
|
||||
}
|
||||
|
||||
// Handle border
|
||||
v = f.border.value;
|
||||
if (v || v == '0') {
|
||||
if (v == '0')
|
||||
st['border'] = '0';
|
||||
else
|
||||
st['border'] = v + 'px solid black';
|
||||
} else
|
||||
delete st['border'];
|
||||
|
||||
// Handle hspace
|
||||
v = f.hspace.value;
|
||||
if (v) {
|
||||
delete st['margin'];
|
||||
st['margin-left'] = v + 'px';
|
||||
st['margin-right'] = v + 'px';
|
||||
} else {
|
||||
delete st['margin-left'];
|
||||
delete st['margin-right'];
|
||||
}
|
||||
|
||||
// Handle vspace
|
||||
v = f.vspace.value;
|
||||
if (v) {
|
||||
delete st['margin'];
|
||||
st['margin-top'] = v + 'px';
|
||||
st['margin-bottom'] = v + 'px';
|
||||
} else {
|
||||
delete st['margin-top'];
|
||||
delete st['margin-bottom'];
|
||||
}
|
||||
|
||||
// Merge
|
||||
st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st), 'img');
|
||||
this.styleVal = dom.serializeStyle(st, 'img');
|
||||
}
|
||||
},
|
||||
|
||||
getAttrib : function(e, at) {
|
||||
var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2;
|
||||
|
||||
if (ed.settings.inline_styles) {
|
||||
switch (at) {
|
||||
case 'align':
|
||||
if (v = dom.getStyle(e, 'float'))
|
||||
return v;
|
||||
|
||||
if (v = dom.getStyle(e, 'vertical-align'))
|
||||
return v;
|
||||
|
||||
break;
|
||||
|
||||
case 'hspace':
|
||||
v = dom.getStyle(e, 'margin-left')
|
||||
v2 = dom.getStyle(e, 'margin-right');
|
||||
if (v && v == v2)
|
||||
return parseInt(v.replace(/[^0-9]/g, ''));
|
||||
|
||||
break;
|
||||
|
||||
case 'vspace':
|
||||
v = dom.getStyle(e, 'margin-top')
|
||||
v2 = dom.getStyle(e, 'margin-bottom');
|
||||
if (v && v == v2)
|
||||
return parseInt(v.replace(/[^0-9]/g, ''));
|
||||
|
||||
break;
|
||||
|
||||
case 'border':
|
||||
v = 0;
|
||||
|
||||
tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) {
|
||||
sv = dom.getStyle(e, 'border-' + sv + '-width');
|
||||
|
||||
// False or not the same as prev
|
||||
if (!sv || (sv != v && v !== 0)) {
|
||||
v = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (sv)
|
||||
v = sv;
|
||||
});
|
||||
|
||||
if (v)
|
||||
return parseInt(v.replace(/[^0-9]/g, ''));
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (v = dom.getAttrib(e, at))
|
||||
return v;
|
||||
|
||||
return '';
|
||||
},
|
||||
|
||||
resetImageData : function() {
|
||||
var f = document.forms[0];
|
||||
|
||||
f.width.value = f.height.value = "";
|
||||
},
|
||||
|
||||
updateImageData : function() {
|
||||
var f = document.forms[0], t = ImageDialog;
|
||||
|
||||
if (f.width.value == "")
|
||||
f.width.value = t.preloadImg.width;
|
||||
|
||||
if (f.height.value == "")
|
||||
f.height.value = t.preloadImg.height;
|
||||
},
|
||||
|
||||
getImageData : function() {
|
||||
var f = document.forms[0];
|
||||
|
||||
this.preloadImg = new Image();
|
||||
this.preloadImg.onload = this.updateImageData;
|
||||
this.preloadImg.onerror = this.resetImageData;
|
||||
this.preloadImg.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.src.value);
|
||||
}
|
||||
};
|
||||
|
||||
ImageDialog.preInit();
|
||||
tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog);
|
||||
|
||||
@@ -1,153 +1,153 @@
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var LinkDialog = {
|
||||
preInit : function() {
|
||||
var url;
|
||||
|
||||
if (url = tinyMCEPopup.getParam("external_link_list_url"))
|
||||
document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
|
||||
},
|
||||
|
||||
init : function() {
|
||||
var f = document.forms[0], ed = tinyMCEPopup.editor;
|
||||
|
||||
// Setup browse button
|
||||
document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser', 'href', 'file', 'theme_advanced_link');
|
||||
if (isVisible('hrefbrowser'))
|
||||
document.getElementById('href').style.width = '180px';
|
||||
|
||||
this.fillClassList('class_list');
|
||||
this.fillFileList('link_list', 'tinyMCELinkList');
|
||||
this.fillTargetList('target_list');
|
||||
|
||||
if (e = ed.dom.getParent(ed.selection.getNode(), 'A')) {
|
||||
f.href.value = ed.dom.getAttrib(e, 'href');
|
||||
f.linktitle.value = ed.dom.getAttrib(e, 'title');
|
||||
f.insert.value = ed.getLang('update');
|
||||
selectByValue(f, 'link_list', f.href.value);
|
||||
selectByValue(f, 'target_list', ed.dom.getAttrib(e, 'target'));
|
||||
selectByValue(f, 'class_list', ed.dom.getAttrib(e, 'class'));
|
||||
}
|
||||
},
|
||||
|
||||
update : function() {
|
||||
var f = document.forms[0], ed = tinyMCEPopup.editor, e, b, href = f.href.value.replace(/ /g, '%20');
|
||||
|
||||
tinyMCEPopup.restoreSelection();
|
||||
e = ed.dom.getParent(ed.selection.getNode(), 'A');
|
||||
|
||||
// Remove element if there is no href
|
||||
if (!f.href.value) {
|
||||
if (e) {
|
||||
b = ed.selection.getBookmark();
|
||||
ed.dom.remove(e, 1);
|
||||
ed.selection.moveToBookmark(b);
|
||||
tinyMCEPopup.execCommand("mceEndUndoLevel");
|
||||
tinyMCEPopup.close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Create new anchor elements
|
||||
if (e == null) {
|
||||
ed.getDoc().execCommand("unlink", false, null);
|
||||
tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1});
|
||||
|
||||
tinymce.each(ed.dom.select("a"), function(n) {
|
||||
if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') {
|
||||
e = n;
|
||||
|
||||
ed.dom.setAttribs(e, {
|
||||
href : href,
|
||||
title : f.linktitle.value,
|
||||
target : f.target_list ? getSelectValue(f, "target_list") : null,
|
||||
'class' : f.class_list ? getSelectValue(f, "class_list") : null
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ed.dom.setAttribs(e, {
|
||||
href : href,
|
||||
title : f.linktitle.value,
|
||||
target : f.target_list ? getSelectValue(f, "target_list") : null,
|
||||
'class' : f.class_list ? getSelectValue(f, "class_list") : null
|
||||
});
|
||||
}
|
||||
|
||||
// Don't move caret if selection was image
|
||||
if (e.childNodes.length != 1 || e.firstChild.nodeName != 'IMG') {
|
||||
ed.focus();
|
||||
ed.selection.select(e);
|
||||
ed.selection.collapse(0);
|
||||
tinyMCEPopup.storeSelection();
|
||||
}
|
||||
|
||||
tinyMCEPopup.execCommand("mceEndUndoLevel");
|
||||
tinyMCEPopup.close();
|
||||
},
|
||||
|
||||
checkPrefix : function(n) {
|
||||
if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_email')))
|
||||
n.value = 'mailto:' + n.value;
|
||||
|
||||
if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external')))
|
||||
n.value = 'http://' + n.value;
|
||||
},
|
||||
|
||||
fillFileList : function(id, l) {
|
||||
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
|
||||
|
||||
l = window[l];
|
||||
|
||||
if (l && l.length > 0) {
|
||||
lst.options[lst.options.length] = new Option('', '');
|
||||
|
||||
tinymce.each(l, function(o) {
|
||||
lst.options[lst.options.length] = new Option(o[0], o[1]);
|
||||
});
|
||||
} else
|
||||
dom.remove(dom.getParent(id, 'tr'));
|
||||
},
|
||||
|
||||
fillClassList : function(id) {
|
||||
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
|
||||
|
||||
if (v = tinyMCEPopup.getParam('theme_advanced_styles')) {
|
||||
cl = [];
|
||||
|
||||
tinymce.each(v.split(';'), function(v) {
|
||||
var p = v.split('=');
|
||||
|
||||
cl.push({'title' : p[0], 'class' : p[1]});
|
||||
});
|
||||
} else
|
||||
cl = tinyMCEPopup.editor.dom.getClasses();
|
||||
|
||||
if (cl.length > 0) {
|
||||
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
|
||||
|
||||
tinymce.each(cl, function(o) {
|
||||
lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']);
|
||||
});
|
||||
} else
|
||||
dom.remove(dom.getParent(id, 'tr'));
|
||||
},
|
||||
|
||||
fillTargetList : function(id) {
|
||||
var dom = tinyMCEPopup.dom, lst = dom.get(id), v;
|
||||
|
||||
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
|
||||
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_same'), '_self');
|
||||
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_blank'), '_blank');
|
||||
|
||||
if (v = tinyMCEPopup.getParam('theme_advanced_link_targets')) {
|
||||
tinymce.each(v.split(','), function(v) {
|
||||
v = v.split('=');
|
||||
lst.options[lst.options.length] = new Option(v[0], v[1]);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
LinkDialog.preInit();
|
||||
tinyMCEPopup.onInit.add(LinkDialog.init, LinkDialog);
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var LinkDialog = {
|
||||
preInit : function() {
|
||||
var url;
|
||||
|
||||
if (url = tinyMCEPopup.getParam("external_link_list_url"))
|
||||
document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
|
||||
},
|
||||
|
||||
init : function() {
|
||||
var f = document.forms[0], ed = tinyMCEPopup.editor;
|
||||
|
||||
// Setup browse button
|
||||
document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser', 'href', 'file', 'theme_advanced_link');
|
||||
if (isVisible('hrefbrowser'))
|
||||
document.getElementById('href').style.width = '180px';
|
||||
|
||||
this.fillClassList('class_list');
|
||||
this.fillFileList('link_list', 'tinyMCELinkList');
|
||||
this.fillTargetList('target_list');
|
||||
|
||||
if (e = ed.dom.getParent(ed.selection.getNode(), 'A')) {
|
||||
f.href.value = ed.dom.getAttrib(e, 'href');
|
||||
f.linktitle.value = ed.dom.getAttrib(e, 'title');
|
||||
f.insert.value = ed.getLang('update');
|
||||
selectByValue(f, 'link_list', f.href.value);
|
||||
selectByValue(f, 'target_list', ed.dom.getAttrib(e, 'target'));
|
||||
selectByValue(f, 'class_list', ed.dom.getAttrib(e, 'class'));
|
||||
}
|
||||
},
|
||||
|
||||
update : function() {
|
||||
var f = document.forms[0], ed = tinyMCEPopup.editor, e, b, href = f.href.value.replace(/ /g, '%20');
|
||||
|
||||
tinyMCEPopup.restoreSelection();
|
||||
e = ed.dom.getParent(ed.selection.getNode(), 'A');
|
||||
|
||||
// Remove element if there is no href
|
||||
if (!f.href.value) {
|
||||
if (e) {
|
||||
b = ed.selection.getBookmark();
|
||||
ed.dom.remove(e, 1);
|
||||
ed.selection.moveToBookmark(b);
|
||||
tinyMCEPopup.execCommand("mceEndUndoLevel");
|
||||
tinyMCEPopup.close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Create new anchor elements
|
||||
if (e == null) {
|
||||
ed.getDoc().execCommand("unlink", false, null);
|
||||
tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1});
|
||||
|
||||
tinymce.each(ed.dom.select("a"), function(n) {
|
||||
if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') {
|
||||
e = n;
|
||||
|
||||
ed.dom.setAttribs(e, {
|
||||
href : href,
|
||||
title : f.linktitle.value,
|
||||
target : f.target_list ? getSelectValue(f, "target_list") : null,
|
||||
'class' : f.class_list ? getSelectValue(f, "class_list") : null
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ed.dom.setAttribs(e, {
|
||||
href : href,
|
||||
title : f.linktitle.value,
|
||||
target : f.target_list ? getSelectValue(f, "target_list") : null,
|
||||
'class' : f.class_list ? getSelectValue(f, "class_list") : null
|
||||
});
|
||||
}
|
||||
|
||||
// Don't move caret if selection was image
|
||||
if (e.childNodes.length != 1 || e.firstChild.nodeName != 'IMG') {
|
||||
ed.focus();
|
||||
ed.selection.select(e);
|
||||
ed.selection.collapse(0);
|
||||
tinyMCEPopup.storeSelection();
|
||||
}
|
||||
|
||||
tinyMCEPopup.execCommand("mceEndUndoLevel");
|
||||
tinyMCEPopup.close();
|
||||
},
|
||||
|
||||
checkPrefix : function(n) {
|
||||
if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_email')))
|
||||
n.value = 'mailto:' + n.value;
|
||||
|
||||
if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external')))
|
||||
n.value = 'http://' + n.value;
|
||||
},
|
||||
|
||||
fillFileList : function(id, l) {
|
||||
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
|
||||
|
||||
l = window[l];
|
||||
|
||||
if (l && l.length > 0) {
|
||||
lst.options[lst.options.length] = new Option('', '');
|
||||
|
||||
tinymce.each(l, function(o) {
|
||||
lst.options[lst.options.length] = new Option(o[0], o[1]);
|
||||
});
|
||||
} else
|
||||
dom.remove(dom.getParent(id, 'tr'));
|
||||
},
|
||||
|
||||
fillClassList : function(id) {
|
||||
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
|
||||
|
||||
if (v = tinyMCEPopup.getParam('theme_advanced_styles')) {
|
||||
cl = [];
|
||||
|
||||
tinymce.each(v.split(';'), function(v) {
|
||||
var p = v.split('=');
|
||||
|
||||
cl.push({'title' : p[0], 'class' : p[1]});
|
||||
});
|
||||
} else
|
||||
cl = tinyMCEPopup.editor.dom.getClasses();
|
||||
|
||||
if (cl.length > 0) {
|
||||
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
|
||||
|
||||
tinymce.each(cl, function(o) {
|
||||
lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']);
|
||||
});
|
||||
} else
|
||||
dom.remove(dom.getParent(id, 'tr'));
|
||||
},
|
||||
|
||||
fillTargetList : function(id) {
|
||||
var dom = tinyMCEPopup.dom, lst = dom.get(id), v;
|
||||
|
||||
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
|
||||
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_same'), '_self');
|
||||
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_blank'), '_blank');
|
||||
|
||||
if (v = tinyMCEPopup.getParam('theme_advanced_link_targets')) {
|
||||
tinymce.each(v.split(','), function(v) {
|
||||
v = v.split('=');
|
||||
lst.options[lst.options.length] = new Option(v[0], v[1]);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
LinkDialog.preInit();
|
||||
tinyMCEPopup.onInit.add(LinkDialog.init, LinkDialog);
|
||||
|
||||
@@ -1,56 +1,56 @@
|
||||
tinyMCEPopup.requireLangPack();
|
||||
tinyMCEPopup.onInit.add(onLoadInit);
|
||||
|
||||
function saveContent() {
|
||||
tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value, {source_view : true});
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
|
||||
function onLoadInit() {
|
||||
tinyMCEPopup.resizeToInnerSize();
|
||||
|
||||
// Remove Gecko spellchecking
|
||||
if (tinymce.isGecko)
|
||||
document.body.spellcheck = tinyMCEPopup.editor.getParam("gecko_spellcheck");
|
||||
|
||||
document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent({source_view : true});
|
||||
|
||||
if (tinyMCEPopup.editor.getParam("theme_advanced_source_editor_wrap", true)) {
|
||||
setWrap('soft');
|
||||
document.getElementById('wraped').checked = true;
|
||||
}
|
||||
|
||||
resizeInputs();
|
||||
}
|
||||
|
||||
function setWrap(val) {
|
||||
var v, n, s = document.getElementById('htmlSource');
|
||||
|
||||
s.wrap = val;
|
||||
|
||||
if (!tinymce.isIE) {
|
||||
v = s.value;
|
||||
n = s.cloneNode(false);
|
||||
n.setAttribute("wrap", val);
|
||||
s.parentNode.replaceChild(n, s);
|
||||
n.value = v;
|
||||
}
|
||||
}
|
||||
|
||||
function toggleWordWrap(elm) {
|
||||
if (elm.checked)
|
||||
setWrap('soft');
|
||||
else
|
||||
setWrap('off');
|
||||
}
|
||||
|
||||
function resizeInputs() {
|
||||
var vp = tinyMCEPopup.dom.getViewPort(window), el;
|
||||
|
||||
el = document.getElementById('htmlSource');
|
||||
|
||||
if (el) {
|
||||
el.style.width = (vp.w - 20) + 'px';
|
||||
el.style.height = (vp.h - 65) + 'px';
|
||||
}
|
||||
}
|
||||
tinyMCEPopup.requireLangPack();
|
||||
tinyMCEPopup.onInit.add(onLoadInit);
|
||||
|
||||
function saveContent() {
|
||||
tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value, {source_view : true});
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
|
||||
function onLoadInit() {
|
||||
tinyMCEPopup.resizeToInnerSize();
|
||||
|
||||
// Remove Gecko spellchecking
|
||||
if (tinymce.isGecko)
|
||||
document.body.spellcheck = tinyMCEPopup.editor.getParam("gecko_spellcheck");
|
||||
|
||||
document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent({source_view : true});
|
||||
|
||||
if (tinyMCEPopup.editor.getParam("theme_advanced_source_editor_wrap", true)) {
|
||||
setWrap('soft');
|
||||
document.getElementById('wraped').checked = true;
|
||||
}
|
||||
|
||||
resizeInputs();
|
||||
}
|
||||
|
||||
function setWrap(val) {
|
||||
var v, n, s = document.getElementById('htmlSource');
|
||||
|
||||
s.wrap = val;
|
||||
|
||||
if (!tinymce.isIE) {
|
||||
v = s.value;
|
||||
n = s.cloneNode(false);
|
||||
n.setAttribute("wrap", val);
|
||||
s.parentNode.replaceChild(n, s);
|
||||
n.value = v;
|
||||
}
|
||||
}
|
||||
|
||||
function toggleWordWrap(elm) {
|
||||
if (elm.checked)
|
||||
setWrap('soft');
|
||||
else
|
||||
setWrap('off');
|
||||
}
|
||||
|
||||
function resizeInputs() {
|
||||
var vp = tinyMCEPopup.dom.getViewPort(window), el;
|
||||
|
||||
el = document.getElementById('htmlSource');
|
||||
|
||||
if (el) {
|
||||
el.style.width = (vp.w - 20) + 'px';
|
||||
el.style.height = (vp.h - 65) + 'px';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,68 +1,68 @@
|
||||
tinyMCE.addI18n('en.advanced',{
|
||||
style_select:"Styles",
|
||||
font_size:"Font size",
|
||||
fontdefault:"Font family",
|
||||
block:"Format",
|
||||
paragraph:"Paragraph",
|
||||
div:"Div",
|
||||
address:"Address",
|
||||
pre:"Preformatted",
|
||||
h1:"Heading 1",
|
||||
h2:"Heading 2",
|
||||
h3:"Heading 3",
|
||||
h4:"Heading 4",
|
||||
h5:"Heading 5",
|
||||
h6:"Heading 6",
|
||||
blockquote:"Blockquote",
|
||||
code:"Code",
|
||||
samp:"Code sample",
|
||||
dt:"Definition term ",
|
||||
dd:"Definition description",
|
||||
bold_desc:"Bold (Ctrl+B)",
|
||||
italic_desc:"Italic (Ctrl+I)",
|
||||
underline_desc:"Underline (Ctrl+U)",
|
||||
striketrough_desc:"Strikethrough",
|
||||
justifyleft_desc:"Align left",
|
||||
justifycenter_desc:"Align center",
|
||||
justifyright_desc:"Align right",
|
||||
justifyfull_desc:"Align full",
|
||||
bullist_desc:"Unordered list",
|
||||
numlist_desc:"Ordered list",
|
||||
outdent_desc:"Outdent",
|
||||
indent_desc:"Indent",
|
||||
undo_desc:"Undo (Ctrl+Z)",
|
||||
redo_desc:"Redo (Ctrl+Y)",
|
||||
link_desc:"Insert/edit link",
|
||||
unlink_desc:"Unlink",
|
||||
image_desc:"Insert/edit image",
|
||||
cleanup_desc:"Cleanup messy code",
|
||||
code_desc:"Edit HTML Source",
|
||||
sub_desc:"Subscript",
|
||||
sup_desc:"Superscript",
|
||||
hr_desc:"Insert horizontal ruler",
|
||||
removeformat_desc:"Remove formatting",
|
||||
custom1_desc:"Your custom description here",
|
||||
forecolor_desc:"Select text color",
|
||||
backcolor_desc:"Select background color",
|
||||
charmap_desc:"Insert custom character",
|
||||
visualaid_desc:"Toggle guidelines/invisible elements",
|
||||
anchor_desc:"Insert/edit anchor",
|
||||
cut_desc:"Cut",
|
||||
copy_desc:"Copy",
|
||||
paste_desc:"Paste",
|
||||
image_props_desc:"Image properties",
|
||||
newdocument_desc:"New document",
|
||||
help_desc:"Help",
|
||||
blockquote_desc:"Blockquote",
|
||||
clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\r\nDo you want more information about this issue?",
|
||||
path:"Path",
|
||||
newdocument:"Are you sure you want clear all contents?",
|
||||
toolbar_focus:"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",
|
||||
more_colors:"More colors",
|
||||
|
||||
// Accessibility Strings
|
||||
shortcuts_desc:'Accessibility Help',
|
||||
help_shortcut:'. Press ALT F10 for toolbar. Press ALT 0 for help.',
|
||||
rich_text_area:"Rich Text Area",
|
||||
toolbar:"Toolbar"
|
||||
});
|
||||
tinyMCE.addI18n('en.advanced',{
|
||||
style_select:"Styles",
|
||||
font_size:"Font size",
|
||||
fontdefault:"Font family",
|
||||
block:"Format",
|
||||
paragraph:"Paragraph",
|
||||
div:"Div",
|
||||
address:"Address",
|
||||
pre:"Preformatted",
|
||||
h1:"Heading 1",
|
||||
h2:"Heading 2",
|
||||
h3:"Heading 3",
|
||||
h4:"Heading 4",
|
||||
h5:"Heading 5",
|
||||
h6:"Heading 6",
|
||||
blockquote:"Blockquote",
|
||||
code:"Code",
|
||||
samp:"Code sample",
|
||||
dt:"Definition term ",
|
||||
dd:"Definition description",
|
||||
bold_desc:"Bold (Ctrl+B)",
|
||||
italic_desc:"Italic (Ctrl+I)",
|
||||
underline_desc:"Underline (Ctrl+U)",
|
||||
striketrough_desc:"Strikethrough",
|
||||
justifyleft_desc:"Align left",
|
||||
justifycenter_desc:"Align center",
|
||||
justifyright_desc:"Align right",
|
||||
justifyfull_desc:"Align full",
|
||||
bullist_desc:"Unordered list",
|
||||
numlist_desc:"Ordered list",
|
||||
outdent_desc:"Outdent",
|
||||
indent_desc:"Indent",
|
||||
undo_desc:"Undo (Ctrl+Z)",
|
||||
redo_desc:"Redo (Ctrl+Y)",
|
||||
link_desc:"Insert/edit link",
|
||||
unlink_desc:"Unlink",
|
||||
image_desc:"Insert/edit image",
|
||||
cleanup_desc:"Cleanup messy code",
|
||||
code_desc:"Edit HTML Source",
|
||||
sub_desc:"Subscript",
|
||||
sup_desc:"Superscript",
|
||||
hr_desc:"Insert horizontal ruler",
|
||||
removeformat_desc:"Remove formatting",
|
||||
custom1_desc:"Your custom description here",
|
||||
forecolor_desc:"Select text color",
|
||||
backcolor_desc:"Select background color",
|
||||
charmap_desc:"Insert custom character",
|
||||
visualaid_desc:"Toggle guidelines/invisible elements",
|
||||
anchor_desc:"Insert/edit anchor",
|
||||
cut_desc:"Cut",
|
||||
copy_desc:"Copy",
|
||||
paste_desc:"Paste",
|
||||
image_props_desc:"Image properties",
|
||||
newdocument_desc:"New document",
|
||||
help_desc:"Help",
|
||||
blockquote_desc:"Blockquote",
|
||||
clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\r\nDo you want more information about this issue?",
|
||||
path:"Path",
|
||||
newdocument:"Are you sure you want clear all contents?",
|
||||
toolbar_focus:"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",
|
||||
more_colors:"More colors",
|
||||
|
||||
// Accessibility Strings
|
||||
shortcuts_desc:'Accessibility Help',
|
||||
help_shortcut:'. Press ALT F10 for toolbar. Press ALT 0 for help.',
|
||||
rich_text_area:"Rich Text Area",
|
||||
toolbar:"Toolbar"
|
||||
});
|
||||
|
||||
@@ -1,54 +1,54 @@
|
||||
tinyMCE.addI18n('en.advanced_dlg',{
|
||||
about_title:"About TinyMCE",
|
||||
about_general:"About",
|
||||
about_help:"Help",
|
||||
about_license:"License",
|
||||
about_plugins:"Plugins",
|
||||
about_plugin:"Plugin",
|
||||
about_author:"Author",
|
||||
about_version:"Version",
|
||||
about_loaded:"Loaded plugins",
|
||||
anchor_title:"Insert/edit anchor",
|
||||
anchor_name:"Anchor name",
|
||||
anchor_invalid:"Please specify a valid anchor name.",
|
||||
code_title:"HTML Source Editor",
|
||||
code_wordwrap:"Word wrap",
|
||||
colorpicker_title:"Select a color",
|
||||
colorpicker_picker_tab:"Picker",
|
||||
colorpicker_picker_title:"Color picker",
|
||||
colorpicker_palette_tab:"Palette",
|
||||
colorpicker_palette_title:"Palette colors",
|
||||
colorpicker_named_tab:"Named",
|
||||
colorpicker_named_title:"Named colors",
|
||||
colorpicker_color:"Color:",
|
||||
colorpicker_name:"Name:",
|
||||
charmap_title:"Select custom character",
|
||||
image_title:"Insert/edit image",
|
||||
image_src:"Image URL",
|
||||
image_alt:"Image description",
|
||||
image_list:"Image list",
|
||||
image_border:"Border",
|
||||
image_dimensions:"Dimensions",
|
||||
image_vspace:"Vertical space",
|
||||
image_hspace:"Horizontal space",
|
||||
image_align:"Alignment",
|
||||
image_align_baseline:"Baseline",
|
||||
image_align_top:"Top",
|
||||
image_align_middle:"Middle",
|
||||
image_align_bottom:"Bottom",
|
||||
image_align_texttop:"Text top",
|
||||
image_align_textbottom:"Text bottom",
|
||||
image_align_left:"Left",
|
||||
image_align_right:"Right",
|
||||
link_title:"Insert/edit link",
|
||||
link_url:"Link URL",
|
||||
link_target:"Target",
|
||||
link_target_same:"Open link in the same window",
|
||||
link_target_blank:"Open link in a new window",
|
||||
link_titlefield:"Title",
|
||||
link_is_email:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",
|
||||
link_is_external:"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",
|
||||
link_list:"Link list",
|
||||
accessibility_help:"Accessibility Help",
|
||||
accessibility_usage_title:"General Usage"
|
||||
tinyMCE.addI18n('en.advanced_dlg',{
|
||||
about_title:"About TinyMCE",
|
||||
about_general:"About",
|
||||
about_help:"Help",
|
||||
about_license:"License",
|
||||
about_plugins:"Plugins",
|
||||
about_plugin:"Plugin",
|
||||
about_author:"Author",
|
||||
about_version:"Version",
|
||||
about_loaded:"Loaded plugins",
|
||||
anchor_title:"Insert/edit anchor",
|
||||
anchor_name:"Anchor name",
|
||||
anchor_invalid:"Please specify a valid anchor name.",
|
||||
code_title:"HTML Source Editor",
|
||||
code_wordwrap:"Word wrap",
|
||||
colorpicker_title:"Select a color",
|
||||
colorpicker_picker_tab:"Picker",
|
||||
colorpicker_picker_title:"Color picker",
|
||||
colorpicker_palette_tab:"Palette",
|
||||
colorpicker_palette_title:"Palette colors",
|
||||
colorpicker_named_tab:"Named",
|
||||
colorpicker_named_title:"Named colors",
|
||||
colorpicker_color:"Color:",
|
||||
colorpicker_name:"Name:",
|
||||
charmap_title:"Select custom character",
|
||||
image_title:"Insert/edit image",
|
||||
image_src:"Image URL",
|
||||
image_alt:"Image description",
|
||||
image_list:"Image list",
|
||||
image_border:"Border",
|
||||
image_dimensions:"Dimensions",
|
||||
image_vspace:"Vertical space",
|
||||
image_hspace:"Horizontal space",
|
||||
image_align:"Alignment",
|
||||
image_align_baseline:"Baseline",
|
||||
image_align_top:"Top",
|
||||
image_align_middle:"Middle",
|
||||
image_align_bottom:"Bottom",
|
||||
image_align_texttop:"Text top",
|
||||
image_align_textbottom:"Text bottom",
|
||||
image_align_left:"Left",
|
||||
image_align_right:"Right",
|
||||
link_title:"Insert/edit link",
|
||||
link_url:"Link URL",
|
||||
link_target:"Target",
|
||||
link_target_same:"Open link in the same window",
|
||||
link_target_blank:"Open link in a new window",
|
||||
link_titlefield:"Title",
|
||||
link_is_email:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",
|
||||
link_is_external:"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",
|
||||
link_list:"Link list",
|
||||
accessibility_help:"Accessibility Help",
|
||||
accessibility_usage_title:"General Usage"
|
||||
});
|
||||
@@ -1,57 +1,57 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#advanced_dlg.link_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
||||
<script type="text/javascript" src="../../utils/validate.js"></script>
|
||||
<script type="text/javascript" src="js/link.js"></script>
|
||||
</head>
|
||||
<body id="link" style="display: none">
|
||||
<form onsubmit="LinkDialog.update();return false;" action="#">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.link_title}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div id="general_panel" class="panel current">
|
||||
<table border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td class="nowrap"><label for="href">{#advanced_dlg.link_url}</label></td>
|
||||
<td><table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input id="href" name="href" type="text" class="mceFocus" value="" style="width: 200px" onchange="LinkDialog.checkPrefix(this);" /></td>
|
||||
<td id="hrefbrowsercontainer"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="link_list">{#advanced_dlg.link_list}</label></td>
|
||||
<td><select id="link_list" name="link_list" onchange="document.getElementById('href').value=this.options[this.selectedIndex].value;"></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label id="targetlistlabel" for="targetlist">{#advanced_dlg.link_target}</label></td>
|
||||
<td><select id="target_list" name="target_list"></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="nowrap"><label for="linktitle">{#advanced_dlg.link_titlefield}</label></td>
|
||||
<td><input id="linktitle" name="linktitle" type="text" value="" style="width: 200px" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="class_list">{#class_name}</label></td>
|
||||
<td><select id="class_list" name="class_list"></select></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#advanced_dlg.link_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
||||
<script type="text/javascript" src="../../utils/validate.js"></script>
|
||||
<script type="text/javascript" src="js/link.js"></script>
|
||||
</head>
|
||||
<body id="link" style="display: none">
|
||||
<form onsubmit="LinkDialog.update();return false;" action="#">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.link_title}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div id="general_panel" class="panel current">
|
||||
<table border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td class="nowrap"><label for="href">{#advanced_dlg.link_url}</label></td>
|
||||
<td><table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input id="href" name="href" type="text" class="mceFocus" value="" style="width: 200px" onchange="LinkDialog.checkPrefix(this);" /></td>
|
||||
<td id="hrefbrowsercontainer"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="link_list">{#advanced_dlg.link_list}</label></td>
|
||||
<td><select id="link_list" name="link_list" onchange="document.getElementById('href').value=this.options[this.selectedIndex].value;"></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label id="targetlistlabel" for="targetlist">{#advanced_dlg.link_target}</label></td>
|
||||
<td><select id="target_list" name="target_list"></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="nowrap"><label for="linktitle">{#advanced_dlg.link_titlefield}</label></td>
|
||||
<td><input id="linktitle" name="linktitle" type="text" value="" style="width: 200px" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="class_list">{#class_name}</label></td>
|
||||
<td><select id="class_list" name="class_list"></select></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,47 +1,47 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#advanced_dlg.accessibility_help}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript">tinyMCEPopup.requireLangPack();</script>
|
||||
</head>
|
||||
<body id="content">
|
||||
<h1>{#advanced_dlg.accessibility_usage_title}</h1>
|
||||
<h2>Toolbars</h2>
|
||||
<p>Press ALT-F10 to move focus to the toolbars. Navigate through the buttons using the arrow keys.
|
||||
Press enter to activate a button and return focus to the editor.
|
||||
Press escape to return focus to the editor without performing any actions.</p>
|
||||
|
||||
<h2>Status Bar</h2>
|
||||
<p>To access the editor status bar, press ALT-F11. Use the left and right arrow keys to navigate between elements in the path.
|
||||
Press enter or space to select an element. Press escape to return focus to the editor without changing the selection.</p>
|
||||
|
||||
<h2>Context Menu</h2>
|
||||
<p>Press shift-F10 to activate the context menu. Use the up and down arrow keys to move between menu items. To open sub-menus press the right arrow key.
|
||||
To close submenus press the left arrow key. Press escape to close the context menu.</p>
|
||||
|
||||
<h1>Keyboard Shortcuts</h1>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Keystroke</th>
|
||||
<th>Function</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Control-B</td><td>Bold</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Control-I</td><td>Italic</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Control-Z</td><td>Undo</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Control-Y</td><td>Redo</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#advanced_dlg.accessibility_help}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript">tinyMCEPopup.requireLangPack();</script>
|
||||
</head>
|
||||
<body id="content">
|
||||
<h1>{#advanced_dlg.accessibility_usage_title}</h1>
|
||||
<h2>Toolbars</h2>
|
||||
<p>Press ALT-F10 to move focus to the toolbars. Navigate through the buttons using the arrow keys.
|
||||
Press enter to activate a button and return focus to the editor.
|
||||
Press escape to return focus to the editor without performing any actions.</p>
|
||||
|
||||
<h2>Status Bar</h2>
|
||||
<p>To access the editor status bar, press ALT-F11. Use the left and right arrow keys to navigate between elements in the path.
|
||||
Press enter or space to select an element. Press escape to return focus to the editor without changing the selection.</p>
|
||||
|
||||
<h2>Context Menu</h2>
|
||||
<p>Press shift-F10 to activate the context menu. Use the up and down arrow keys to move between menu items. To open sub-menus press the right arrow key.
|
||||
To close submenus press the left arrow key. Press escape to close the context menu.</p>
|
||||
|
||||
<h1>Keyboard Shortcuts</h1>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Keystroke</th>
|
||||
<th>Function</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Control-B</td><td>Bold</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Control-I</td><td>Italic</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Control-Z</td><td>Undo</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Control-Y</td><td>Redo</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,47 +1,47 @@
|
||||
body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
|
||||
body {background:#FFF;}
|
||||
body.mceForceColors {background:#FFF; color:#000;}
|
||||
body.mceBrowserDefaults {background:transparent; color:inherit; font-size:inherit; font-family:inherit;}
|
||||
h1 {font-size: 2em}
|
||||
h2 {font-size: 1.5em}
|
||||
h3 {font-size: 1.17em}
|
||||
h4 {font-size: 1em}
|
||||
h5 {font-size: .83em}
|
||||
h6 {font-size: .75em}
|
||||
.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
|
||||
a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(img/items.gif) no-repeat 0 0;}
|
||||
span.mceItemNbsp {background: #DDD}
|
||||
td.mceSelected, th.mceSelected {background-color:#3399ff !important}
|
||||
img {border:0;}
|
||||
table {cursor:default}
|
||||
table td, table th {cursor:text}
|
||||
ins {border-bottom:1px solid green; text-decoration: none; color:green}
|
||||
del {color:red; text-decoration:line-through}
|
||||
cite {border-bottom:1px dashed blue}
|
||||
acronym {border-bottom:1px dotted #CCC; cursor:help}
|
||||
abbr {border-bottom:1px dashed #CCC; cursor:help}
|
||||
|
||||
/* IE */
|
||||
* html body {
|
||||
scrollbar-3dlight-color:#F0F0EE;
|
||||
scrollbar-arrow-color:#676662;
|
||||
scrollbar-base-color:#F0F0EE;
|
||||
scrollbar-darkshadow-color:#DDD;
|
||||
scrollbar-face-color:#E0E0DD;
|
||||
scrollbar-highlight-color:#F0F0EE;
|
||||
scrollbar-shadow-color:#F0F0EE;
|
||||
scrollbar-track-color:#F5F5F5;
|
||||
}
|
||||
|
||||
img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
|
||||
font[face=mceinline] {font-family:inherit !important}
|
||||
|
||||
.mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc}
|
||||
.mceItemShockWave {background-image:url(../../img/shockwave.gif)}
|
||||
.mceItemFlash {background-image:url(../../img/flash.gif)}
|
||||
.mceItemQuickTime {background-image:url(../../img/quicktime.gif)}
|
||||
.mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)}
|
||||
.mceItemRealMedia {background-image:url(../../img/realmedia.gif)}
|
||||
.mceItemVideo {background-image:url(../../img/video.gif)}
|
||||
.mceItemIframe {background-image:url(../../img/iframe.gif)}
|
||||
.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;}
|
||||
body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
|
||||
body {background:#FFF;}
|
||||
body.mceForceColors {background:#FFF; color:#000;}
|
||||
body.mceBrowserDefaults {background:transparent; color:inherit; font-size:inherit; font-family:inherit;}
|
||||
h1 {font-size: 2em}
|
||||
h2 {font-size: 1.5em}
|
||||
h3 {font-size: 1.17em}
|
||||
h4 {font-size: 1em}
|
||||
h5 {font-size: .83em}
|
||||
h6 {font-size: .75em}
|
||||
.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
|
||||
a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(img/items.gif) no-repeat 0 0;}
|
||||
span.mceItemNbsp {background: #DDD}
|
||||
td.mceSelected, th.mceSelected {background-color:#3399ff !important}
|
||||
img {border:0;}
|
||||
table {cursor:default}
|
||||
table td, table th {cursor:text}
|
||||
ins {border-bottom:1px solid green; text-decoration: none; color:green}
|
||||
del {color:red; text-decoration:line-through}
|
||||
cite {border-bottom:1px dashed blue}
|
||||
acronym {border-bottom:1px dotted #CCC; cursor:help}
|
||||
abbr {border-bottom:1px dashed #CCC; cursor:help}
|
||||
|
||||
/* IE */
|
||||
* html body {
|
||||
scrollbar-3dlight-color:#F0F0EE;
|
||||
scrollbar-arrow-color:#676662;
|
||||
scrollbar-base-color:#F0F0EE;
|
||||
scrollbar-darkshadow-color:#DDD;
|
||||
scrollbar-face-color:#E0E0DD;
|
||||
scrollbar-highlight-color:#F0F0EE;
|
||||
scrollbar-shadow-color:#F0F0EE;
|
||||
scrollbar-track-color:#F5F5F5;
|
||||
}
|
||||
|
||||
img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
|
||||
font[face=mceinline] {font-family:inherit !important}
|
||||
|
||||
.mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc}
|
||||
.mceItemShockWave {background-image:url(../../img/shockwave.gif)}
|
||||
.mceItemFlash {background-image:url(../../img/flash.gif)}
|
||||
.mceItemQuickTime {background-image:url(../../img/quicktime.gif)}
|
||||
.mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)}
|
||||
.mceItemRealMedia {background-image:url(../../img/realmedia.gif)}
|
||||
.mceItemVideo {background-image:url(../../img/video.gif)}
|
||||
.mceItemIframe {background-image:url(../../img/iframe.gif)}
|
||||
.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;}
|
||||
|
||||
@@ -1,117 +1,117 @@
|
||||
/* Generic */
|
||||
body {
|
||||
font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
|
||||
scrollbar-3dlight-color:#F0F0EE;
|
||||
scrollbar-arrow-color:#676662;
|
||||
scrollbar-base-color:#F0F0EE;
|
||||
scrollbar-darkshadow-color:#DDDDDD;
|
||||
scrollbar-face-color:#E0E0DD;
|
||||
scrollbar-highlight-color:#F0F0EE;
|
||||
scrollbar-shadow-color:#F0F0EE;
|
||||
scrollbar-track-color:#F5F5F5;
|
||||
background:#F0F0EE;
|
||||
padding:0;
|
||||
margin:8px 8px 0 8px;
|
||||
}
|
||||
|
||||
html {background:#F0F0EE;}
|
||||
td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
||||
textarea {resize:none;outline:none;}
|
||||
a:link, a:visited {color:black;}
|
||||
a:hover {color:#2B6FB6;}
|
||||
.nowrap {white-space: nowrap}
|
||||
|
||||
/* Forms */
|
||||
fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
|
||||
legend {color:#2B6FB6; font-weight:bold;}
|
||||
label.msg {display:none;}
|
||||
label.invalid {color:#EE0000; display:inline;}
|
||||
input.invalid {border:1px solid #EE0000;}
|
||||
input {background:#FFF; border:1px solid #CCC;}
|
||||
input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
||||
input, select, textarea {border:1px solid #808080;}
|
||||
input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
|
||||
input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
|
||||
.input_noborder {border:0;}
|
||||
|
||||
/* Buttons */
|
||||
#insert, #cancel, input.button, .updateButton {
|
||||
border:0; margin:0; padding:0;
|
||||
font-weight:bold;
|
||||
width:94px; height:26px;
|
||||
background:url(img/buttons.png) 0 -26px;
|
||||
cursor:pointer;
|
||||
padding-bottom:2px;
|
||||
float:left;
|
||||
}
|
||||
|
||||
#insert {background:url(img/buttons.png) 0 -52px}
|
||||
#cancel {background:url(img/buttons.png) 0 0; float:right}
|
||||
|
||||
/* Browse */
|
||||
a.pickcolor, a.browse {text-decoration:none}
|
||||
a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
|
||||
.mceOldBoxModel a.browse span {width:22px; height:20px;}
|
||||
a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
|
||||
a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
||||
a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
|
||||
a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
|
||||
.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
|
||||
a.pickcolor:hover span {background-color:#B2BBD0;}
|
||||
a.pickcolor:hover span.disabled {}
|
||||
|
||||
/* Charmap */
|
||||
table.charmap {border:1px solid #AAA; text-align:center}
|
||||
td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
|
||||
#charmap a {display:block; color:#000; text-decoration:none; border:0}
|
||||
#charmap a:hover {background:#CCC;color:#2B6FB6}
|
||||
#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
|
||||
#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
|
||||
|
||||
/* Source */
|
||||
.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
|
||||
.mceActionPanel {margin-top:5px;}
|
||||
|
||||
/* Tabs classes */
|
||||
.tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;}
|
||||
.tabs ul {margin:0; padding:0; list-style:none;}
|
||||
.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
|
||||
.tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
|
||||
.tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
|
||||
.tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;}
|
||||
.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
|
||||
.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
|
||||
|
||||
/* Panels */
|
||||
.panel_wrapper div.panel {display:none;}
|
||||
.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
|
||||
.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
|
||||
|
||||
/* Columns */
|
||||
.column {float:left;}
|
||||
.properties {width:100%;}
|
||||
.properties .column1 {}
|
||||
.properties .column2 {text-align:left;}
|
||||
|
||||
/* Titles */
|
||||
h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
|
||||
h3 {font-size:14px;}
|
||||
.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
|
||||
|
||||
/* Dialog specific */
|
||||
#link .panel_wrapper, #link div.current {height:125px;}
|
||||
#image .panel_wrapper, #image div.current {height:200px;}
|
||||
#plugintable thead {font-weight:bold; background:#DDD;}
|
||||
#plugintable, #about #plugintable td {border:1px solid #919B9C;}
|
||||
#plugintable {width:96%; margin-top:10px;}
|
||||
#pluginscontainer {height:290px; overflow:auto;}
|
||||
#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;}
|
||||
#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
|
||||
#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
|
||||
#colorpicker #light div {overflow:hidden;}
|
||||
#colorpicker #previewblock {float:right; padding-left:10px; height:20px;}
|
||||
#colorpicker .panel_wrapper div.current {height:175px;}
|
||||
#colorpicker #namedcolors {width:150px;}
|
||||
#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
|
||||
#colorpicker #colornamecontainer {margin-top:5px;}
|
||||
#colorpicker #picker_panel fieldset {margin:auto;width:325px;}
|
||||
/* Generic */
|
||||
body {
|
||||
font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
|
||||
scrollbar-3dlight-color:#F0F0EE;
|
||||
scrollbar-arrow-color:#676662;
|
||||
scrollbar-base-color:#F0F0EE;
|
||||
scrollbar-darkshadow-color:#DDDDDD;
|
||||
scrollbar-face-color:#E0E0DD;
|
||||
scrollbar-highlight-color:#F0F0EE;
|
||||
scrollbar-shadow-color:#F0F0EE;
|
||||
scrollbar-track-color:#F5F5F5;
|
||||
background:#F0F0EE;
|
||||
padding:0;
|
||||
margin:8px 8px 0 8px;
|
||||
}
|
||||
|
||||
html {background:#F0F0EE;}
|
||||
td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
||||
textarea {resize:none;outline:none;}
|
||||
a:link, a:visited {color:black;}
|
||||
a:hover {color:#2B6FB6;}
|
||||
.nowrap {white-space: nowrap}
|
||||
|
||||
/* Forms */
|
||||
fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
|
||||
legend {color:#2B6FB6; font-weight:bold;}
|
||||
label.msg {display:none;}
|
||||
label.invalid {color:#EE0000; display:inline;}
|
||||
input.invalid {border:1px solid #EE0000;}
|
||||
input {background:#FFF; border:1px solid #CCC;}
|
||||
input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
||||
input, select, textarea {border:1px solid #808080;}
|
||||
input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
|
||||
input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
|
||||
.input_noborder {border:0;}
|
||||
|
||||
/* Buttons */
|
||||
#insert, #cancel, input.button, .updateButton {
|
||||
border:0; margin:0; padding:0;
|
||||
font-weight:bold;
|
||||
width:94px; height:26px;
|
||||
background:url(img/buttons.png) 0 -26px;
|
||||
cursor:pointer;
|
||||
padding-bottom:2px;
|
||||
float:left;
|
||||
}
|
||||
|
||||
#insert {background:url(img/buttons.png) 0 -52px}
|
||||
#cancel {background:url(img/buttons.png) 0 0; float:right}
|
||||
|
||||
/* Browse */
|
||||
a.pickcolor, a.browse {text-decoration:none}
|
||||
a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
|
||||
.mceOldBoxModel a.browse span {width:22px; height:20px;}
|
||||
a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
|
||||
a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
||||
a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
|
||||
a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
|
||||
.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
|
||||
a.pickcolor:hover span {background-color:#B2BBD0;}
|
||||
a.pickcolor:hover span.disabled {}
|
||||
|
||||
/* Charmap */
|
||||
table.charmap {border:1px solid #AAA; text-align:center}
|
||||
td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
|
||||
#charmap a {display:block; color:#000; text-decoration:none; border:0}
|
||||
#charmap a:hover {background:#CCC;color:#2B6FB6}
|
||||
#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
|
||||
#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
|
||||
|
||||
/* Source */
|
||||
.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
|
||||
.mceActionPanel {margin-top:5px;}
|
||||
|
||||
/* Tabs classes */
|
||||
.tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;}
|
||||
.tabs ul {margin:0; padding:0; list-style:none;}
|
||||
.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
|
||||
.tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
|
||||
.tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
|
||||
.tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;}
|
||||
.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
|
||||
.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
|
||||
|
||||
/* Panels */
|
||||
.panel_wrapper div.panel {display:none;}
|
||||
.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
|
||||
.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
|
||||
|
||||
/* Columns */
|
||||
.column {float:left;}
|
||||
.properties {width:100%;}
|
||||
.properties .column1 {}
|
||||
.properties .column2 {text-align:left;}
|
||||
|
||||
/* Titles */
|
||||
h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
|
||||
h3 {font-size:14px;}
|
||||
.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
|
||||
|
||||
/* Dialog specific */
|
||||
#link .panel_wrapper, #link div.current {height:125px;}
|
||||
#image .panel_wrapper, #image div.current {height:200px;}
|
||||
#plugintable thead {font-weight:bold; background:#DDD;}
|
||||
#plugintable, #about #plugintable td {border:1px solid #919B9C;}
|
||||
#plugintable {width:96%; margin-top:10px;}
|
||||
#pluginscontainer {height:290px; overflow:auto;}
|
||||
#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;}
|
||||
#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
|
||||
#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
|
||||
#colorpicker #light div {overflow:hidden;}
|
||||
#colorpicker #previewblock {float:right; padding-left:10px; height:20px;}
|
||||
#colorpicker .panel_wrapper div.current {height:175px;}
|
||||
#colorpicker #namedcolors {width:150px;}
|
||||
#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
|
||||
#colorpicker #colornamecontainer {margin-top:5px;}
|
||||
#colorpicker #picker_panel fieldset {margin:auto;width:325px;}
|
||||
|
||||
@@ -1,213 +1,213 @@
|
||||
/* Reset */
|
||||
.defaultSkin table, .defaultSkin tbody, .defaultSkin a, .defaultSkin img, .defaultSkin tr, .defaultSkin div, .defaultSkin td, .defaultSkin iframe, .defaultSkin span, .defaultSkin *, .defaultSkin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left}
|
||||
.defaultSkin a:hover, .defaultSkin a:link, .defaultSkin a:visited, .defaultSkin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000}
|
||||
.defaultSkin table td {vertical-align:middle}
|
||||
|
||||
/* Containers */
|
||||
.defaultSkin table {direction:ltr;background:transparent}
|
||||
.defaultSkin iframe {display:block;}
|
||||
.defaultSkin .mceToolbar {height:26px}
|
||||
.defaultSkin .mceLeft {text-align:left}
|
||||
.defaultSkin .mceRight {text-align:right}
|
||||
|
||||
/* External */
|
||||
.defaultSkin .mceExternalToolbar {position:absolute; border:1px solid #CCC; border-bottom:0; display:none;}
|
||||
.defaultSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
|
||||
.defaultSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0}
|
||||
|
||||
/* Layout */
|
||||
.defaultSkin table.mceLayout {border:0; border-left:1px solid #CCC; border-right:1px solid #CCC}
|
||||
.defaultSkin table.mceLayout tr.mceFirst td {border-top:1px solid #CCC}
|
||||
.defaultSkin table.mceLayout tr.mceLast td {border-bottom:1px solid #CCC}
|
||||
.defaultSkin table.mceToolbar, .defaultSkin tr.mceFirst .mceToolbar tr td, .defaultSkin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0;}
|
||||
.defaultSkin td.mceToolbar {background:#F0F0EE; padding-top:1px; vertical-align:top}
|
||||
.defaultSkin .mceIframeContainer {border-top:1px solid #CCC; border-bottom:1px solid #CCC}
|
||||
.defaultSkin .mceStatusbar {background:#F0F0EE; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; display:block; height:20px}
|
||||
.defaultSkin .mceStatusbar div {float:left; margin:2px}
|
||||
.defaultSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0}
|
||||
.defaultSkin .mceStatusbar a:hover {text-decoration:underline}
|
||||
.defaultSkin table.mceToolbar {margin-left:3px}
|
||||
.defaultSkin span.mceIcon, .defaultSkin img.mceIcon {display:block; width:20px; height:20px}
|
||||
.defaultSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px}
|
||||
.defaultSkin td.mceCenter {text-align:center;}
|
||||
.defaultSkin td.mceCenter table {margin:0 auto; text-align:left;}
|
||||
.defaultSkin td.mceRight table {margin:0 0 0 auto;}
|
||||
|
||||
/* Button */
|
||||
.defaultSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px; margin-right:1px}
|
||||
.defaultSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0}
|
||||
.defaultSkin a.mceButtonActive, .defaultSkin a.mceButtonSelected {border:1px solid #0A246A; background-color:#C2CBE0}
|
||||
.defaultSkin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
||||
.defaultSkin .mceButtonLabeled {width:auto}
|
||||
.defaultSkin .mceButtonLabeled span.mceIcon {float:left}
|
||||
.defaultSkin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica}
|
||||
.defaultSkin .mceButtonDisabled .mceButtonLabel {color:#888}
|
||||
|
||||
/* Separator */
|
||||
.defaultSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:2px 2px 0 4px}
|
||||
|
||||
/* ListBox */
|
||||
.defaultSkin .mceListBox, .defaultSkin .mceListBox a {display:block}
|
||||
.defaultSkin .mceListBox .mceText {padding-left:4px; width:70px; text-align:left; border:1px solid #CCC; border-right:0; background:#FFF; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden}
|
||||
.defaultSkin .mceListBox .mceOpen {width:9px; height:20px; background:url(../../img/icons.gif) -741px 0; margin-right:2px; border:1px solid #CCC;}
|
||||
.defaultSkin table.mceListBoxEnabled:hover .mceText, .defaultSkin .mceListBoxHover .mceText, .defaultSkin .mceListBoxSelected .mceText {border:1px solid #A2ABC0; border-right:0; background:#FFF}
|
||||
.defaultSkin table.mceListBoxEnabled:hover .mceOpen, .defaultSkin .mceListBoxHover .mceOpen, .defaultSkin .mceListBoxSelected .mceOpen {background-color:#FFF; border:1px solid #A2ABC0}
|
||||
.defaultSkin .mceListBoxDisabled a.mceText {color:gray; background-color:transparent;}
|
||||
.defaultSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden}
|
||||
.defaultSkin .mceOldBoxModel .mceListBox .mceText {height:22px}
|
||||
.defaultSkin .mceOldBoxModel .mceListBox .mceOpen {width:11px; height:22px;}
|
||||
.defaultSkin select.mceNativeListBox {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:7pt; background:#F0F0EE; border:1px solid gray; margin-right:2px;}
|
||||
|
||||
/* SplitButton */
|
||||
.defaultSkin .mceSplitButton {width:32px; height:20px; direction:ltr}
|
||||
.defaultSkin .mceSplitButton a, .defaultSkin .mceSplitButton span {height:20px; display:block}
|
||||
.defaultSkin .mceSplitButton a.mceAction {width:20px; border:1px solid #F0F0EE; border-right:0;}
|
||||
.defaultSkin .mceSplitButton span.mceAction {width:20px; background-image:url(../../img/icons.gif);}
|
||||
.defaultSkin .mceSplitButton a.mceOpen {width:9px; background:url(../../img/icons.gif) -741px 0; border:1px solid #F0F0EE;}
|
||||
.defaultSkin .mceSplitButton span.mceOpen {display:none}
|
||||
.defaultSkin table.mceSplitButtonEnabled:hover a.mceAction, .defaultSkin .mceSplitButtonHover a.mceAction, .defaultSkin .mceSplitButtonSelected a.mceAction {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0}
|
||||
.defaultSkin table.mceSplitButtonEnabled:hover a.mceOpen, .defaultSkin .mceSplitButtonHover a.mceOpen, .defaultSkin .mceSplitButtonSelected a.mceOpen {background-color:#B2BBD0; border:1px solid #0A246A;}
|
||||
.defaultSkin .mceSplitButtonDisabled .mceAction, .defaultSkin .mceSplitButtonDisabled a.mceOpen {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
||||
.defaultSkin .mceSplitButtonActive a.mceAction {border:1px solid #0A246A; background-color:#C2CBE0}
|
||||
.defaultSkin .mceSplitButtonActive a.mceOpen {border-left:0;}
|
||||
|
||||
/* ColorSplitButton */
|
||||
.defaultSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray}
|
||||
.defaultSkin .mceColorSplitMenu td {padding:2px}
|
||||
.defaultSkin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080}
|
||||
.defaultSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
|
||||
.defaultSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
|
||||
.defaultSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2}
|
||||
.defaultSkin a.mceMoreColors:hover {border:1px solid #0A246A}
|
||||
.defaultSkin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a}
|
||||
.defaultSkin .mce_forecolor span.mceAction, .defaultSkin .mce_backcolor span.mceAction {overflow:hidden; height:16px}
|
||||
|
||||
/* Menu */
|
||||
.defaultSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #D4D0C8}
|
||||
.defaultSkin .mceNoIcons span.mceIcon {width:0;}
|
||||
.defaultSkin .mceNoIcons a .mceText {padding-left:10px}
|
||||
.defaultSkin .mceMenu table {background:#FFF}
|
||||
.defaultSkin .mceMenu a, .defaultSkin .mceMenu span, .defaultSkin .mceMenu {display:block}
|
||||
.defaultSkin .mceMenu td {height:20px}
|
||||
.defaultSkin .mceMenu a {position:relative;padding:3px 0 4px 0}
|
||||
.defaultSkin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block}
|
||||
.defaultSkin .mceMenu span.mceText, .defaultSkin .mceMenu .mcePreview {font-size:11px}
|
||||
.defaultSkin .mceMenu pre.mceText {font-family:Monospace}
|
||||
.defaultSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;}
|
||||
.defaultSkin .mceMenu .mceMenuItemEnabled a:hover, .defaultSkin .mceMenu .mceMenuItemActive {background-color:#dbecf3}
|
||||
.defaultSkin td.mceMenuItemSeparator {background:#DDD; height:1px}
|
||||
.defaultSkin .mceMenuItemTitle a {border:0; background:#EEE; border-bottom:1px solid #DDD}
|
||||
.defaultSkin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px}
|
||||
.defaultSkin .mceMenuItemDisabled .mceText {color:#888}
|
||||
.defaultSkin .mceMenuItemSelected .mceIcon {background:url(img/menu_check.gif)}
|
||||
.defaultSkin .mceNoIcons .mceMenuItemSelected a {background:url(img/menu_arrow.gif) no-repeat -6px center}
|
||||
.defaultSkin .mceMenu span.mceMenuLine {display:none}
|
||||
.defaultSkin .mceMenuItemSub a {background:url(img/menu_arrow.gif) no-repeat top right;}
|
||||
|
||||
/* Progress,Resize */
|
||||
.defaultSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50); background:#FFF}
|
||||
.defaultSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
|
||||
|
||||
/* Formats */
|
||||
.defaultSkin .mce_formatPreview a {font-size:10px}
|
||||
.defaultSkin .mce_p span.mceText {}
|
||||
.defaultSkin .mce_address span.mceText {font-style:italic}
|
||||
.defaultSkin .mce_pre span.mceText {font-family:monospace}
|
||||
.defaultSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
|
||||
.defaultSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
|
||||
.defaultSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
|
||||
.defaultSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
|
||||
.defaultSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
|
||||
.defaultSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
|
||||
|
||||
/* Theme */
|
||||
.defaultSkin span.mce_bold {background-position:0 0}
|
||||
.defaultSkin span.mce_italic {background-position:-60px 0}
|
||||
.defaultSkin span.mce_underline {background-position:-140px 0}
|
||||
.defaultSkin span.mce_strikethrough {background-position:-120px 0}
|
||||
.defaultSkin span.mce_undo {background-position:-160px 0}
|
||||
.defaultSkin span.mce_redo {background-position:-100px 0}
|
||||
.defaultSkin span.mce_cleanup {background-position:-40px 0}
|
||||
.defaultSkin span.mce_bullist {background-position:-20px 0}
|
||||
.defaultSkin span.mce_numlist {background-position:-80px 0}
|
||||
.defaultSkin span.mce_justifyleft {background-position:-460px 0}
|
||||
.defaultSkin span.mce_justifyright {background-position:-480px 0}
|
||||
.defaultSkin span.mce_justifycenter {background-position:-420px 0}
|
||||
.defaultSkin span.mce_justifyfull {background-position:-440px 0}
|
||||
.defaultSkin span.mce_anchor {background-position:-200px 0}
|
||||
.defaultSkin span.mce_indent {background-position:-400px 0}
|
||||
.defaultSkin span.mce_outdent {background-position:-540px 0}
|
||||
.defaultSkin span.mce_link {background-position:-500px 0}
|
||||
.defaultSkin span.mce_unlink {background-position:-640px 0}
|
||||
.defaultSkin span.mce_sub {background-position:-600px 0}
|
||||
.defaultSkin span.mce_sup {background-position:-620px 0}
|
||||
.defaultSkin span.mce_removeformat {background-position:-580px 0}
|
||||
.defaultSkin span.mce_newdocument {background-position:-520px 0}
|
||||
.defaultSkin span.mce_image {background-position:-380px 0}
|
||||
.defaultSkin span.mce_help {background-position:-340px 0}
|
||||
.defaultSkin span.mce_code {background-position:-260px 0}
|
||||
.defaultSkin span.mce_hr {background-position:-360px 0}
|
||||
.defaultSkin span.mce_visualaid {background-position:-660px 0}
|
||||
.defaultSkin span.mce_charmap {background-position:-240px 0}
|
||||
.defaultSkin span.mce_paste {background-position:-560px 0}
|
||||
.defaultSkin span.mce_copy {background-position:-700px 0}
|
||||
.defaultSkin span.mce_cut {background-position:-680px 0}
|
||||
.defaultSkin span.mce_blockquote {background-position:-220px 0}
|
||||
.defaultSkin .mce_forecolor span.mceAction {background-position:-720px 0}
|
||||
.defaultSkin .mce_backcolor span.mceAction {background-position:-760px 0}
|
||||
.defaultSkin span.mce_forecolorpicker {background-position:-720px 0}
|
||||
.defaultSkin span.mce_backcolorpicker {background-position:-760px 0}
|
||||
|
||||
/* Plugins */
|
||||
.defaultSkin span.mce_advhr {background-position:-0px -20px}
|
||||
.defaultSkin span.mce_ltr {background-position:-20px -20px}
|
||||
.defaultSkin span.mce_rtl {background-position:-40px -20px}
|
||||
.defaultSkin span.mce_emotions {background-position:-60px -20px}
|
||||
.defaultSkin span.mce_fullpage {background-position:-80px -20px}
|
||||
.defaultSkin span.mce_fullscreen {background-position:-100px -20px}
|
||||
.defaultSkin span.mce_iespell {background-position:-120px -20px}
|
||||
.defaultSkin span.mce_insertdate {background-position:-140px -20px}
|
||||
.defaultSkin span.mce_inserttime {background-position:-160px -20px}
|
||||
.defaultSkin span.mce_absolute {background-position:-180px -20px}
|
||||
.defaultSkin span.mce_backward {background-position:-200px -20px}
|
||||
.defaultSkin span.mce_forward {background-position:-220px -20px}
|
||||
.defaultSkin span.mce_insert_layer {background-position:-240px -20px}
|
||||
.defaultSkin span.mce_insertlayer {background-position:-260px -20px}
|
||||
.defaultSkin span.mce_movebackward {background-position:-280px -20px}
|
||||
.defaultSkin span.mce_moveforward {background-position:-300px -20px}
|
||||
.defaultSkin span.mce_media {background-position:-320px -20px}
|
||||
.defaultSkin span.mce_nonbreaking {background-position:-340px -20px}
|
||||
.defaultSkin span.mce_pastetext {background-position:-360px -20px}
|
||||
.defaultSkin span.mce_pasteword {background-position:-380px -20px}
|
||||
.defaultSkin span.mce_selectall {background-position:-400px -20px}
|
||||
.defaultSkin span.mce_preview {background-position:-420px -20px}
|
||||
.defaultSkin span.mce_print {background-position:-440px -20px}
|
||||
.defaultSkin span.mce_cancel {background-position:-460px -20px}
|
||||
.defaultSkin span.mce_save {background-position:-480px -20px}
|
||||
.defaultSkin span.mce_replace {background-position:-500px -20px}
|
||||
.defaultSkin span.mce_search {background-position:-520px -20px}
|
||||
.defaultSkin span.mce_styleprops {background-position:-560px -20px}
|
||||
.defaultSkin span.mce_table {background-position:-580px -20px}
|
||||
.defaultSkin span.mce_cell_props {background-position:-600px -20px}
|
||||
.defaultSkin span.mce_delete_table {background-position:-620px -20px}
|
||||
.defaultSkin span.mce_delete_col {background-position:-640px -20px}
|
||||
.defaultSkin span.mce_delete_row {background-position:-660px -20px}
|
||||
.defaultSkin span.mce_col_after {background-position:-680px -20px}
|
||||
.defaultSkin span.mce_col_before {background-position:-700px -20px}
|
||||
.defaultSkin span.mce_row_after {background-position:-720px -20px}
|
||||
.defaultSkin span.mce_row_before {background-position:-740px -20px}
|
||||
.defaultSkin span.mce_merge_cells {background-position:-760px -20px}
|
||||
.defaultSkin span.mce_table_props {background-position:-980px -20px}
|
||||
.defaultSkin span.mce_row_props {background-position:-780px -20px}
|
||||
.defaultSkin span.mce_split_cells {background-position:-800px -20px}
|
||||
.defaultSkin span.mce_template {background-position:-820px -20px}
|
||||
.defaultSkin span.mce_visualchars {background-position:-840px -20px}
|
||||
.defaultSkin span.mce_abbr {background-position:-860px -20px}
|
||||
.defaultSkin span.mce_acronym {background-position:-880px -20px}
|
||||
.defaultSkin span.mce_attribs {background-position:-900px -20px}
|
||||
.defaultSkin span.mce_cite {background-position:-920px -20px}
|
||||
.defaultSkin span.mce_del {background-position:-940px -20px}
|
||||
.defaultSkin span.mce_ins {background-position:-960px -20px}
|
||||
.defaultSkin span.mce_pagebreak {background-position:0 -40px}
|
||||
.defaultSkin span.mce_restoredraft {background-position:-20px -40px}
|
||||
.defaultSkin span.mce_spellchecker {background-position:-540px -20px}
|
||||
/* Reset */
|
||||
.defaultSkin table, .defaultSkin tbody, .defaultSkin a, .defaultSkin img, .defaultSkin tr, .defaultSkin div, .defaultSkin td, .defaultSkin iframe, .defaultSkin span, .defaultSkin *, .defaultSkin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left}
|
||||
.defaultSkin a:hover, .defaultSkin a:link, .defaultSkin a:visited, .defaultSkin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000}
|
||||
.defaultSkin table td {vertical-align:middle}
|
||||
|
||||
/* Containers */
|
||||
.defaultSkin table {direction:ltr;background:transparent}
|
||||
.defaultSkin iframe {display:block;}
|
||||
.defaultSkin .mceToolbar {height:26px}
|
||||
.defaultSkin .mceLeft {text-align:left}
|
||||
.defaultSkin .mceRight {text-align:right}
|
||||
|
||||
/* External */
|
||||
.defaultSkin .mceExternalToolbar {position:absolute; border:1px solid #CCC; border-bottom:0; display:none;}
|
||||
.defaultSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
|
||||
.defaultSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0}
|
||||
|
||||
/* Layout */
|
||||
.defaultSkin table.mceLayout {border:0; border-left:1px solid #CCC; border-right:1px solid #CCC}
|
||||
.defaultSkin table.mceLayout tr.mceFirst td {border-top:1px solid #CCC}
|
||||
.defaultSkin table.mceLayout tr.mceLast td {border-bottom:1px solid #CCC}
|
||||
.defaultSkin table.mceToolbar, .defaultSkin tr.mceFirst .mceToolbar tr td, .defaultSkin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0;}
|
||||
.defaultSkin td.mceToolbar {background:#F0F0EE; padding-top:1px; vertical-align:top}
|
||||
.defaultSkin .mceIframeContainer {border-top:1px solid #CCC; border-bottom:1px solid #CCC}
|
||||
.defaultSkin .mceStatusbar {background:#F0F0EE; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; display:block; height:20px}
|
||||
.defaultSkin .mceStatusbar div {float:left; margin:2px}
|
||||
.defaultSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0}
|
||||
.defaultSkin .mceStatusbar a:hover {text-decoration:underline}
|
||||
.defaultSkin table.mceToolbar {margin-left:3px}
|
||||
.defaultSkin span.mceIcon, .defaultSkin img.mceIcon {display:block; width:20px; height:20px}
|
||||
.defaultSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px}
|
||||
.defaultSkin td.mceCenter {text-align:center;}
|
||||
.defaultSkin td.mceCenter table {margin:0 auto; text-align:left;}
|
||||
.defaultSkin td.mceRight table {margin:0 0 0 auto;}
|
||||
|
||||
/* Button */
|
||||
.defaultSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px; margin-right:1px}
|
||||
.defaultSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0}
|
||||
.defaultSkin a.mceButtonActive, .defaultSkin a.mceButtonSelected {border:1px solid #0A246A; background-color:#C2CBE0}
|
||||
.defaultSkin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
||||
.defaultSkin .mceButtonLabeled {width:auto}
|
||||
.defaultSkin .mceButtonLabeled span.mceIcon {float:left}
|
||||
.defaultSkin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica}
|
||||
.defaultSkin .mceButtonDisabled .mceButtonLabel {color:#888}
|
||||
|
||||
/* Separator */
|
||||
.defaultSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:2px 2px 0 4px}
|
||||
|
||||
/* ListBox */
|
||||
.defaultSkin .mceListBox, .defaultSkin .mceListBox a {display:block}
|
||||
.defaultSkin .mceListBox .mceText {padding-left:4px; width:70px; text-align:left; border:1px solid #CCC; border-right:0; background:#FFF; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden}
|
||||
.defaultSkin .mceListBox .mceOpen {width:9px; height:20px; background:url(../../img/icons.gif) -741px 0; margin-right:2px; border:1px solid #CCC;}
|
||||
.defaultSkin table.mceListBoxEnabled:hover .mceText, .defaultSkin .mceListBoxHover .mceText, .defaultSkin .mceListBoxSelected .mceText {border:1px solid #A2ABC0; border-right:0; background:#FFF}
|
||||
.defaultSkin table.mceListBoxEnabled:hover .mceOpen, .defaultSkin .mceListBoxHover .mceOpen, .defaultSkin .mceListBoxSelected .mceOpen {background-color:#FFF; border:1px solid #A2ABC0}
|
||||
.defaultSkin .mceListBoxDisabled a.mceText {color:gray; background-color:transparent;}
|
||||
.defaultSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden}
|
||||
.defaultSkin .mceOldBoxModel .mceListBox .mceText {height:22px}
|
||||
.defaultSkin .mceOldBoxModel .mceListBox .mceOpen {width:11px; height:22px;}
|
||||
.defaultSkin select.mceNativeListBox {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:7pt; background:#F0F0EE; border:1px solid gray; margin-right:2px;}
|
||||
|
||||
/* SplitButton */
|
||||
.defaultSkin .mceSplitButton {width:32px; height:20px; direction:ltr}
|
||||
.defaultSkin .mceSplitButton a, .defaultSkin .mceSplitButton span {height:20px; display:block}
|
||||
.defaultSkin .mceSplitButton a.mceAction {width:20px; border:1px solid #F0F0EE; border-right:0;}
|
||||
.defaultSkin .mceSplitButton span.mceAction {width:20px; background-image:url(../../img/icons.gif);}
|
||||
.defaultSkin .mceSplitButton a.mceOpen {width:9px; background:url(../../img/icons.gif) -741px 0; border:1px solid #F0F0EE;}
|
||||
.defaultSkin .mceSplitButton span.mceOpen {display:none}
|
||||
.defaultSkin table.mceSplitButtonEnabled:hover a.mceAction, .defaultSkin .mceSplitButtonHover a.mceAction, .defaultSkin .mceSplitButtonSelected a.mceAction {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0}
|
||||
.defaultSkin table.mceSplitButtonEnabled:hover a.mceOpen, .defaultSkin .mceSplitButtonHover a.mceOpen, .defaultSkin .mceSplitButtonSelected a.mceOpen {background-color:#B2BBD0; border:1px solid #0A246A;}
|
||||
.defaultSkin .mceSplitButtonDisabled .mceAction, .defaultSkin .mceSplitButtonDisabled a.mceOpen {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
||||
.defaultSkin .mceSplitButtonActive a.mceAction {border:1px solid #0A246A; background-color:#C2CBE0}
|
||||
.defaultSkin .mceSplitButtonActive a.mceOpen {border-left:0;}
|
||||
|
||||
/* ColorSplitButton */
|
||||
.defaultSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray}
|
||||
.defaultSkin .mceColorSplitMenu td {padding:2px}
|
||||
.defaultSkin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080}
|
||||
.defaultSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
|
||||
.defaultSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
|
||||
.defaultSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2}
|
||||
.defaultSkin a.mceMoreColors:hover {border:1px solid #0A246A}
|
||||
.defaultSkin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a}
|
||||
.defaultSkin .mce_forecolor span.mceAction, .defaultSkin .mce_backcolor span.mceAction {overflow:hidden; height:16px}
|
||||
|
||||
/* Menu */
|
||||
.defaultSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #D4D0C8}
|
||||
.defaultSkin .mceNoIcons span.mceIcon {width:0;}
|
||||
.defaultSkin .mceNoIcons a .mceText {padding-left:10px}
|
||||
.defaultSkin .mceMenu table {background:#FFF}
|
||||
.defaultSkin .mceMenu a, .defaultSkin .mceMenu span, .defaultSkin .mceMenu {display:block}
|
||||
.defaultSkin .mceMenu td {height:20px}
|
||||
.defaultSkin .mceMenu a {position:relative;padding:3px 0 4px 0}
|
||||
.defaultSkin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block}
|
||||
.defaultSkin .mceMenu span.mceText, .defaultSkin .mceMenu .mcePreview {font-size:11px}
|
||||
.defaultSkin .mceMenu pre.mceText {font-family:Monospace}
|
||||
.defaultSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;}
|
||||
.defaultSkin .mceMenu .mceMenuItemEnabled a:hover, .defaultSkin .mceMenu .mceMenuItemActive {background-color:#dbecf3}
|
||||
.defaultSkin td.mceMenuItemSeparator {background:#DDD; height:1px}
|
||||
.defaultSkin .mceMenuItemTitle a {border:0; background:#EEE; border-bottom:1px solid #DDD}
|
||||
.defaultSkin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px}
|
||||
.defaultSkin .mceMenuItemDisabled .mceText {color:#888}
|
||||
.defaultSkin .mceMenuItemSelected .mceIcon {background:url(img/menu_check.gif)}
|
||||
.defaultSkin .mceNoIcons .mceMenuItemSelected a {background:url(img/menu_arrow.gif) no-repeat -6px center}
|
||||
.defaultSkin .mceMenu span.mceMenuLine {display:none}
|
||||
.defaultSkin .mceMenuItemSub a {background:url(img/menu_arrow.gif) no-repeat top right;}
|
||||
|
||||
/* Progress,Resize */
|
||||
.defaultSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50); background:#FFF}
|
||||
.defaultSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
|
||||
|
||||
/* Formats */
|
||||
.defaultSkin .mce_formatPreview a {font-size:10px}
|
||||
.defaultSkin .mce_p span.mceText {}
|
||||
.defaultSkin .mce_address span.mceText {font-style:italic}
|
||||
.defaultSkin .mce_pre span.mceText {font-family:monospace}
|
||||
.defaultSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
|
||||
.defaultSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
|
||||
.defaultSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
|
||||
.defaultSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
|
||||
.defaultSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
|
||||
.defaultSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
|
||||
|
||||
/* Theme */
|
||||
.defaultSkin span.mce_bold {background-position:0 0}
|
||||
.defaultSkin span.mce_italic {background-position:-60px 0}
|
||||
.defaultSkin span.mce_underline {background-position:-140px 0}
|
||||
.defaultSkin span.mce_strikethrough {background-position:-120px 0}
|
||||
.defaultSkin span.mce_undo {background-position:-160px 0}
|
||||
.defaultSkin span.mce_redo {background-position:-100px 0}
|
||||
.defaultSkin span.mce_cleanup {background-position:-40px 0}
|
||||
.defaultSkin span.mce_bullist {background-position:-20px 0}
|
||||
.defaultSkin span.mce_numlist {background-position:-80px 0}
|
||||
.defaultSkin span.mce_justifyleft {background-position:-460px 0}
|
||||
.defaultSkin span.mce_justifyright {background-position:-480px 0}
|
||||
.defaultSkin span.mce_justifycenter {background-position:-420px 0}
|
||||
.defaultSkin span.mce_justifyfull {background-position:-440px 0}
|
||||
.defaultSkin span.mce_anchor {background-position:-200px 0}
|
||||
.defaultSkin span.mce_indent {background-position:-400px 0}
|
||||
.defaultSkin span.mce_outdent {background-position:-540px 0}
|
||||
.defaultSkin span.mce_link {background-position:-500px 0}
|
||||
.defaultSkin span.mce_unlink {background-position:-640px 0}
|
||||
.defaultSkin span.mce_sub {background-position:-600px 0}
|
||||
.defaultSkin span.mce_sup {background-position:-620px 0}
|
||||
.defaultSkin span.mce_removeformat {background-position:-580px 0}
|
||||
.defaultSkin span.mce_newdocument {background-position:-520px 0}
|
||||
.defaultSkin span.mce_image {background-position:-380px 0}
|
||||
.defaultSkin span.mce_help {background-position:-340px 0}
|
||||
.defaultSkin span.mce_code {background-position:-260px 0}
|
||||
.defaultSkin span.mce_hr {background-position:-360px 0}
|
||||
.defaultSkin span.mce_visualaid {background-position:-660px 0}
|
||||
.defaultSkin span.mce_charmap {background-position:-240px 0}
|
||||
.defaultSkin span.mce_paste {background-position:-560px 0}
|
||||
.defaultSkin span.mce_copy {background-position:-700px 0}
|
||||
.defaultSkin span.mce_cut {background-position:-680px 0}
|
||||
.defaultSkin span.mce_blockquote {background-position:-220px 0}
|
||||
.defaultSkin .mce_forecolor span.mceAction {background-position:-720px 0}
|
||||
.defaultSkin .mce_backcolor span.mceAction {background-position:-760px 0}
|
||||
.defaultSkin span.mce_forecolorpicker {background-position:-720px 0}
|
||||
.defaultSkin span.mce_backcolorpicker {background-position:-760px 0}
|
||||
|
||||
/* Plugins */
|
||||
.defaultSkin span.mce_advhr {background-position:-0px -20px}
|
||||
.defaultSkin span.mce_ltr {background-position:-20px -20px}
|
||||
.defaultSkin span.mce_rtl {background-position:-40px -20px}
|
||||
.defaultSkin span.mce_emotions {background-position:-60px -20px}
|
||||
.defaultSkin span.mce_fullpage {background-position:-80px -20px}
|
||||
.defaultSkin span.mce_fullscreen {background-position:-100px -20px}
|
||||
.defaultSkin span.mce_iespell {background-position:-120px -20px}
|
||||
.defaultSkin span.mce_insertdate {background-position:-140px -20px}
|
||||
.defaultSkin span.mce_inserttime {background-position:-160px -20px}
|
||||
.defaultSkin span.mce_absolute {background-position:-180px -20px}
|
||||
.defaultSkin span.mce_backward {background-position:-200px -20px}
|
||||
.defaultSkin span.mce_forward {background-position:-220px -20px}
|
||||
.defaultSkin span.mce_insert_layer {background-position:-240px -20px}
|
||||
.defaultSkin span.mce_insertlayer {background-position:-260px -20px}
|
||||
.defaultSkin span.mce_movebackward {background-position:-280px -20px}
|
||||
.defaultSkin span.mce_moveforward {background-position:-300px -20px}
|
||||
.defaultSkin span.mce_media {background-position:-320px -20px}
|
||||
.defaultSkin span.mce_nonbreaking {background-position:-340px -20px}
|
||||
.defaultSkin span.mce_pastetext {background-position:-360px -20px}
|
||||
.defaultSkin span.mce_pasteword {background-position:-380px -20px}
|
||||
.defaultSkin span.mce_selectall {background-position:-400px -20px}
|
||||
.defaultSkin span.mce_preview {background-position:-420px -20px}
|
||||
.defaultSkin span.mce_print {background-position:-440px -20px}
|
||||
.defaultSkin span.mce_cancel {background-position:-460px -20px}
|
||||
.defaultSkin span.mce_save {background-position:-480px -20px}
|
||||
.defaultSkin span.mce_replace {background-position:-500px -20px}
|
||||
.defaultSkin span.mce_search {background-position:-520px -20px}
|
||||
.defaultSkin span.mce_styleprops {background-position:-560px -20px}
|
||||
.defaultSkin span.mce_table {background-position:-580px -20px}
|
||||
.defaultSkin span.mce_cell_props {background-position:-600px -20px}
|
||||
.defaultSkin span.mce_delete_table {background-position:-620px -20px}
|
||||
.defaultSkin span.mce_delete_col {background-position:-640px -20px}
|
||||
.defaultSkin span.mce_delete_row {background-position:-660px -20px}
|
||||
.defaultSkin span.mce_col_after {background-position:-680px -20px}
|
||||
.defaultSkin span.mce_col_before {background-position:-700px -20px}
|
||||
.defaultSkin span.mce_row_after {background-position:-720px -20px}
|
||||
.defaultSkin span.mce_row_before {background-position:-740px -20px}
|
||||
.defaultSkin span.mce_merge_cells {background-position:-760px -20px}
|
||||
.defaultSkin span.mce_table_props {background-position:-980px -20px}
|
||||
.defaultSkin span.mce_row_props {background-position:-780px -20px}
|
||||
.defaultSkin span.mce_split_cells {background-position:-800px -20px}
|
||||
.defaultSkin span.mce_template {background-position:-820px -20px}
|
||||
.defaultSkin span.mce_visualchars {background-position:-840px -20px}
|
||||
.defaultSkin span.mce_abbr {background-position:-860px -20px}
|
||||
.defaultSkin span.mce_acronym {background-position:-880px -20px}
|
||||
.defaultSkin span.mce_attribs {background-position:-900px -20px}
|
||||
.defaultSkin span.mce_cite {background-position:-920px -20px}
|
||||
.defaultSkin span.mce_del {background-position:-940px -20px}
|
||||
.defaultSkin span.mce_ins {background-position:-960px -20px}
|
||||
.defaultSkin span.mce_pagebreak {background-position:0 -40px}
|
||||
.defaultSkin span.mce_restoredraft {background-position:-20px -40px}
|
||||
.defaultSkin span.mce_spellchecker {background-position:-540px -20px}
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
body, td, pre { margin:8px;}
|
||||
body.mceForceColors {background:#FFF; color:#000;}
|
||||
h1 {font-size: 2em}
|
||||
h2 {font-size: 1.5em}
|
||||
h3 {font-size: 1.17em}
|
||||
h4 {font-size: 1em}
|
||||
h5 {font-size: .83em}
|
||||
h6 {font-size: .75em}
|
||||
.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
|
||||
a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat 0 0;}
|
||||
span.mceItemNbsp {background: #DDD}
|
||||
td.mceSelected, th.mceSelected {background-color:#3399ff !important}
|
||||
img {border:0;}
|
||||
table {cursor:default}
|
||||
table td, table th {cursor:text}
|
||||
ins {border-bottom:1px solid green; text-decoration: none; color:green}
|
||||
del {color:red; text-decoration:line-through}
|
||||
cite {border-bottom:1px dashed blue}
|
||||
acronym {border-bottom:1px dotted #CCC; cursor:help}
|
||||
abbr {border-bottom:1px dashed #CCC; cursor:help}
|
||||
|
||||
img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
|
||||
font[face=mceinline] {font-family:inherit !important}
|
||||
body, td, pre { margin:8px;}
|
||||
body.mceForceColors {background:#FFF; color:#000;}
|
||||
h1 {font-size: 2em}
|
||||
h2 {font-size: 1.5em}
|
||||
h3 {font-size: 1.17em}
|
||||
h4 {font-size: 1em}
|
||||
h5 {font-size: .83em}
|
||||
h6 {font-size: .75em}
|
||||
.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
|
||||
a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat 0 0;}
|
||||
span.mceItemNbsp {background: #DDD}
|
||||
td.mceSelected, th.mceSelected {background-color:#3399ff !important}
|
||||
img {border:0;}
|
||||
table {cursor:default}
|
||||
table td, table th {cursor:text}
|
||||
ins {border-bottom:1px solid green; text-decoration: none; color:green}
|
||||
del {color:red; text-decoration:line-through}
|
||||
cite {border-bottom:1px dashed blue}
|
||||
acronym {border-bottom:1px dotted #CCC; cursor:help}
|
||||
abbr {border-bottom:1px dashed #CCC; cursor:help}
|
||||
|
||||
img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
|
||||
font[face=mceinline] {font-family:inherit !important}
|
||||
|
||||
@@ -1,105 +1,105 @@
|
||||
/* Generic */
|
||||
body {
|
||||
font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
|
||||
/* Generic */
|
||||
body {
|
||||
font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
|
||||
background:#F0F0EE;
|
||||
color: black;
|
||||
padding:0;
|
||||
margin:8px 8px 0 8px;
|
||||
}
|
||||
|
||||
html {background:#F0F0EE; color:#000;}
|
||||
td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
||||
textarea {resize:none;outline:none;}
|
||||
a:link, a:visited {color:black;background-color:transparent;}
|
||||
a:hover {color:#2B6FB6;background-color:transparent;}
|
||||
.nowrap {white-space: nowrap}
|
||||
|
||||
/* Forms */
|
||||
fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
|
||||
legend {color:#2B6FB6; font-weight:bold;}
|
||||
label.msg {display:none;}
|
||||
label.invalid {color:#EE0000; display:inline;background-color:transparent;}
|
||||
input.invalid {border:1px solid #EE0000;background-color:transparent;}
|
||||
input {background:#FFF; border:1px solid #CCC;color:black;}
|
||||
input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
||||
input, select, textarea {border:1px solid #808080;}
|
||||
input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
|
||||
input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
|
||||
.input_noborder {border:0;}
|
||||
|
||||
/* Buttons */
|
||||
#insert, #cancel, input.button, .updateButton {
|
||||
font-weight:bold;
|
||||
width:94px; height:23px;
|
||||
cursor:pointer;
|
||||
padding-bottom:2px;
|
||||
float:left;
|
||||
}
|
||||
|
||||
#cancel {float:right}
|
||||
|
||||
/* Browse */
|
||||
a.pickcolor, a.browse {text-decoration:none}
|
||||
a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
|
||||
.mceOldBoxModel a.browse span {width:22px; height:20px;}
|
||||
a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
|
||||
a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
||||
a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
|
||||
a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
|
||||
.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
|
||||
a.pickcolor:hover span {background-color:#B2BBD0;}
|
||||
a.pickcolor:hover span.disabled {}
|
||||
|
||||
/* Charmap */
|
||||
table.charmap {border:1px solid #AAA; text-align:center}
|
||||
td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
|
||||
#charmap a {display:block; color:#000; text-decoration:none; border:0}
|
||||
#charmap a:hover {background:#CCC;color:#2B6FB6}
|
||||
#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
|
||||
#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
|
||||
|
||||
/* Source */
|
||||
.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
|
||||
.mceActionPanel {margin-top:5px;}
|
||||
|
||||
/* Tabs classes */
|
||||
.tabs {width:100%; height:18px; line-height:normal;}
|
||||
.tabs ul {margin:0; padding:0; list-style:none;}
|
||||
.tabs li {float:left; border: 1px solid black; border-bottom:0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block; cursor:pointer;}
|
||||
.tabs li.current {font-weight: bold; margin-right:2px;}
|
||||
.tabs span {float:left; display:block; padding:0px 10px 0 0;}
|
||||
.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
|
||||
.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
|
||||
|
||||
/* Panels */
|
||||
.panel_wrapper div.panel {display:none;}
|
||||
.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
|
||||
.panel_wrapper {border:1px solid #919B9C; padding:10px; padding-top:5px; clear:both; background:white;}
|
||||
|
||||
/* Columns */
|
||||
.column {float:left;}
|
||||
.properties {width:100%;}
|
||||
.properties .column1 {}
|
||||
.properties .column2 {text-align:left;}
|
||||
|
||||
/* Titles */
|
||||
h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
|
||||
h3 {font-size:14px;}
|
||||
.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
|
||||
|
||||
/* Dialog specific */
|
||||
#link .panel_wrapper, #link div.current {height:125px;}
|
||||
#image .panel_wrapper, #image div.current {height:200px;}
|
||||
#plugintable thead {font-weight:bold; background:#DDD;}
|
||||
#plugintable, #about #plugintable td {border:1px solid #919B9C;}
|
||||
#plugintable {width:96%; margin-top:10px;}
|
||||
#pluginscontainer {height:290px; overflow:auto;}
|
||||
#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;}
|
||||
#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
|
||||
#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
|
||||
#colorpicker #light div {overflow:hidden;}
|
||||
#colorpicker #previewblock {float:right; padding-left:10px; height:20px;}
|
||||
#colorpicker .panel_wrapper div.current {height:175px;}
|
||||
#colorpicker #namedcolors {width:150px;}
|
||||
#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
|
||||
#colorpicker #colornamecontainer {margin-top:5px;}
|
||||
color: black;
|
||||
padding:0;
|
||||
margin:8px 8px 0 8px;
|
||||
}
|
||||
|
||||
html {background:#F0F0EE; color:#000;}
|
||||
td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
||||
textarea {resize:none;outline:none;}
|
||||
a:link, a:visited {color:black;background-color:transparent;}
|
||||
a:hover {color:#2B6FB6;background-color:transparent;}
|
||||
.nowrap {white-space: nowrap}
|
||||
|
||||
/* Forms */
|
||||
fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
|
||||
legend {color:#2B6FB6; font-weight:bold;}
|
||||
label.msg {display:none;}
|
||||
label.invalid {color:#EE0000; display:inline;background-color:transparent;}
|
||||
input.invalid {border:1px solid #EE0000;background-color:transparent;}
|
||||
input {background:#FFF; border:1px solid #CCC;color:black;}
|
||||
input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
||||
input, select, textarea {border:1px solid #808080;}
|
||||
input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
|
||||
input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
|
||||
.input_noborder {border:0;}
|
||||
|
||||
/* Buttons */
|
||||
#insert, #cancel, input.button, .updateButton {
|
||||
font-weight:bold;
|
||||
width:94px; height:23px;
|
||||
cursor:pointer;
|
||||
padding-bottom:2px;
|
||||
float:left;
|
||||
}
|
||||
|
||||
#cancel {float:right}
|
||||
|
||||
/* Browse */
|
||||
a.pickcolor, a.browse {text-decoration:none}
|
||||
a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
|
||||
.mceOldBoxModel a.browse span {width:22px; height:20px;}
|
||||
a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
|
||||
a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
||||
a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
|
||||
a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
|
||||
.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
|
||||
a.pickcolor:hover span {background-color:#B2BBD0;}
|
||||
a.pickcolor:hover span.disabled {}
|
||||
|
||||
/* Charmap */
|
||||
table.charmap {border:1px solid #AAA; text-align:center}
|
||||
td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
|
||||
#charmap a {display:block; color:#000; text-decoration:none; border:0}
|
||||
#charmap a:hover {background:#CCC;color:#2B6FB6}
|
||||
#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
|
||||
#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
|
||||
|
||||
/* Source */
|
||||
.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
|
||||
.mceActionPanel {margin-top:5px;}
|
||||
|
||||
/* Tabs classes */
|
||||
.tabs {width:100%; height:18px; line-height:normal;}
|
||||
.tabs ul {margin:0; padding:0; list-style:none;}
|
||||
.tabs li {float:left; border: 1px solid black; border-bottom:0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block; cursor:pointer;}
|
||||
.tabs li.current {font-weight: bold; margin-right:2px;}
|
||||
.tabs span {float:left; display:block; padding:0px 10px 0 0;}
|
||||
.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
|
||||
.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
|
||||
|
||||
/* Panels */
|
||||
.panel_wrapper div.panel {display:none;}
|
||||
.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
|
||||
.panel_wrapper {border:1px solid #919B9C; padding:10px; padding-top:5px; clear:both; background:white;}
|
||||
|
||||
/* Columns */
|
||||
.column {float:left;}
|
||||
.properties {width:100%;}
|
||||
.properties .column1 {}
|
||||
.properties .column2 {text-align:left;}
|
||||
|
||||
/* Titles */
|
||||
h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
|
||||
h3 {font-size:14px;}
|
||||
.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
|
||||
|
||||
/* Dialog specific */
|
||||
#link .panel_wrapper, #link div.current {height:125px;}
|
||||
#image .panel_wrapper, #image div.current {height:200px;}
|
||||
#plugintable thead {font-weight:bold; background:#DDD;}
|
||||
#plugintable, #about #plugintable td {border:1px solid #919B9C;}
|
||||
#plugintable {width:96%; margin-top:10px;}
|
||||
#pluginscontainer {height:290px; overflow:auto;}
|
||||
#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;}
|
||||
#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
|
||||
#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
|
||||
#colorpicker #light div {overflow:hidden;}
|
||||
#colorpicker #previewblock {float:right; padding-left:10px; height:20px;}
|
||||
#colorpicker .panel_wrapper div.current {height:175px;}
|
||||
#colorpicker #namedcolors {width:150px;}
|
||||
#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
|
||||
#colorpicker #colornamecontainer {margin-top:5px;}
|
||||
|
||||
@@ -1,101 +1,101 @@
|
||||
/* Reset */
|
||||
.highcontrastSkin table, .highcontrastSkin tbody, .highcontrastSkin a, .highcontrastSkin img, .highcontrastSkin tr, .highcontrastSkin div, .highcontrastSkin td, .highcontrastSkin iframe, .highcontrastSkin span, .highcontrastSkin *, .highcontrastSkin .mceText {border:0; margin:0; padding:0; vertical-align:baseline; border-collapse:separate;}
|
||||
.highcontrastSkin a:hover, .highcontrastSkin a:link, .highcontrastSkin a:visited, .highcontrastSkin a:active {text-decoration:none; font-weight:normal; cursor:default;}
|
||||
.highcontrastSkin table td {vertical-align:middle}
|
||||
|
||||
.highcontrastSkin .mceIconOnly {display: block !important;}
|
||||
|
||||
/* External */
|
||||
.highcontrastSkin .mceExternalToolbar {position:absolute; border:1px solid; border-bottom:0; display:none; background-color: white;}
|
||||
.highcontrastSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
|
||||
.highcontrastSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px;}
|
||||
|
||||
/* Layout */
|
||||
.highcontrastSkin table.mceLayout {border: 1px solid;}
|
||||
.highcontrastSkin .mceIframeContainer {border-top:1px solid; border-bottom:1px solid}
|
||||
.highcontrastSkin .mceStatusbar a:hover {text-decoration:underline}
|
||||
.highcontrastSkin .mceStatusbar {display:block; line-height:1.5em; overflow:visible;}
|
||||
.highcontrastSkin .mceStatusbar div {float:left}
|
||||
.highcontrastSkin .mceStatusbar a.mceResize {display:block; float:right; width:20px; height:20px; cursor:se-resize; outline:0}
|
||||
|
||||
.highcontrastSkin .mceToolbar td { display: inline-block; float: left;}
|
||||
.highcontrastSkin .mceToolbar tr { display: block;}
|
||||
.highcontrastSkin .mceToolbar table { display: block; }
|
||||
|
||||
/* Button */
|
||||
|
||||
.highcontrastSkin .mceButton { display:block; margin: 2px; padding: 5px 10px;border: 1px solid; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; -ms-border-radius: 3px; height: 2em;}
|
||||
.highcontrastSkin .mceButton .mceVoiceLabel { height: 100%; vertical-align: center; line-height: 2em}
|
||||
.highcontrastSkin .mceButtonDisabled .mceVoiceLabel { opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60);}
|
||||
.highcontrastSkin .mceButtonActive, .highcontrastSkin .mceButton:focus, .highcontrastSkin .mceButton:active { border: 5px solid; padding: 1px 6px;-webkit-focus-ring-color:none;outline:none;}
|
||||
|
||||
/* Separator */
|
||||
.highcontrastSkin .mceSeparator {display:block; width:16px; height:26px;}
|
||||
|
||||
/* ListBox */
|
||||
.highcontrastSkin .mceListBox { display: block; margin:2px;-webkit-focus-ring-color:none;outline:none;}
|
||||
.highcontrastSkin .mceListBox .mceText {padding: 5px 6px; line-height: 2em; width: 15ex; overflow: hidden;}
|
||||
.highcontrastSkin .mceListBoxDisabled .mceText { opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60);}
|
||||
.highcontrastSkin .mceListBox a.mceText { padding: 5px 10px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-right: 0; border-radius: 3px 0px 0px 3px; -moz-border-radius: 3px 0px 0px 3px; -webkit-border-radius: 3px 0px 0px 3px; -ms-border-radius: 3px 0px 0px 3px;}
|
||||
.highcontrastSkin .mceListBox a.mceOpen { padding: 5px 4px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-left: 0; border-radius: 0px 3px 3px 0px; -moz-border-radius: 0px 3px 3px 0px; -webkit-border-radius: 0px 3px 3px 0px; -ms-border-radius: 0px 3px 3px 0px;}
|
||||
.highcontrastSkin .mceListBox:focus a.mceText, .highcontrastSkin .mceListBox:active a.mceText { border-width: 5px; padding: 1px 10px 1px 6px;}
|
||||
.highcontrastSkin .mceListBox:focus a.mceOpen, .highcontrastSkin .mceListBox:active a.mceOpen { border-width: 5px; padding: 1px 0px 1px 4px;}
|
||||
|
||||
.highcontrastSkin .mceListBoxMenu {overflow-y:auto}
|
||||
|
||||
/* SplitButton */
|
||||
.highcontrastSkin .mceSplitButtonDisabled .mceAction {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
||||
|
||||
.highcontrastSkin .mceSplitButton { border-collapse: collapse; margin: 2px; height: 2em; line-height: 2em;-webkit-focus-ring-color:none;outline:none;}
|
||||
.highcontrastSkin .mceSplitButton td { display: table-cell; float: none; margin: 0; padding: 0; height: 2em;}
|
||||
.highcontrastSkin .mceSplitButton tr { display: table-row; }
|
||||
.highcontrastSkin table.mceSplitButton { display: table; }
|
||||
.highcontrastSkin .mceSplitButton a.mceAction { padding: 5px 10px; display: block; height: 2em; line-height: 2em; overflow: hidden; border: 1px solid; border-right: 0; border-radius: 3px 0px 0px 3px; -moz-border-radius: 3px 0px 0px 3px; -webkit-border-radius: 3px 0px 0px 3px; -ms-border-radius: 3px 0px 0px 3px;}
|
||||
.highcontrastSkin .mceSplitButton a.mceOpen { padding: 5px 4px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-radius: 0px 3px 3px 0px; -moz-border-radius: 0px 3px 3px 0px; -webkit-border-radius: 0px 3px 3px 0px; -ms-border-radius: 0px 3px 3px 0px;}
|
||||
.highcontrastSkin .mceSplitButton .mceVoiceLabel { height: 2em; vertical-align: center; line-height: 2em; }
|
||||
.highcontrastSkin .mceSplitButton:focus a.mceAction, .highcontrastSkin .mceSplitButton:active a.mceAction { border-width: 5px; border-right-width: 1px; padding: 1px 10px 1px 6px;-webkit-focus-ring-color:none;outline:none;}
|
||||
.highcontrastSkin .mceSplitButton:focus a.mceOpen, .highcontrastSkin .mceSplitButton:active a.mceOpen { border-width: 5px; border-left-width: 1px; padding: 1px 0px 1px 4px;-webkit-focus-ring-color:none;outline:none;}
|
||||
|
||||
/* Menu */
|
||||
.highcontrastSkin .mceNoIcons span.mceIcon {width:0;}
|
||||
.highcontrastSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid; }
|
||||
.highcontrastSkin .mceMenu table {background:white; color: black}
|
||||
.highcontrastSkin .mceNoIcons a .mceText {padding-left:10px}
|
||||
.highcontrastSkin .mceMenu a, .highcontrastSkin .mceMenu span, .highcontrastSkin .mceMenu {display:block;background:white; color: black}
|
||||
.highcontrastSkin .mceMenu td {height:2em}
|
||||
.highcontrastSkin .mceMenu a {position:relative;padding:3px 0 4px 0; display: block;}
|
||||
.highcontrastSkin .mceMenu .mceText {position:relative; display:block; cursor:default; margin:0; padding:0 25px 0 25px;}
|
||||
.highcontrastSkin .mceMenu pre.mceText {font-family:Monospace}
|
||||
.highcontrastSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:26px;}
|
||||
.highcontrastSkin td.mceMenuItemSeparator {border-top:1px solid; height:1px}
|
||||
.highcontrastSkin .mceMenuItemTitle a {border:0; border-bottom:1px solid}
|
||||
.highcontrastSkin .mceMenuItemTitle span.mceText {font-weight:bold; padding-left:4px}
|
||||
.highcontrastSkin .mceNoIcons .mceMenuItemSelected span.mceText:before {content: "\2713\A0";}
|
||||
.highcontrastSkin .mceMenu span.mceMenuLine {display:none}
|
||||
.highcontrastSkin .mceMenuItemSub a .mceText:after {content: "\A0\25B8"}
|
||||
|
||||
/* ColorSplitButton */
|
||||
.highcontrastSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid; color: #000}
|
||||
.highcontrastSkin .mceColorSplitMenu td {padding:2px}
|
||||
.highcontrastSkin .mceColorSplitMenu a {display:block; width:16px; height:16px; overflow:hidden; color:#000; margin: 0; padding: 0;}
|
||||
.highcontrastSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
|
||||
.highcontrastSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
|
||||
.highcontrastSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid; background-color:#B6BDD2}
|
||||
.highcontrastSkin a.mceMoreColors:hover {border:1px solid #0A246A; color: #000;}
|
||||
.highcontrastSkin .mceColorPreview {display:none;}
|
||||
.highcontrastSkin .mce_forecolor span.mceAction, .highcontrastSkin .mce_backcolor span.mceAction {height:17px;overflow:hidden}
|
||||
|
||||
/* Progress,Resize */
|
||||
.highcontrastSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF}
|
||||
.highcontrastSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
|
||||
|
||||
/* Formats */
|
||||
.highcontrastSkin .mce_p span.mceText {}
|
||||
.highcontrastSkin .mce_address span.mceText {font-style:italic}
|
||||
.highcontrastSkin .mce_pre span.mceText {font-family:monospace}
|
||||
.highcontrastSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
|
||||
.highcontrastSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
|
||||
.highcontrastSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
|
||||
.highcontrastSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
|
||||
.highcontrastSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
|
||||
.highcontrastSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
|
||||
/* Reset */
|
||||
.highcontrastSkin table, .highcontrastSkin tbody, .highcontrastSkin a, .highcontrastSkin img, .highcontrastSkin tr, .highcontrastSkin div, .highcontrastSkin td, .highcontrastSkin iframe, .highcontrastSkin span, .highcontrastSkin *, .highcontrastSkin .mceText {border:0; margin:0; padding:0; vertical-align:baseline; border-collapse:separate;}
|
||||
.highcontrastSkin a:hover, .highcontrastSkin a:link, .highcontrastSkin a:visited, .highcontrastSkin a:active {text-decoration:none; font-weight:normal; cursor:default;}
|
||||
.highcontrastSkin table td {vertical-align:middle}
|
||||
|
||||
.highcontrastSkin .mceIconOnly {display: block !important;}
|
||||
|
||||
/* External */
|
||||
.highcontrastSkin .mceExternalToolbar {position:absolute; border:1px solid; border-bottom:0; display:none; background-color: white;}
|
||||
.highcontrastSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
|
||||
.highcontrastSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px;}
|
||||
|
||||
/* Layout */
|
||||
.highcontrastSkin table.mceLayout {border: 1px solid;}
|
||||
.highcontrastSkin .mceIframeContainer {border-top:1px solid; border-bottom:1px solid}
|
||||
.highcontrastSkin .mceStatusbar a:hover {text-decoration:underline}
|
||||
.highcontrastSkin .mceStatusbar {display:block; line-height:1.5em; overflow:visible;}
|
||||
.highcontrastSkin .mceStatusbar div {float:left}
|
||||
.highcontrastSkin .mceStatusbar a.mceResize {display:block; float:right; width:20px; height:20px; cursor:se-resize; outline:0}
|
||||
|
||||
.highcontrastSkin .mceToolbar td { display: inline-block; float: left;}
|
||||
.highcontrastSkin .mceToolbar tr { display: block;}
|
||||
.highcontrastSkin .mceToolbar table { display: block; }
|
||||
|
||||
/* Button */
|
||||
|
||||
.highcontrastSkin .mceButton { display:block; margin: 2px; padding: 5px 10px;border: 1px solid; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; -ms-border-radius: 3px; height: 2em;}
|
||||
.highcontrastSkin .mceButton .mceVoiceLabel { height: 100%; vertical-align: center; line-height: 2em}
|
||||
.highcontrastSkin .mceButtonDisabled .mceVoiceLabel { opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60);}
|
||||
.highcontrastSkin .mceButtonActive, .highcontrastSkin .mceButton:focus, .highcontrastSkin .mceButton:active { border: 5px solid; padding: 1px 6px;-webkit-focus-ring-color:none;outline:none;}
|
||||
|
||||
/* Separator */
|
||||
.highcontrastSkin .mceSeparator {display:block; width:16px; height:26px;}
|
||||
|
||||
/* ListBox */
|
||||
.highcontrastSkin .mceListBox { display: block; margin:2px;-webkit-focus-ring-color:none;outline:none;}
|
||||
.highcontrastSkin .mceListBox .mceText {padding: 5px 6px; line-height: 2em; width: 15ex; overflow: hidden;}
|
||||
.highcontrastSkin .mceListBoxDisabled .mceText { opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60);}
|
||||
.highcontrastSkin .mceListBox a.mceText { padding: 5px 10px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-right: 0; border-radius: 3px 0px 0px 3px; -moz-border-radius: 3px 0px 0px 3px; -webkit-border-radius: 3px 0px 0px 3px; -ms-border-radius: 3px 0px 0px 3px;}
|
||||
.highcontrastSkin .mceListBox a.mceOpen { padding: 5px 4px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-left: 0; border-radius: 0px 3px 3px 0px; -moz-border-radius: 0px 3px 3px 0px; -webkit-border-radius: 0px 3px 3px 0px; -ms-border-radius: 0px 3px 3px 0px;}
|
||||
.highcontrastSkin .mceListBox:focus a.mceText, .highcontrastSkin .mceListBox:active a.mceText { border-width: 5px; padding: 1px 10px 1px 6px;}
|
||||
.highcontrastSkin .mceListBox:focus a.mceOpen, .highcontrastSkin .mceListBox:active a.mceOpen { border-width: 5px; padding: 1px 0px 1px 4px;}
|
||||
|
||||
.highcontrastSkin .mceListBoxMenu {overflow-y:auto}
|
||||
|
||||
/* SplitButton */
|
||||
.highcontrastSkin .mceSplitButtonDisabled .mceAction {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
||||
|
||||
.highcontrastSkin .mceSplitButton { border-collapse: collapse; margin: 2px; height: 2em; line-height: 2em;-webkit-focus-ring-color:none;outline:none;}
|
||||
.highcontrastSkin .mceSplitButton td { display: table-cell; float: none; margin: 0; padding: 0; height: 2em;}
|
||||
.highcontrastSkin .mceSplitButton tr { display: table-row; }
|
||||
.highcontrastSkin table.mceSplitButton { display: table; }
|
||||
.highcontrastSkin .mceSplitButton a.mceAction { padding: 5px 10px; display: block; height: 2em; line-height: 2em; overflow: hidden; border: 1px solid; border-right: 0; border-radius: 3px 0px 0px 3px; -moz-border-radius: 3px 0px 0px 3px; -webkit-border-radius: 3px 0px 0px 3px; -ms-border-radius: 3px 0px 0px 3px;}
|
||||
.highcontrastSkin .mceSplitButton a.mceOpen { padding: 5px 4px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-radius: 0px 3px 3px 0px; -moz-border-radius: 0px 3px 3px 0px; -webkit-border-radius: 0px 3px 3px 0px; -ms-border-radius: 0px 3px 3px 0px;}
|
||||
.highcontrastSkin .mceSplitButton .mceVoiceLabel { height: 2em; vertical-align: center; line-height: 2em; }
|
||||
.highcontrastSkin .mceSplitButton:focus a.mceAction, .highcontrastSkin .mceSplitButton:active a.mceAction { border-width: 5px; border-right-width: 1px; padding: 1px 10px 1px 6px;-webkit-focus-ring-color:none;outline:none;}
|
||||
.highcontrastSkin .mceSplitButton:focus a.mceOpen, .highcontrastSkin .mceSplitButton:active a.mceOpen { border-width: 5px; border-left-width: 1px; padding: 1px 0px 1px 4px;-webkit-focus-ring-color:none;outline:none;}
|
||||
|
||||
/* Menu */
|
||||
.highcontrastSkin .mceNoIcons span.mceIcon {width:0;}
|
||||
.highcontrastSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid; }
|
||||
.highcontrastSkin .mceMenu table {background:white; color: black}
|
||||
.highcontrastSkin .mceNoIcons a .mceText {padding-left:10px}
|
||||
.highcontrastSkin .mceMenu a, .highcontrastSkin .mceMenu span, .highcontrastSkin .mceMenu {display:block;background:white; color: black}
|
||||
.highcontrastSkin .mceMenu td {height:2em}
|
||||
.highcontrastSkin .mceMenu a {position:relative;padding:3px 0 4px 0; display: block;}
|
||||
.highcontrastSkin .mceMenu .mceText {position:relative; display:block; cursor:default; margin:0; padding:0 25px 0 25px;}
|
||||
.highcontrastSkin .mceMenu pre.mceText {font-family:Monospace}
|
||||
.highcontrastSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:26px;}
|
||||
.highcontrastSkin td.mceMenuItemSeparator {border-top:1px solid; height:1px}
|
||||
.highcontrastSkin .mceMenuItemTitle a {border:0; border-bottom:1px solid}
|
||||
.highcontrastSkin .mceMenuItemTitle span.mceText {font-weight:bold; padding-left:4px}
|
||||
.highcontrastSkin .mceNoIcons .mceMenuItemSelected span.mceText:before {content: "\2713\A0";}
|
||||
.highcontrastSkin .mceMenu span.mceMenuLine {display:none}
|
||||
.highcontrastSkin .mceMenuItemSub a .mceText:after {content: "\A0\25B8"}
|
||||
|
||||
/* ColorSplitButton */
|
||||
.highcontrastSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid; color: #000}
|
||||
.highcontrastSkin .mceColorSplitMenu td {padding:2px}
|
||||
.highcontrastSkin .mceColorSplitMenu a {display:block; width:16px; height:16px; overflow:hidden; color:#000; margin: 0; padding: 0;}
|
||||
.highcontrastSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
|
||||
.highcontrastSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
|
||||
.highcontrastSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid; background-color:#B6BDD2}
|
||||
.highcontrastSkin a.mceMoreColors:hover {border:1px solid #0A246A; color: #000;}
|
||||
.highcontrastSkin .mceColorPreview {display:none;}
|
||||
.highcontrastSkin .mce_forecolor span.mceAction, .highcontrastSkin .mce_backcolor span.mceAction {height:17px;overflow:hidden}
|
||||
|
||||
/* Progress,Resize */
|
||||
.highcontrastSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF}
|
||||
.highcontrastSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
|
||||
|
||||
/* Formats */
|
||||
.highcontrastSkin .mce_p span.mceText {}
|
||||
.highcontrastSkin .mce_address span.mceText {font-style:italic}
|
||||
.highcontrastSkin .mce_pre span.mceText {font-family:monospace}
|
||||
.highcontrastSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
|
||||
.highcontrastSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
|
||||
.highcontrastSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
|
||||
.highcontrastSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
|
||||
.highcontrastSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
|
||||
.highcontrastSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
|
||||
|
||||
@@ -1,46 +1,46 @@
|
||||
body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
|
||||
body {background:#FFF;}
|
||||
body.mceForceColors {background:#FFF; color:#000;}
|
||||
h1 {font-size: 2em}
|
||||
h2 {font-size: 1.5em}
|
||||
h3 {font-size: 1.17em}
|
||||
h4 {font-size: 1em}
|
||||
h5 {font-size: .83em}
|
||||
h6 {font-size: .75em}
|
||||
.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
|
||||
a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat 0 0;}
|
||||
span.mceItemNbsp {background: #DDD}
|
||||
td.mceSelected, th.mceSelected {background-color:#3399ff !important}
|
||||
img {border:0;}
|
||||
table {cursor:default}
|
||||
table td, table th {cursor:text}
|
||||
ins {border-bottom:1px solid green; text-decoration: none; color:green}
|
||||
del {color:red; text-decoration:line-through}
|
||||
cite {border-bottom:1px dashed blue}
|
||||
acronym {border-bottom:1px dotted #CCC; cursor:help}
|
||||
abbr {border-bottom:1px dashed #CCC; cursor:help}
|
||||
|
||||
/* IE */
|
||||
* html body {
|
||||
scrollbar-3dlight-color:#F0F0EE;
|
||||
scrollbar-arrow-color:#676662;
|
||||
scrollbar-base-color:#F0F0EE;
|
||||
scrollbar-darkshadow-color:#DDD;
|
||||
scrollbar-face-color:#E0E0DD;
|
||||
scrollbar-highlight-color:#F0F0EE;
|
||||
scrollbar-shadow-color:#F0F0EE;
|
||||
scrollbar-track-color:#F5F5F5;
|
||||
}
|
||||
|
||||
img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
|
||||
font[face=mceinline] {font-family:inherit !important}
|
||||
|
||||
.mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc}
|
||||
.mceItemShockWave {background-image:url(../../img/shockwave.gif)}
|
||||
.mceItemFlash {background-image:url(../../img/flash.gif)}
|
||||
.mceItemQuickTime {background-image:url(../../img/quicktime.gif)}
|
||||
.mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)}
|
||||
.mceItemRealMedia {background-image:url(../../img/realmedia.gif)}
|
||||
.mceItemVideo {background-image:url(../../img/video.gif)}
|
||||
.mceItemIframe {background-image:url(../../img/iframe.gif)}
|
||||
.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;}
|
||||
body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
|
||||
body {background:#FFF;}
|
||||
body.mceForceColors {background:#FFF; color:#000;}
|
||||
h1 {font-size: 2em}
|
||||
h2 {font-size: 1.5em}
|
||||
h3 {font-size: 1.17em}
|
||||
h4 {font-size: 1em}
|
||||
h5 {font-size: .83em}
|
||||
h6 {font-size: .75em}
|
||||
.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
|
||||
a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat 0 0;}
|
||||
span.mceItemNbsp {background: #DDD}
|
||||
td.mceSelected, th.mceSelected {background-color:#3399ff !important}
|
||||
img {border:0;}
|
||||
table {cursor:default}
|
||||
table td, table th {cursor:text}
|
||||
ins {border-bottom:1px solid green; text-decoration: none; color:green}
|
||||
del {color:red; text-decoration:line-through}
|
||||
cite {border-bottom:1px dashed blue}
|
||||
acronym {border-bottom:1px dotted #CCC; cursor:help}
|
||||
abbr {border-bottom:1px dashed #CCC; cursor:help}
|
||||
|
||||
/* IE */
|
||||
* html body {
|
||||
scrollbar-3dlight-color:#F0F0EE;
|
||||
scrollbar-arrow-color:#676662;
|
||||
scrollbar-base-color:#F0F0EE;
|
||||
scrollbar-darkshadow-color:#DDD;
|
||||
scrollbar-face-color:#E0E0DD;
|
||||
scrollbar-highlight-color:#F0F0EE;
|
||||
scrollbar-shadow-color:#F0F0EE;
|
||||
scrollbar-track-color:#F5F5F5;
|
||||
}
|
||||
|
||||
img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
|
||||
font[face=mceinline] {font-family:inherit !important}
|
||||
|
||||
.mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc}
|
||||
.mceItemShockWave {background-image:url(../../img/shockwave.gif)}
|
||||
.mceItemFlash {background-image:url(../../img/flash.gif)}
|
||||
.mceItemQuickTime {background-image:url(../../img/quicktime.gif)}
|
||||
.mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)}
|
||||
.mceItemRealMedia {background-image:url(../../img/realmedia.gif)}
|
||||
.mceItemVideo {background-image:url(../../img/video.gif)}
|
||||
.mceItemIframe {background-image:url(../../img/iframe.gif)}
|
||||
.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;}
|
||||
|
||||
@@ -1,117 +1,117 @@
|
||||
/* Generic */
|
||||
body {
|
||||
font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
|
||||
scrollbar-3dlight-color:#F0F0EE;
|
||||
scrollbar-arrow-color:#676662;
|
||||
scrollbar-base-color:#F0F0EE;
|
||||
scrollbar-darkshadow-color:#DDDDDD;
|
||||
scrollbar-face-color:#E0E0DD;
|
||||
scrollbar-highlight-color:#F0F0EE;
|
||||
scrollbar-shadow-color:#F0F0EE;
|
||||
scrollbar-track-color:#F5F5F5;
|
||||
background:#F0F0EE;
|
||||
padding:0;
|
||||
margin:8px 8px 0 8px;
|
||||
}
|
||||
|
||||
html {background:#F0F0EE;}
|
||||
td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
||||
textarea {resize:none;outline:none;}
|
||||
a:link, a:visited {color:black;}
|
||||
a:hover {color:#2B6FB6;}
|
||||
.nowrap {white-space: nowrap}
|
||||
|
||||
/* Forms */
|
||||
fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
|
||||
legend {color:#2B6FB6; font-weight:bold;}
|
||||
label.msg {display:none;}
|
||||
label.invalid {color:#EE0000; display:inline;}
|
||||
input.invalid {border:1px solid #EE0000;}
|
||||
input {background:#FFF; border:1px solid #CCC;}
|
||||
input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
||||
input, select, textarea {border:1px solid #808080;}
|
||||
input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
|
||||
input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
|
||||
.input_noborder {border:0;}
|
||||
|
||||
/* Buttons */
|
||||
#insert, #cancel, input.button, .updateButton {
|
||||
border:0; margin:0; padding:0;
|
||||
font-weight:bold;
|
||||
width:94px; height:26px;
|
||||
background:url(../default/img/buttons.png) 0 -26px;
|
||||
cursor:pointer;
|
||||
padding-bottom:2px;
|
||||
float:left;
|
||||
}
|
||||
|
||||
#insert {background:url(../default/img/buttons.png) 0 -52px}
|
||||
#cancel {background:url(../default/img/buttons.png) 0 0; float:right}
|
||||
|
||||
/* Browse */
|
||||
a.pickcolor, a.browse {text-decoration:none}
|
||||
a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
|
||||
.mceOldBoxModel a.browse span {width:22px; height:20px;}
|
||||
a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
|
||||
a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
||||
a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
|
||||
a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
|
||||
.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
|
||||
a.pickcolor:hover span {background-color:#B2BBD0;}
|
||||
a.pickcolor:hover span.disabled {}
|
||||
|
||||
/* Charmap */
|
||||
table.charmap {border:1px solid #AAA; text-align:center}
|
||||
td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
|
||||
#charmap a {display:block; color:#000; text-decoration:none; border:0}
|
||||
#charmap a:hover {background:#CCC;color:#2B6FB6}
|
||||
#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
|
||||
#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
|
||||
|
||||
/* Source */
|
||||
.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
|
||||
.mceActionPanel {margin-top:5px;}
|
||||
|
||||
/* Tabs classes */
|
||||
.tabs {width:100%; height:18px; line-height:normal; background:url(../default/img/tabs.gif) repeat-x 0 -72px;}
|
||||
.tabs ul {margin:0; padding:0; list-style:none;}
|
||||
.tabs li {float:left; background:url(../default/img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
|
||||
.tabs li.current {background:url(../default/img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
|
||||
.tabs span {float:left; display:block; background:url(../default/img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
|
||||
.tabs .current span {background:url(../default/img/tabs.gif) no-repeat right -54px;}
|
||||
.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
|
||||
.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
|
||||
|
||||
/* Panels */
|
||||
.panel_wrapper div.panel {display:none;}
|
||||
.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
|
||||
.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
|
||||
|
||||
/* Columns */
|
||||
.column {float:left;}
|
||||
.properties {width:100%;}
|
||||
.properties .column1 {}
|
||||
.properties .column2 {text-align:left;}
|
||||
|
||||
/* Titles */
|
||||
h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
|
||||
h3 {font-size:14px;}
|
||||
.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
|
||||
|
||||
/* Dialog specific */
|
||||
#link .panel_wrapper, #link div.current {height:125px;}
|
||||
#image .panel_wrapper, #image div.current {height:200px;}
|
||||
#plugintable thead {font-weight:bold; background:#DDD;}
|
||||
#plugintable, #about #plugintable td {border:1px solid #919B9C;}
|
||||
#plugintable {width:96%; margin-top:10px;}
|
||||
#pluginscontainer {height:290px; overflow:auto;}
|
||||
#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;}
|
||||
#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
|
||||
#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
|
||||
#colorpicker #light div {overflow:hidden;}
|
||||
#colorpicker #previewblock {float:right; padding-left:10px; height:20px;}
|
||||
#colorpicker .panel_wrapper div.current {height:175px;}
|
||||
#colorpicker #namedcolors {width:150px;}
|
||||
#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
|
||||
#colorpicker #colornamecontainer {margin-top:5px;}
|
||||
#colorpicker #picker_panel fieldset {margin:auto;width:325px;}
|
||||
/* Generic */
|
||||
body {
|
||||
font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
|
||||
scrollbar-3dlight-color:#F0F0EE;
|
||||
scrollbar-arrow-color:#676662;
|
||||
scrollbar-base-color:#F0F0EE;
|
||||
scrollbar-darkshadow-color:#DDDDDD;
|
||||
scrollbar-face-color:#E0E0DD;
|
||||
scrollbar-highlight-color:#F0F0EE;
|
||||
scrollbar-shadow-color:#F0F0EE;
|
||||
scrollbar-track-color:#F5F5F5;
|
||||
background:#F0F0EE;
|
||||
padding:0;
|
||||
margin:8px 8px 0 8px;
|
||||
}
|
||||
|
||||
html {background:#F0F0EE;}
|
||||
td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
||||
textarea {resize:none;outline:none;}
|
||||
a:link, a:visited {color:black;}
|
||||
a:hover {color:#2B6FB6;}
|
||||
.nowrap {white-space: nowrap}
|
||||
|
||||
/* Forms */
|
||||
fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
|
||||
legend {color:#2B6FB6; font-weight:bold;}
|
||||
label.msg {display:none;}
|
||||
label.invalid {color:#EE0000; display:inline;}
|
||||
input.invalid {border:1px solid #EE0000;}
|
||||
input {background:#FFF; border:1px solid #CCC;}
|
||||
input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
||||
input, select, textarea {border:1px solid #808080;}
|
||||
input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
|
||||
input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
|
||||
.input_noborder {border:0;}
|
||||
|
||||
/* Buttons */
|
||||
#insert, #cancel, input.button, .updateButton {
|
||||
border:0; margin:0; padding:0;
|
||||
font-weight:bold;
|
||||
width:94px; height:26px;
|
||||
background:url(../default/img/buttons.png) 0 -26px;
|
||||
cursor:pointer;
|
||||
padding-bottom:2px;
|
||||
float:left;
|
||||
}
|
||||
|
||||
#insert {background:url(../default/img/buttons.png) 0 -52px}
|
||||
#cancel {background:url(../default/img/buttons.png) 0 0; float:right}
|
||||
|
||||
/* Browse */
|
||||
a.pickcolor, a.browse {text-decoration:none}
|
||||
a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
|
||||
.mceOldBoxModel a.browse span {width:22px; height:20px;}
|
||||
a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
|
||||
a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
||||
a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
|
||||
a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
|
||||
.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
|
||||
a.pickcolor:hover span {background-color:#B2BBD0;}
|
||||
a.pickcolor:hover span.disabled {}
|
||||
|
||||
/* Charmap */
|
||||
table.charmap {border:1px solid #AAA; text-align:center}
|
||||
td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
|
||||
#charmap a {display:block; color:#000; text-decoration:none; border:0}
|
||||
#charmap a:hover {background:#CCC;color:#2B6FB6}
|
||||
#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
|
||||
#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
|
||||
|
||||
/* Source */
|
||||
.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
|
||||
.mceActionPanel {margin-top:5px;}
|
||||
|
||||
/* Tabs classes */
|
||||
.tabs {width:100%; height:18px; line-height:normal; background:url(../default/img/tabs.gif) repeat-x 0 -72px;}
|
||||
.tabs ul {margin:0; padding:0; list-style:none;}
|
||||
.tabs li {float:left; background:url(../default/img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
|
||||
.tabs li.current {background:url(../default/img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
|
||||
.tabs span {float:left; display:block; background:url(../default/img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
|
||||
.tabs .current span {background:url(../default/img/tabs.gif) no-repeat right -54px;}
|
||||
.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
|
||||
.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
|
||||
|
||||
/* Panels */
|
||||
.panel_wrapper div.panel {display:none;}
|
||||
.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
|
||||
.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
|
||||
|
||||
/* Columns */
|
||||
.column {float:left;}
|
||||
.properties {width:100%;}
|
||||
.properties .column1 {}
|
||||
.properties .column2 {text-align:left;}
|
||||
|
||||
/* Titles */
|
||||
h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
|
||||
h3 {font-size:14px;}
|
||||
.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
|
||||
|
||||
/* Dialog specific */
|
||||
#link .panel_wrapper, #link div.current {height:125px;}
|
||||
#image .panel_wrapper, #image div.current {height:200px;}
|
||||
#plugintable thead {font-weight:bold; background:#DDD;}
|
||||
#plugintable, #about #plugintable td {border:1px solid #919B9C;}
|
||||
#plugintable {width:96%; margin-top:10px;}
|
||||
#pluginscontainer {height:290px; overflow:auto;}
|
||||
#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;}
|
||||
#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
|
||||
#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
|
||||
#colorpicker #light div {overflow:hidden;}
|
||||
#colorpicker #previewblock {float:right; padding-left:10px; height:20px;}
|
||||
#colorpicker .panel_wrapper div.current {height:175px;}
|
||||
#colorpicker #namedcolors {width:150px;}
|
||||
#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
|
||||
#colorpicker #colornamecontainer {margin-top:5px;}
|
||||
#colorpicker #picker_panel fieldset {margin:auto;width:325px;}
|
||||
|
||||
@@ -1,216 +1,216 @@
|
||||
/* Reset */
|
||||
.o2k7Skin table, .o2k7Skin tbody, .o2k7Skin a, .o2k7Skin img, .o2k7Skin tr, .o2k7Skin div, .o2k7Skin td, .o2k7Skin iframe, .o2k7Skin span, .o2k7Skin *, .o2k7Skin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left}
|
||||
.o2k7Skin a:hover, .o2k7Skin a:link, .o2k7Skin a:visited, .o2k7Skin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000}
|
||||
.o2k7Skin table td {vertical-align:middle}
|
||||
|
||||
/* Containers */
|
||||
.o2k7Skin table {background:transparent}
|
||||
.o2k7Skin iframe {display:block;}
|
||||
.o2k7Skin .mceToolbar {height:26px}
|
||||
|
||||
/* External */
|
||||
.o2k7Skin .mceExternalToolbar {position:absolute; border:1px solid #ABC6DD; border-bottom:0; display:none}
|
||||
.o2k7Skin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
|
||||
.o2k7Skin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0}
|
||||
|
||||
/* Layout */
|
||||
.o2k7Skin table.mceLayout {border:0; border-left:1px solid #ABC6DD; border-right:1px solid #ABC6DD}
|
||||
.o2k7Skin table.mceLayout tr.mceFirst td {border-top:1px solid #ABC6DD}
|
||||
.o2k7Skin table.mceLayout tr.mceLast td {border-bottom:1px solid #ABC6DD}
|
||||
.o2k7Skin table.mceToolbar, .o2k7Skin tr.mceFirst .mceToolbar tr td, .o2k7Skin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0}
|
||||
.o2k7Skin .mceIframeContainer {border-top:1px solid #ABC6DD; border-bottom:1px solid #ABC6DD}
|
||||
.o2k7Skin td.mceToolbar{background:#E5EFFD}
|
||||
.o2k7Skin .mceStatusbar {background:#E5EFFD; display:block; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; height:20px}
|
||||
.o2k7Skin .mceStatusbar div {float:left; padding:2px}
|
||||
.o2k7Skin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0}
|
||||
.o2k7Skin .mceStatusbar a:hover {text-decoration:underline}
|
||||
.o2k7Skin table.mceToolbar {margin-left:3px}
|
||||
.o2k7Skin .mceToolbar .mceToolbarStart span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px; margin-left:3px;}
|
||||
.o2k7Skin .mceToolbar td.mceFirst span {margin:0}
|
||||
.o2k7Skin .mceToolbar .mceToolbarEnd span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px}
|
||||
.o2k7Skin .mceToolbar .mceToolbarEndListBox span, .o2k7Skin .mceToolbar .mceToolbarStartListBox span {display:none}
|
||||
.o2k7Skin span.mceIcon, .o2k7Skin img.mceIcon {display:block; width:20px; height:20px}
|
||||
.o2k7Skin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px}
|
||||
.o2k7Skin td.mceCenter {text-align:center;}
|
||||
.o2k7Skin td.mceCenter table {margin:0 auto; text-align:left;}
|
||||
.o2k7Skin td.mceRight table {margin:0 0 0 auto;}
|
||||
|
||||
/* Button */
|
||||
.o2k7Skin .mceButton {display:block; background:url(img/button_bg.png); width:22px; height:22px}
|
||||
.o2k7Skin a.mceButton span, .o2k7Skin a.mceButton img {margin-left:1px}
|
||||
.o2k7Skin .mceOldBoxModel a.mceButton span, .o2k7Skin .mceOldBoxModel a.mceButton img {margin:0 0 0 1px}
|
||||
.o2k7Skin a.mceButtonEnabled:hover {background-color:#B2BBD0; background-position:0 -22px}
|
||||
.o2k7Skin a.mceButtonActive, .o2k7Skin a.mceButtonSelected {background-position:0 -44px}
|
||||
.o2k7Skin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
||||
.o2k7Skin .mceButtonLabeled {width:auto}
|
||||
.o2k7Skin .mceButtonLabeled span.mceIcon {float:left}
|
||||
.o2k7Skin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica}
|
||||
.o2k7Skin .mceButtonDisabled .mceButtonLabel {color:#888}
|
||||
|
||||
/* Separator */
|
||||
.o2k7Skin .mceSeparator {display:block; background:url(img/button_bg.png) -22px 0; width:5px; height:22px}
|
||||
|
||||
/* ListBox */
|
||||
.o2k7Skin .mceListBox {margin-left:3px}
|
||||
.o2k7Skin .mceListBox, .o2k7Skin .mceListBox a {display:block}
|
||||
.o2k7Skin .mceListBox .mceText {padding-left:4px; text-align:left; width:70px; border:1px solid #b3c7e1; border-right:0; background:#eaf2fb; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden}
|
||||
.o2k7Skin .mceListBox .mceOpen {width:14px; height:22px; background:url(img/button_bg.png) -66px 0}
|
||||
.o2k7Skin table.mceListBoxEnabled:hover .mceText, .o2k7Skin .mceListBoxHover .mceText, .o2k7Skin .mceListBoxSelected .mceText {background:#FFF}
|
||||
.o2k7Skin table.mceListBoxEnabled:hover .mceOpen, .o2k7Skin .mceListBoxHover .mceOpen, .o2k7Skin .mceListBoxSelected .mceOpen {background-position:-66px -22px}
|
||||
.o2k7Skin .mceListBoxDisabled .mceText {color:gray}
|
||||
.o2k7Skin .mceListBoxMenu {overflow:auto; overflow-x:hidden}
|
||||
.o2k7Skin .mceOldBoxModel .mceListBox .mceText {height:22px}
|
||||
.o2k7Skin select.mceListBox {font-family:Tahoma,Verdana,Arial,Helvetica; font-size:12px; border:1px solid #b3c7e1; background:#FFF;}
|
||||
|
||||
/* SplitButton */
|
||||
.o2k7Skin .mceSplitButton, .o2k7Skin .mceSplitButton a, .o2k7Skin .mceSplitButton span {display:block; height:22px; direction:ltr}
|
||||
.o2k7Skin .mceSplitButton {background:url(img/button_bg.png)}
|
||||
.o2k7Skin .mceSplitButton a.mceAction {width:22px}
|
||||
.o2k7Skin .mceSplitButton span.mceAction {width:22px; background-image:url(../../img/icons.gif)}
|
||||
.o2k7Skin .mceSplitButton a.mceOpen {width:10px; background:url(img/button_bg.png) -44px 0}
|
||||
.o2k7Skin .mceSplitButton span.mceOpen {display:none}
|
||||
.o2k7Skin table.mceSplitButtonEnabled:hover a.mceAction, .o2k7Skin .mceSplitButtonHover a.mceAction, .o2k7Skin .mceSplitButtonSelected {background:url(img/button_bg.png) 0 -22px}
|
||||
.o2k7Skin table.mceSplitButtonEnabled:hover a.mceOpen, .o2k7Skin .mceSplitButtonHover a.mceOpen, .o2k7Skin .mceSplitButtonSelected a.mceOpen {background-position:-44px -44px}
|
||||
.o2k7Skin .mceSplitButtonDisabled .mceAction {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
||||
.o2k7Skin .mceSplitButtonActive {background-position:0 -44px}
|
||||
|
||||
/* ColorSplitButton */
|
||||
.o2k7Skin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray}
|
||||
.o2k7Skin .mceColorSplitMenu td {padding:2px}
|
||||
.o2k7Skin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080}
|
||||
.o2k7Skin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
|
||||
.o2k7Skin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
|
||||
.o2k7Skin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2}
|
||||
.o2k7Skin a.mceMoreColors:hover {border:1px solid #0A246A}
|
||||
.o2k7Skin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a;overflow:hidden}
|
||||
.o2k7Skin .mce_forecolor span.mceAction, .o2k7Skin .mce_backcolor span.mceAction {height:15px;overflow:hidden}
|
||||
|
||||
/* Menu */
|
||||
.o2k7Skin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #ABC6DD}
|
||||
.o2k7Skin .mceNoIcons span.mceIcon {width:0;}
|
||||
.o2k7Skin .mceNoIcons a .mceText {padding-left:10px}
|
||||
.o2k7Skin .mceMenu table {background:#FFF}
|
||||
.o2k7Skin .mceMenu a, .o2k7Skin .mceMenu span, .o2k7Skin .mceMenu {display:block}
|
||||
.o2k7Skin .mceMenu td {height:20px}
|
||||
.o2k7Skin .mceMenu a {position:relative;padding:3px 0 4px 0}
|
||||
.o2k7Skin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block}
|
||||
.o2k7Skin .mceMenu span.mceText, .o2k7Skin .mceMenu .mcePreview {font-size:11px}
|
||||
.o2k7Skin .mceMenu pre.mceText {font-family:Monospace}
|
||||
.o2k7Skin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;}
|
||||
.o2k7Skin .mceMenu .mceMenuItemEnabled a:hover, .o2k7Skin .mceMenu .mceMenuItemActive {background-color:#dbecf3}
|
||||
.o2k7Skin td.mceMenuItemSeparator {background:#DDD; height:1px}
|
||||
.o2k7Skin .mceMenuItemTitle a {border:0; background:#E5EFFD; border-bottom:1px solid #ABC6DD}
|
||||
.o2k7Skin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px}
|
||||
.o2k7Skin .mceMenuItemDisabled .mceText {color:#888}
|
||||
.o2k7Skin .mceMenuItemSelected .mceIcon {background:url(../default/img/menu_check.gif)}
|
||||
.o2k7Skin .mceNoIcons .mceMenuItemSelected a {background:url(../default/img/menu_arrow.gif) no-repeat -6px center}
|
||||
.o2k7Skin .mceMenu span.mceMenuLine {display:none}
|
||||
.o2k7Skin .mceMenuItemSub a {background:url(../default/img/menu_arrow.gif) no-repeat top right;}
|
||||
|
||||
/* Progress,Resize */
|
||||
.o2k7Skin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF}
|
||||
.o2k7Skin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
|
||||
|
||||
/* Formats */
|
||||
.o2k7Skin .mce_formatPreview a {font-size:10px}
|
||||
.o2k7Skin .mce_p span.mceText {}
|
||||
.o2k7Skin .mce_address span.mceText {font-style:italic}
|
||||
.o2k7Skin .mce_pre span.mceText {font-family:monospace}
|
||||
.o2k7Skin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
|
||||
.o2k7Skin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
|
||||
.o2k7Skin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
|
||||
.o2k7Skin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
|
||||
.o2k7Skin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
|
||||
.o2k7Skin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
|
||||
|
||||
/* Theme */
|
||||
.o2k7Skin span.mce_bold {background-position:0 0}
|
||||
.o2k7Skin span.mce_italic {background-position:-60px 0}
|
||||
.o2k7Skin span.mce_underline {background-position:-140px 0}
|
||||
.o2k7Skin span.mce_strikethrough {background-position:-120px 0}
|
||||
.o2k7Skin span.mce_undo {background-position:-160px 0}
|
||||
.o2k7Skin span.mce_redo {background-position:-100px 0}
|
||||
.o2k7Skin span.mce_cleanup {background-position:-40px 0}
|
||||
.o2k7Skin span.mce_bullist {background-position:-20px 0}
|
||||
.o2k7Skin span.mce_numlist {background-position:-80px 0}
|
||||
.o2k7Skin span.mce_justifyleft {background-position:-460px 0}
|
||||
.o2k7Skin span.mce_justifyright {background-position:-480px 0}
|
||||
.o2k7Skin span.mce_justifycenter {background-position:-420px 0}
|
||||
.o2k7Skin span.mce_justifyfull {background-position:-440px 0}
|
||||
.o2k7Skin span.mce_anchor {background-position:-200px 0}
|
||||
.o2k7Skin span.mce_indent {background-position:-400px 0}
|
||||
.o2k7Skin span.mce_outdent {background-position:-540px 0}
|
||||
.o2k7Skin span.mce_link {background-position:-500px 0}
|
||||
.o2k7Skin span.mce_unlink {background-position:-640px 0}
|
||||
.o2k7Skin span.mce_sub {background-position:-600px 0}
|
||||
.o2k7Skin span.mce_sup {background-position:-620px 0}
|
||||
.o2k7Skin span.mce_removeformat {background-position:-580px 0}
|
||||
.o2k7Skin span.mce_newdocument {background-position:-520px 0}
|
||||
.o2k7Skin span.mce_image {background-position:-380px 0}
|
||||
.o2k7Skin span.mce_help {background-position:-340px 0}
|
||||
.o2k7Skin span.mce_code {background-position:-260px 0}
|
||||
.o2k7Skin span.mce_hr {background-position:-360px 0}
|
||||
.o2k7Skin span.mce_visualaid {background-position:-660px 0}
|
||||
.o2k7Skin span.mce_charmap {background-position:-240px 0}
|
||||
.o2k7Skin span.mce_paste {background-position:-560px 0}
|
||||
.o2k7Skin span.mce_copy {background-position:-700px 0}
|
||||
.o2k7Skin span.mce_cut {background-position:-680px 0}
|
||||
.o2k7Skin span.mce_blockquote {background-position:-220px 0}
|
||||
.o2k7Skin .mce_forecolor span.mceAction {background-position:-720px 0}
|
||||
.o2k7Skin .mce_backcolor span.mceAction {background-position:-760px 0}
|
||||
.o2k7Skin span.mce_forecolorpicker {background-position:-720px 0}
|
||||
.o2k7Skin span.mce_backcolorpicker {background-position:-760px 0}
|
||||
|
||||
/* Plugins */
|
||||
.o2k7Skin span.mce_advhr {background-position:-0px -20px}
|
||||
.o2k7Skin span.mce_ltr {background-position:-20px -20px}
|
||||
.o2k7Skin span.mce_rtl {background-position:-40px -20px}
|
||||
.o2k7Skin span.mce_emotions {background-position:-60px -20px}
|
||||
.o2k7Skin span.mce_fullpage {background-position:-80px -20px}
|
||||
.o2k7Skin span.mce_fullscreen {background-position:-100px -20px}
|
||||
.o2k7Skin span.mce_iespell {background-position:-120px -20px}
|
||||
.o2k7Skin span.mce_insertdate {background-position:-140px -20px}
|
||||
.o2k7Skin span.mce_inserttime {background-position:-160px -20px}
|
||||
.o2k7Skin span.mce_absolute {background-position:-180px -20px}
|
||||
.o2k7Skin span.mce_backward {background-position:-200px -20px}
|
||||
.o2k7Skin span.mce_forward {background-position:-220px -20px}
|
||||
.o2k7Skin span.mce_insert_layer {background-position:-240px -20px}
|
||||
.o2k7Skin span.mce_insertlayer {background-position:-260px -20px}
|
||||
.o2k7Skin span.mce_movebackward {background-position:-280px -20px}
|
||||
.o2k7Skin span.mce_moveforward {background-position:-300px -20px}
|
||||
.o2k7Skin span.mce_media {background-position:-320px -20px}
|
||||
.o2k7Skin span.mce_nonbreaking {background-position:-340px -20px}
|
||||
.o2k7Skin span.mce_pastetext {background-position:-360px -20px}
|
||||
.o2k7Skin span.mce_pasteword {background-position:-380px -20px}
|
||||
.o2k7Skin span.mce_selectall {background-position:-400px -20px}
|
||||
.o2k7Skin span.mce_preview {background-position:-420px -20px}
|
||||
.o2k7Skin span.mce_print {background-position:-440px -20px}
|
||||
.o2k7Skin span.mce_cancel {background-position:-460px -20px}
|
||||
.o2k7Skin span.mce_save {background-position:-480px -20px}
|
||||
.o2k7Skin span.mce_replace {background-position:-500px -20px}
|
||||
.o2k7Skin span.mce_search {background-position:-520px -20px}
|
||||
.o2k7Skin span.mce_styleprops {background-position:-560px -20px}
|
||||
.o2k7Skin span.mce_table {background-position:-580px -20px}
|
||||
.o2k7Skin span.mce_cell_props {background-position:-600px -20px}
|
||||
.o2k7Skin span.mce_delete_table {background-position:-620px -20px}
|
||||
.o2k7Skin span.mce_delete_col {background-position:-640px -20px}
|
||||
.o2k7Skin span.mce_delete_row {background-position:-660px -20px}
|
||||
.o2k7Skin span.mce_col_after {background-position:-680px -20px}
|
||||
.o2k7Skin span.mce_col_before {background-position:-700px -20px}
|
||||
.o2k7Skin span.mce_row_after {background-position:-720px -20px}
|
||||
.o2k7Skin span.mce_row_before {background-position:-740px -20px}
|
||||
.o2k7Skin span.mce_merge_cells {background-position:-760px -20px}
|
||||
.o2k7Skin span.mce_table_props {background-position:-980px -20px}
|
||||
.o2k7Skin span.mce_row_props {background-position:-780px -20px}
|
||||
.o2k7Skin span.mce_split_cells {background-position:-800px -20px}
|
||||
.o2k7Skin span.mce_template {background-position:-820px -20px}
|
||||
.o2k7Skin span.mce_visualchars {background-position:-840px -20px}
|
||||
.o2k7Skin span.mce_abbr {background-position:-860px -20px}
|
||||
.o2k7Skin span.mce_acronym {background-position:-880px -20px}
|
||||
.o2k7Skin span.mce_attribs {background-position:-900px -20px}
|
||||
.o2k7Skin span.mce_cite {background-position:-920px -20px}
|
||||
.o2k7Skin span.mce_del {background-position:-940px -20px}
|
||||
.o2k7Skin span.mce_ins {background-position:-960px -20px}
|
||||
.o2k7Skin span.mce_pagebreak {background-position:0 -40px}
|
||||
.o2k7Skin span.mce_restoredraft {background-position:-20px -40px}
|
||||
.o2k7Skin span.mce_spellchecker {background-position:-540px -20px}
|
||||
/* Reset */
|
||||
.o2k7Skin table, .o2k7Skin tbody, .o2k7Skin a, .o2k7Skin img, .o2k7Skin tr, .o2k7Skin div, .o2k7Skin td, .o2k7Skin iframe, .o2k7Skin span, .o2k7Skin *, .o2k7Skin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left}
|
||||
.o2k7Skin a:hover, .o2k7Skin a:link, .o2k7Skin a:visited, .o2k7Skin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000}
|
||||
.o2k7Skin table td {vertical-align:middle}
|
||||
|
||||
/* Containers */
|
||||
.o2k7Skin table {background:transparent}
|
||||
.o2k7Skin iframe {display:block;}
|
||||
.o2k7Skin .mceToolbar {height:26px}
|
||||
|
||||
/* External */
|
||||
.o2k7Skin .mceExternalToolbar {position:absolute; border:1px solid #ABC6DD; border-bottom:0; display:none}
|
||||
.o2k7Skin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
|
||||
.o2k7Skin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0}
|
||||
|
||||
/* Layout */
|
||||
.o2k7Skin table.mceLayout {border:0; border-left:1px solid #ABC6DD; border-right:1px solid #ABC6DD}
|
||||
.o2k7Skin table.mceLayout tr.mceFirst td {border-top:1px solid #ABC6DD}
|
||||
.o2k7Skin table.mceLayout tr.mceLast td {border-bottom:1px solid #ABC6DD}
|
||||
.o2k7Skin table.mceToolbar, .o2k7Skin tr.mceFirst .mceToolbar tr td, .o2k7Skin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0}
|
||||
.o2k7Skin .mceIframeContainer {border-top:1px solid #ABC6DD; border-bottom:1px solid #ABC6DD}
|
||||
.o2k7Skin td.mceToolbar{background:#E5EFFD}
|
||||
.o2k7Skin .mceStatusbar {background:#E5EFFD; display:block; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; height:20px}
|
||||
.o2k7Skin .mceStatusbar div {float:left; padding:2px}
|
||||
.o2k7Skin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0}
|
||||
.o2k7Skin .mceStatusbar a:hover {text-decoration:underline}
|
||||
.o2k7Skin table.mceToolbar {margin-left:3px}
|
||||
.o2k7Skin .mceToolbar .mceToolbarStart span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px; margin-left:3px;}
|
||||
.o2k7Skin .mceToolbar td.mceFirst span {margin:0}
|
||||
.o2k7Skin .mceToolbar .mceToolbarEnd span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px}
|
||||
.o2k7Skin .mceToolbar .mceToolbarEndListBox span, .o2k7Skin .mceToolbar .mceToolbarStartListBox span {display:none}
|
||||
.o2k7Skin span.mceIcon, .o2k7Skin img.mceIcon {display:block; width:20px; height:20px}
|
||||
.o2k7Skin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px}
|
||||
.o2k7Skin td.mceCenter {text-align:center;}
|
||||
.o2k7Skin td.mceCenter table {margin:0 auto; text-align:left;}
|
||||
.o2k7Skin td.mceRight table {margin:0 0 0 auto;}
|
||||
|
||||
/* Button */
|
||||
.o2k7Skin .mceButton {display:block; background:url(img/button_bg.png); width:22px; height:22px}
|
||||
.o2k7Skin a.mceButton span, .o2k7Skin a.mceButton img {margin-left:1px}
|
||||
.o2k7Skin .mceOldBoxModel a.mceButton span, .o2k7Skin .mceOldBoxModel a.mceButton img {margin:0 0 0 1px}
|
||||
.o2k7Skin a.mceButtonEnabled:hover {background-color:#B2BBD0; background-position:0 -22px}
|
||||
.o2k7Skin a.mceButtonActive, .o2k7Skin a.mceButtonSelected {background-position:0 -44px}
|
||||
.o2k7Skin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
||||
.o2k7Skin .mceButtonLabeled {width:auto}
|
||||
.o2k7Skin .mceButtonLabeled span.mceIcon {float:left}
|
||||
.o2k7Skin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica}
|
||||
.o2k7Skin .mceButtonDisabled .mceButtonLabel {color:#888}
|
||||
|
||||
/* Separator */
|
||||
.o2k7Skin .mceSeparator {display:block; background:url(img/button_bg.png) -22px 0; width:5px; height:22px}
|
||||
|
||||
/* ListBox */
|
||||
.o2k7Skin .mceListBox {margin-left:3px}
|
||||
.o2k7Skin .mceListBox, .o2k7Skin .mceListBox a {display:block}
|
||||
.o2k7Skin .mceListBox .mceText {padding-left:4px; text-align:left; width:70px; border:1px solid #b3c7e1; border-right:0; background:#eaf2fb; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden}
|
||||
.o2k7Skin .mceListBox .mceOpen {width:14px; height:22px; background:url(img/button_bg.png) -66px 0}
|
||||
.o2k7Skin table.mceListBoxEnabled:hover .mceText, .o2k7Skin .mceListBoxHover .mceText, .o2k7Skin .mceListBoxSelected .mceText {background:#FFF}
|
||||
.o2k7Skin table.mceListBoxEnabled:hover .mceOpen, .o2k7Skin .mceListBoxHover .mceOpen, .o2k7Skin .mceListBoxSelected .mceOpen {background-position:-66px -22px}
|
||||
.o2k7Skin .mceListBoxDisabled .mceText {color:gray}
|
||||
.o2k7Skin .mceListBoxMenu {overflow:auto; overflow-x:hidden}
|
||||
.o2k7Skin .mceOldBoxModel .mceListBox .mceText {height:22px}
|
||||
.o2k7Skin select.mceListBox {font-family:Tahoma,Verdana,Arial,Helvetica; font-size:12px; border:1px solid #b3c7e1; background:#FFF;}
|
||||
|
||||
/* SplitButton */
|
||||
.o2k7Skin .mceSplitButton, .o2k7Skin .mceSplitButton a, .o2k7Skin .mceSplitButton span {display:block; height:22px; direction:ltr}
|
||||
.o2k7Skin .mceSplitButton {background:url(img/button_bg.png)}
|
||||
.o2k7Skin .mceSplitButton a.mceAction {width:22px}
|
||||
.o2k7Skin .mceSplitButton span.mceAction {width:22px; background-image:url(../../img/icons.gif)}
|
||||
.o2k7Skin .mceSplitButton a.mceOpen {width:10px; background:url(img/button_bg.png) -44px 0}
|
||||
.o2k7Skin .mceSplitButton span.mceOpen {display:none}
|
||||
.o2k7Skin table.mceSplitButtonEnabled:hover a.mceAction, .o2k7Skin .mceSplitButtonHover a.mceAction, .o2k7Skin .mceSplitButtonSelected {background:url(img/button_bg.png) 0 -22px}
|
||||
.o2k7Skin table.mceSplitButtonEnabled:hover a.mceOpen, .o2k7Skin .mceSplitButtonHover a.mceOpen, .o2k7Skin .mceSplitButtonSelected a.mceOpen {background-position:-44px -44px}
|
||||
.o2k7Skin .mceSplitButtonDisabled .mceAction {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
||||
.o2k7Skin .mceSplitButtonActive {background-position:0 -44px}
|
||||
|
||||
/* ColorSplitButton */
|
||||
.o2k7Skin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray}
|
||||
.o2k7Skin .mceColorSplitMenu td {padding:2px}
|
||||
.o2k7Skin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080}
|
||||
.o2k7Skin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
|
||||
.o2k7Skin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
|
||||
.o2k7Skin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2}
|
||||
.o2k7Skin a.mceMoreColors:hover {border:1px solid #0A246A}
|
||||
.o2k7Skin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a;overflow:hidden}
|
||||
.o2k7Skin .mce_forecolor span.mceAction, .o2k7Skin .mce_backcolor span.mceAction {height:15px;overflow:hidden}
|
||||
|
||||
/* Menu */
|
||||
.o2k7Skin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #ABC6DD}
|
||||
.o2k7Skin .mceNoIcons span.mceIcon {width:0;}
|
||||
.o2k7Skin .mceNoIcons a .mceText {padding-left:10px}
|
||||
.o2k7Skin .mceMenu table {background:#FFF}
|
||||
.o2k7Skin .mceMenu a, .o2k7Skin .mceMenu span, .o2k7Skin .mceMenu {display:block}
|
||||
.o2k7Skin .mceMenu td {height:20px}
|
||||
.o2k7Skin .mceMenu a {position:relative;padding:3px 0 4px 0}
|
||||
.o2k7Skin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block}
|
||||
.o2k7Skin .mceMenu span.mceText, .o2k7Skin .mceMenu .mcePreview {font-size:11px}
|
||||
.o2k7Skin .mceMenu pre.mceText {font-family:Monospace}
|
||||
.o2k7Skin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;}
|
||||
.o2k7Skin .mceMenu .mceMenuItemEnabled a:hover, .o2k7Skin .mceMenu .mceMenuItemActive {background-color:#dbecf3}
|
||||
.o2k7Skin td.mceMenuItemSeparator {background:#DDD; height:1px}
|
||||
.o2k7Skin .mceMenuItemTitle a {border:0; background:#E5EFFD; border-bottom:1px solid #ABC6DD}
|
||||
.o2k7Skin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px}
|
||||
.o2k7Skin .mceMenuItemDisabled .mceText {color:#888}
|
||||
.o2k7Skin .mceMenuItemSelected .mceIcon {background:url(../default/img/menu_check.gif)}
|
||||
.o2k7Skin .mceNoIcons .mceMenuItemSelected a {background:url(../default/img/menu_arrow.gif) no-repeat -6px center}
|
||||
.o2k7Skin .mceMenu span.mceMenuLine {display:none}
|
||||
.o2k7Skin .mceMenuItemSub a {background:url(../default/img/menu_arrow.gif) no-repeat top right;}
|
||||
|
||||
/* Progress,Resize */
|
||||
.o2k7Skin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF}
|
||||
.o2k7Skin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
|
||||
|
||||
/* Formats */
|
||||
.o2k7Skin .mce_formatPreview a {font-size:10px}
|
||||
.o2k7Skin .mce_p span.mceText {}
|
||||
.o2k7Skin .mce_address span.mceText {font-style:italic}
|
||||
.o2k7Skin .mce_pre span.mceText {font-family:monospace}
|
||||
.o2k7Skin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
|
||||
.o2k7Skin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
|
||||
.o2k7Skin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
|
||||
.o2k7Skin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
|
||||
.o2k7Skin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
|
||||
.o2k7Skin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
|
||||
|
||||
/* Theme */
|
||||
.o2k7Skin span.mce_bold {background-position:0 0}
|
||||
.o2k7Skin span.mce_italic {background-position:-60px 0}
|
||||
.o2k7Skin span.mce_underline {background-position:-140px 0}
|
||||
.o2k7Skin span.mce_strikethrough {background-position:-120px 0}
|
||||
.o2k7Skin span.mce_undo {background-position:-160px 0}
|
||||
.o2k7Skin span.mce_redo {background-position:-100px 0}
|
||||
.o2k7Skin span.mce_cleanup {background-position:-40px 0}
|
||||
.o2k7Skin span.mce_bullist {background-position:-20px 0}
|
||||
.o2k7Skin span.mce_numlist {background-position:-80px 0}
|
||||
.o2k7Skin span.mce_justifyleft {background-position:-460px 0}
|
||||
.o2k7Skin span.mce_justifyright {background-position:-480px 0}
|
||||
.o2k7Skin span.mce_justifycenter {background-position:-420px 0}
|
||||
.o2k7Skin span.mce_justifyfull {background-position:-440px 0}
|
||||
.o2k7Skin span.mce_anchor {background-position:-200px 0}
|
||||
.o2k7Skin span.mce_indent {background-position:-400px 0}
|
||||
.o2k7Skin span.mce_outdent {background-position:-540px 0}
|
||||
.o2k7Skin span.mce_link {background-position:-500px 0}
|
||||
.o2k7Skin span.mce_unlink {background-position:-640px 0}
|
||||
.o2k7Skin span.mce_sub {background-position:-600px 0}
|
||||
.o2k7Skin span.mce_sup {background-position:-620px 0}
|
||||
.o2k7Skin span.mce_removeformat {background-position:-580px 0}
|
||||
.o2k7Skin span.mce_newdocument {background-position:-520px 0}
|
||||
.o2k7Skin span.mce_image {background-position:-380px 0}
|
||||
.o2k7Skin span.mce_help {background-position:-340px 0}
|
||||
.o2k7Skin span.mce_code {background-position:-260px 0}
|
||||
.o2k7Skin span.mce_hr {background-position:-360px 0}
|
||||
.o2k7Skin span.mce_visualaid {background-position:-660px 0}
|
||||
.o2k7Skin span.mce_charmap {background-position:-240px 0}
|
||||
.o2k7Skin span.mce_paste {background-position:-560px 0}
|
||||
.o2k7Skin span.mce_copy {background-position:-700px 0}
|
||||
.o2k7Skin span.mce_cut {background-position:-680px 0}
|
||||
.o2k7Skin span.mce_blockquote {background-position:-220px 0}
|
||||
.o2k7Skin .mce_forecolor span.mceAction {background-position:-720px 0}
|
||||
.o2k7Skin .mce_backcolor span.mceAction {background-position:-760px 0}
|
||||
.o2k7Skin span.mce_forecolorpicker {background-position:-720px 0}
|
||||
.o2k7Skin span.mce_backcolorpicker {background-position:-760px 0}
|
||||
|
||||
/* Plugins */
|
||||
.o2k7Skin span.mce_advhr {background-position:-0px -20px}
|
||||
.o2k7Skin span.mce_ltr {background-position:-20px -20px}
|
||||
.o2k7Skin span.mce_rtl {background-position:-40px -20px}
|
||||
.o2k7Skin span.mce_emotions {background-position:-60px -20px}
|
||||
.o2k7Skin span.mce_fullpage {background-position:-80px -20px}
|
||||
.o2k7Skin span.mce_fullscreen {background-position:-100px -20px}
|
||||
.o2k7Skin span.mce_iespell {background-position:-120px -20px}
|
||||
.o2k7Skin span.mce_insertdate {background-position:-140px -20px}
|
||||
.o2k7Skin span.mce_inserttime {background-position:-160px -20px}
|
||||
.o2k7Skin span.mce_absolute {background-position:-180px -20px}
|
||||
.o2k7Skin span.mce_backward {background-position:-200px -20px}
|
||||
.o2k7Skin span.mce_forward {background-position:-220px -20px}
|
||||
.o2k7Skin span.mce_insert_layer {background-position:-240px -20px}
|
||||
.o2k7Skin span.mce_insertlayer {background-position:-260px -20px}
|
||||
.o2k7Skin span.mce_movebackward {background-position:-280px -20px}
|
||||
.o2k7Skin span.mce_moveforward {background-position:-300px -20px}
|
||||
.o2k7Skin span.mce_media {background-position:-320px -20px}
|
||||
.o2k7Skin span.mce_nonbreaking {background-position:-340px -20px}
|
||||
.o2k7Skin span.mce_pastetext {background-position:-360px -20px}
|
||||
.o2k7Skin span.mce_pasteword {background-position:-380px -20px}
|
||||
.o2k7Skin span.mce_selectall {background-position:-400px -20px}
|
||||
.o2k7Skin span.mce_preview {background-position:-420px -20px}
|
||||
.o2k7Skin span.mce_print {background-position:-440px -20px}
|
||||
.o2k7Skin span.mce_cancel {background-position:-460px -20px}
|
||||
.o2k7Skin span.mce_save {background-position:-480px -20px}
|
||||
.o2k7Skin span.mce_replace {background-position:-500px -20px}
|
||||
.o2k7Skin span.mce_search {background-position:-520px -20px}
|
||||
.o2k7Skin span.mce_styleprops {background-position:-560px -20px}
|
||||
.o2k7Skin span.mce_table {background-position:-580px -20px}
|
||||
.o2k7Skin span.mce_cell_props {background-position:-600px -20px}
|
||||
.o2k7Skin span.mce_delete_table {background-position:-620px -20px}
|
||||
.o2k7Skin span.mce_delete_col {background-position:-640px -20px}
|
||||
.o2k7Skin span.mce_delete_row {background-position:-660px -20px}
|
||||
.o2k7Skin span.mce_col_after {background-position:-680px -20px}
|
||||
.o2k7Skin span.mce_col_before {background-position:-700px -20px}
|
||||
.o2k7Skin span.mce_row_after {background-position:-720px -20px}
|
||||
.o2k7Skin span.mce_row_before {background-position:-740px -20px}
|
||||
.o2k7Skin span.mce_merge_cells {background-position:-760px -20px}
|
||||
.o2k7Skin span.mce_table_props {background-position:-980px -20px}
|
||||
.o2k7Skin span.mce_row_props {background-position:-780px -20px}
|
||||
.o2k7Skin span.mce_split_cells {background-position:-800px -20px}
|
||||
.o2k7Skin span.mce_template {background-position:-820px -20px}
|
||||
.o2k7Skin span.mce_visualchars {background-position:-840px -20px}
|
||||
.o2k7Skin span.mce_abbr {background-position:-860px -20px}
|
||||
.o2k7Skin span.mce_acronym {background-position:-880px -20px}
|
||||
.o2k7Skin span.mce_attribs {background-position:-900px -20px}
|
||||
.o2k7Skin span.mce_cite {background-position:-920px -20px}
|
||||
.o2k7Skin span.mce_del {background-position:-940px -20px}
|
||||
.o2k7Skin span.mce_ins {background-position:-960px -20px}
|
||||
.o2k7Skin span.mce_pagebreak {background-position:0 -40px}
|
||||
.o2k7Skin span.mce_restoredraft {background-position:-20px -40px}
|
||||
.o2k7Skin span.mce_spellchecker {background-position:-540px -20px}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/* Black */
|
||||
.o2k7SkinBlack .mceToolbar .mceToolbarStart span, .o2k7SkinBlack .mceToolbar .mceToolbarEnd span, .o2k7SkinBlack .mceButton, .o2k7SkinBlack .mceSplitButton, .o2k7SkinBlack .mceSeparator, .o2k7SkinBlack .mceSplitButton a.mceOpen, .o2k7SkinBlack .mceListBox a.mceOpen {background-image:url(img/button_bg_black.png)}
|
||||
.o2k7SkinBlack td.mceToolbar, .o2k7SkinBlack td.mceStatusbar, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack .mceMenuItemTitle span.mceText, .o2k7SkinBlack .mceStatusbar div, .o2k7SkinBlack .mceStatusbar span, .o2k7SkinBlack .mceStatusbar a {background:#535353; color:#FFF}
|
||||
.o2k7SkinBlack table.mceListBoxEnabled .mceText, o2k7SkinBlack .mceListBox .mceText {background:#FFF; border:1px solid #CBCFD4; border-bottom-color:#989FA9; border-right:0}
|
||||
.o2k7SkinBlack table.mceListBoxEnabled:hover .mceText, .o2k7SkinBlack .mceListBoxHover .mceText, .o2k7SkinBlack .mceListBoxSelected .mceText {background:#FFF; border:1px solid #FFBD69; border-right:0}
|
||||
.o2k7SkinBlack .mceExternalToolbar, .o2k7SkinBlack .mceListBox .mceText, .o2k7SkinBlack div.mceMenu, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceFirst td, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceLast td, .o2k7SkinBlack .mceIframeContainer {border-color: #535353;}
|
||||
.o2k7SkinBlack table.mceSplitButtonEnabled:hover a.mceAction, .o2k7SkinBlack .mceSplitButtonHover a.mceAction, .o2k7SkinBlack .mceSplitButtonSelected {background-image:url(img/button_bg_black.png)}
|
||||
/* Black */
|
||||
.o2k7SkinBlack .mceToolbar .mceToolbarStart span, .o2k7SkinBlack .mceToolbar .mceToolbarEnd span, .o2k7SkinBlack .mceButton, .o2k7SkinBlack .mceSplitButton, .o2k7SkinBlack .mceSeparator, .o2k7SkinBlack .mceSplitButton a.mceOpen, .o2k7SkinBlack .mceListBox a.mceOpen {background-image:url(img/button_bg_black.png)}
|
||||
.o2k7SkinBlack td.mceToolbar, .o2k7SkinBlack td.mceStatusbar, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack .mceMenuItemTitle span.mceText, .o2k7SkinBlack .mceStatusbar div, .o2k7SkinBlack .mceStatusbar span, .o2k7SkinBlack .mceStatusbar a {background:#535353; color:#FFF}
|
||||
.o2k7SkinBlack table.mceListBoxEnabled .mceText, o2k7SkinBlack .mceListBox .mceText {background:#FFF; border:1px solid #CBCFD4; border-bottom-color:#989FA9; border-right:0}
|
||||
.o2k7SkinBlack table.mceListBoxEnabled:hover .mceText, .o2k7SkinBlack .mceListBoxHover .mceText, .o2k7SkinBlack .mceListBoxSelected .mceText {background:#FFF; border:1px solid #FFBD69; border-right:0}
|
||||
.o2k7SkinBlack .mceExternalToolbar, .o2k7SkinBlack .mceListBox .mceText, .o2k7SkinBlack div.mceMenu, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceFirst td, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceLast td, .o2k7SkinBlack .mceIframeContainer {border-color: #535353;}
|
||||
.o2k7SkinBlack table.mceSplitButtonEnabled:hover a.mceAction, .o2k7SkinBlack .mceSplitButtonHover a.mceAction, .o2k7SkinBlack .mceSplitButtonSelected {background-image:url(img/button_bg_black.png)}
|
||||
.o2k7SkinBlack .mceMenu .mceMenuItemEnabled a:hover, .o2k7SkinBlack .mceMenu .mceMenuItemActive {background-color:#FFE7A1}
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Silver */
|
||||
.o2k7SkinSilver .mceToolbar .mceToolbarStart span, .o2k7SkinSilver .mceButton, .o2k7SkinSilver .mceSplitButton, .o2k7SkinSilver .mceSeparator, .o2k7SkinSilver .mceSplitButton a.mceOpen, .o2k7SkinSilver .mceListBox a.mceOpen {background-image:url(img/button_bg_silver.png)}
|
||||
.o2k7SkinSilver td.mceToolbar, .o2k7SkinSilver td.mceStatusbar, .o2k7SkinSilver .mceMenuItemTitle a {background:#eee}
|
||||
.o2k7SkinSilver .mceListBox .mceText {background:#FFF}
|
||||
.o2k7SkinSilver .mceExternalToolbar, .o2k7SkinSilver .mceListBox .mceText, .o2k7SkinSilver div.mceMenu, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceFirst td, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceLast td, .o2k7SkinSilver .mceIframeContainer {border-color: #bbb}
|
||||
/* Silver */
|
||||
.o2k7SkinSilver .mceToolbar .mceToolbarStart span, .o2k7SkinSilver .mceButton, .o2k7SkinSilver .mceSplitButton, .o2k7SkinSilver .mceSeparator, .o2k7SkinSilver .mceSplitButton a.mceOpen, .o2k7SkinSilver .mceListBox a.mceOpen {background-image:url(img/button_bg_silver.png)}
|
||||
.o2k7SkinSilver td.mceToolbar, .o2k7SkinSilver td.mceStatusbar, .o2k7SkinSilver .mceMenuItemTitle a {background:#eee}
|
||||
.o2k7SkinSilver .mceListBox .mceText {background:#FFF}
|
||||
.o2k7SkinSilver .mceExternalToolbar, .o2k7SkinSilver .mceListBox .mceText, .o2k7SkinSilver div.mceMenu, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceFirst td, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceLast td, .o2k7SkinSilver .mceIframeContainer {border-color: #bbb}
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#advanced_dlg.code_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="js/source_editor.js"></script>
|
||||
</head>
|
||||
<body onresize="resizeInputs();" style="display:none; overflow:hidden;">
|
||||
<form name="source" onsubmit="saveContent();return false;" action="#">
|
||||
<div style="float: left" class="title"><label for="htmlSource">{#advanced_dlg.code_title}</label></div>
|
||||
|
||||
<div id="wrapline" style="float: right">
|
||||
<input type="checkbox" name="wraped" id="wraped" onclick="toggleWordWrap(this);" class="wordWrapCode" /><label for="wraped">{#advanced_dlg.code_wordwrap}</label>
|
||||
</div>
|
||||
|
||||
<br style="clear: both" />
|
||||
|
||||
<textarea name="htmlSource" id="htmlSource" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,monospace; font-size: 12px;" dir="ltr" wrap="off" class="mceFocus"></textarea>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<input type="submit" role="button" name="insert" value="{#update}" id="insert" />
|
||||
<input type="button" role="button" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" id="cancel" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#advanced_dlg.code_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="js/source_editor.js"></script>
|
||||
</head>
|
||||
<body onresize="resizeInputs();" style="display:none; overflow:hidden;">
|
||||
<form name="source" onsubmit="saveContent();return false;" action="#">
|
||||
<div style="float: left" class="title"><label for="htmlSource">{#advanced_dlg.code_title}</label></div>
|
||||
|
||||
<div id="wrapline" style="float: right">
|
||||
<input type="checkbox" name="wraped" id="wraped" onclick="toggleWordWrap(this);" class="wordWrapCode" /><label for="wraped">{#advanced_dlg.code_wordwrap}</label>
|
||||
</div>
|
||||
|
||||
<br style="clear: both" />
|
||||
|
||||
<textarea name="htmlSource" id="htmlSource" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,monospace; font-size: 12px;" dir="ltr" wrap="off" class="mceFocus"></textarea>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<input type="submit" role="button" name="insert" value="{#update}" id="insert" />
|
||||
<input type="button" role="button" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" id="cancel" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,70 +1,70 @@
|
||||
/**
|
||||
* editable_selects.js
|
||||
*
|
||||
* Copyright 2009, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://tinymce.moxiecode.com/license
|
||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||
*/
|
||||
|
||||
var TinyMCE_EditableSelects = {
|
||||
editSelectElm : null,
|
||||
|
||||
init : function() {
|
||||
var nl = document.getElementsByTagName("select"), i, d = document, o;
|
||||
|
||||
for (i=0; i<nl.length; i++) {
|
||||
if (nl[i].className.indexOf('mceEditableSelect') != -1) {
|
||||
o = new Option('(value)', '__mce_add_custom__');
|
||||
|
||||
o.className = 'mceAddSelectValue';
|
||||
|
||||
nl[i].options[nl[i].options.length] = o;
|
||||
nl[i].onchange = TinyMCE_EditableSelects.onChangeEditableSelect;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onChangeEditableSelect : function(e) {
|
||||
var d = document, ne, se = window.event ? window.event.srcElement : e.target;
|
||||
|
||||
if (se.options[se.selectedIndex].value == '__mce_add_custom__') {
|
||||
ne = d.createElement("input");
|
||||
ne.id = se.id + "_custom";
|
||||
ne.name = se.name + "_custom";
|
||||
ne.type = "text";
|
||||
|
||||
ne.style.width = se.offsetWidth + 'px';
|
||||
se.parentNode.insertBefore(ne, se);
|
||||
se.style.display = 'none';
|
||||
ne.focus();
|
||||
ne.onblur = TinyMCE_EditableSelects.onBlurEditableSelectInput;
|
||||
ne.onkeydown = TinyMCE_EditableSelects.onKeyDown;
|
||||
TinyMCE_EditableSelects.editSelectElm = se;
|
||||
}
|
||||
},
|
||||
|
||||
onBlurEditableSelectInput : function() {
|
||||
var se = TinyMCE_EditableSelects.editSelectElm;
|
||||
|
||||
if (se) {
|
||||
if (se.previousSibling.value != '') {
|
||||
addSelectValue(document.forms[0], se.id, se.previousSibling.value, se.previousSibling.value);
|
||||
selectByValue(document.forms[0], se.id, se.previousSibling.value);
|
||||
} else
|
||||
selectByValue(document.forms[0], se.id, '');
|
||||
|
||||
se.style.display = 'inline';
|
||||
se.parentNode.removeChild(se.previousSibling);
|
||||
TinyMCE_EditableSelects.editSelectElm = null;
|
||||
}
|
||||
},
|
||||
|
||||
onKeyDown : function(e) {
|
||||
e = e || window.event;
|
||||
|
||||
if (e.keyCode == 13)
|
||||
TinyMCE_EditableSelects.onBlurEditableSelectInput();
|
||||
}
|
||||
};
|
||||
/**
|
||||
* editable_selects.js
|
||||
*
|
||||
* Copyright 2009, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://tinymce.moxiecode.com/license
|
||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||
*/
|
||||
|
||||
var TinyMCE_EditableSelects = {
|
||||
editSelectElm : null,
|
||||
|
||||
init : function() {
|
||||
var nl = document.getElementsByTagName("select"), i, d = document, o;
|
||||
|
||||
for (i=0; i<nl.length; i++) {
|
||||
if (nl[i].className.indexOf('mceEditableSelect') != -1) {
|
||||
o = new Option('(value)', '__mce_add_custom__');
|
||||
|
||||
o.className = 'mceAddSelectValue';
|
||||
|
||||
nl[i].options[nl[i].options.length] = o;
|
||||
nl[i].onchange = TinyMCE_EditableSelects.onChangeEditableSelect;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onChangeEditableSelect : function(e) {
|
||||
var d = document, ne, se = window.event ? window.event.srcElement : e.target;
|
||||
|
||||
if (se.options[se.selectedIndex].value == '__mce_add_custom__') {
|
||||
ne = d.createElement("input");
|
||||
ne.id = se.id + "_custom";
|
||||
ne.name = se.name + "_custom";
|
||||
ne.type = "text";
|
||||
|
||||
ne.style.width = se.offsetWidth + 'px';
|
||||
se.parentNode.insertBefore(ne, se);
|
||||
se.style.display = 'none';
|
||||
ne.focus();
|
||||
ne.onblur = TinyMCE_EditableSelects.onBlurEditableSelectInput;
|
||||
ne.onkeydown = TinyMCE_EditableSelects.onKeyDown;
|
||||
TinyMCE_EditableSelects.editSelectElm = se;
|
||||
}
|
||||
},
|
||||
|
||||
onBlurEditableSelectInput : function() {
|
||||
var se = TinyMCE_EditableSelects.editSelectElm;
|
||||
|
||||
if (se) {
|
||||
if (se.previousSibling.value != '') {
|
||||
addSelectValue(document.forms[0], se.id, se.previousSibling.value, se.previousSibling.value);
|
||||
selectByValue(document.forms[0], se.id, se.previousSibling.value);
|
||||
} else
|
||||
selectByValue(document.forms[0], se.id, '');
|
||||
|
||||
se.style.display = 'inline';
|
||||
se.parentNode.removeChild(se.previousSibling);
|
||||
TinyMCE_EditableSelects.editSelectElm = null;
|
||||
}
|
||||
},
|
||||
|
||||
onKeyDown : function(e) {
|
||||
e = e || window.event;
|
||||
|
||||
if (e.keyCode == 13)
|
||||
TinyMCE_EditableSelects.onBlurEditableSelectInput();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,210 +1,210 @@
|
||||
/**
|
||||
* form_utils.js
|
||||
*
|
||||
* Copyright 2009, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://tinymce.moxiecode.com/license
|
||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||
*/
|
||||
|
||||
var themeBaseURL = tinyMCEPopup.editor.baseURI.toAbsolute('themes/' + tinyMCEPopup.getParam("theme"));
|
||||
|
||||
function getColorPickerHTML(id, target_form_element) {
|
||||
var h = "", dom = tinyMCEPopup.dom;
|
||||
|
||||
if (label = dom.select('label[for=' + target_form_element + ']')[0]) {
|
||||
label.id = label.id || dom.uniqueId();
|
||||
}
|
||||
|
||||
h += '<a role="button" aria-labelledby="' + id + '_label" id="' + id + '_link" href="javascript:;" onclick="tinyMCEPopup.pickColor(event,\'' + target_form_element +'\');" onmousedown="return false;" class="pickcolor">';
|
||||
h += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '"> <span id="' + id + '_label" class="mceVoiceLabel mceIconOnly" style="display:none;">' + tinyMCEPopup.getLang('browse') + '</span></span></a>';
|
||||
|
||||
return h;
|
||||
}
|
||||
|
||||
function updateColor(img_id, form_element_id) {
|
||||
document.getElementById(img_id).style.backgroundColor = document.forms[0].elements[form_element_id].value;
|
||||
}
|
||||
|
||||
function setBrowserDisabled(id, state) {
|
||||
var img = document.getElementById(id);
|
||||
var lnk = document.getElementById(id + "_link");
|
||||
|
||||
if (lnk) {
|
||||
if (state) {
|
||||
lnk.setAttribute("realhref", lnk.getAttribute("href"));
|
||||
lnk.removeAttribute("href");
|
||||
tinyMCEPopup.dom.addClass(img, 'disabled');
|
||||
} else {
|
||||
if (lnk.getAttribute("realhref"))
|
||||
lnk.setAttribute("href", lnk.getAttribute("realhref"));
|
||||
|
||||
tinyMCEPopup.dom.removeClass(img, 'disabled');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getBrowserHTML(id, target_form_element, type, prefix) {
|
||||
var option = prefix + "_" + type + "_browser_callback", cb, html;
|
||||
|
||||
cb = tinyMCEPopup.getParam(option, tinyMCEPopup.getParam("file_browser_callback"));
|
||||
|
||||
if (!cb)
|
||||
return "";
|
||||
|
||||
html = "";
|
||||
html += '<a id="' + id + '_link" href="javascript:openBrowser(\'' + id + '\',\'' + target_form_element + '\', \'' + type + '\',\'' + option + '\');" onmousedown="return false;" class="browse">';
|
||||
html += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '"> </span></a>';
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
function openBrowser(img_id, target_form_element, type, option) {
|
||||
var img = document.getElementById(img_id);
|
||||
|
||||
if (img.className != "mceButtonDisabled")
|
||||
tinyMCEPopup.openBrowser(target_form_element, type, option);
|
||||
}
|
||||
|
||||
function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
|
||||
if (!form_obj || !form_obj.elements[field_name])
|
||||
return;
|
||||
|
||||
if (!value)
|
||||
value = "";
|
||||
|
||||
var sel = form_obj.elements[field_name];
|
||||
|
||||
var found = false;
|
||||
for (var i=0; i<sel.options.length; i++) {
|
||||
var option = sel.options[i];
|
||||
|
||||
if (option.value == value || (ignore_case && option.value.toLowerCase() == value.toLowerCase())) {
|
||||
option.selected = true;
|
||||
found = true;
|
||||
} else
|
||||
option.selected = false;
|
||||
}
|
||||
|
||||
if (!found && add_custom && value != '') {
|
||||
var option = new Option(value, value);
|
||||
option.selected = true;
|
||||
sel.options[sel.options.length] = option;
|
||||
sel.selectedIndex = sel.options.length - 1;
|
||||
}
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
function getSelectValue(form_obj, field_name) {
|
||||
var elm = form_obj.elements[field_name];
|
||||
|
||||
if (elm == null || elm.options == null || elm.selectedIndex === -1)
|
||||
return "";
|
||||
|
||||
return elm.options[elm.selectedIndex].value;
|
||||
}
|
||||
|
||||
function addSelectValue(form_obj, field_name, name, value) {
|
||||
var s = form_obj.elements[field_name];
|
||||
var o = new Option(name, value);
|
||||
s.options[s.options.length] = o;
|
||||
}
|
||||
|
||||
function addClassesToList(list_id, specific_option) {
|
||||
// Setup class droplist
|
||||
var styleSelectElm = document.getElementById(list_id);
|
||||
var styles = tinyMCEPopup.getParam('theme_advanced_styles', false);
|
||||
styles = tinyMCEPopup.getParam(specific_option, styles);
|
||||
|
||||
if (styles) {
|
||||
var stylesAr = styles.split(';');
|
||||
|
||||
for (var i=0; i<stylesAr.length; i++) {
|
||||
if (stylesAr != "") {
|
||||
var key, value;
|
||||
|
||||
key = stylesAr[i].split('=')[0];
|
||||
value = stylesAr[i].split('=')[1];
|
||||
|
||||
styleSelectElm.options[styleSelectElm.length] = new Option(key, value);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
tinymce.each(tinyMCEPopup.editor.dom.getClasses(), function(o) {
|
||||
styleSelectElm.options[styleSelectElm.length] = new Option(o.title || o['class'], o['class']);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function isVisible(element_id) {
|
||||
var elm = document.getElementById(element_id);
|
||||
|
||||
return elm && elm.style.display != "none";
|
||||
}
|
||||
|
||||
function convertRGBToHex(col) {
|
||||
var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
|
||||
|
||||
var rgb = col.replace(re, "$1,$2,$3").split(',');
|
||||
if (rgb.length == 3) {
|
||||
r = parseInt(rgb[0]).toString(16);
|
||||
g = parseInt(rgb[1]).toString(16);
|
||||
b = parseInt(rgb[2]).toString(16);
|
||||
|
||||
r = r.length == 1 ? '0' + r : r;
|
||||
g = g.length == 1 ? '0' + g : g;
|
||||
b = b.length == 1 ? '0' + b : b;
|
||||
|
||||
return "#" + r + g + b;
|
||||
}
|
||||
|
||||
return col;
|
||||
}
|
||||
|
||||
function convertHexToRGB(col) {
|
||||
if (col.indexOf('#') != -1) {
|
||||
col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
|
||||
|
||||
r = parseInt(col.substring(0, 2), 16);
|
||||
g = parseInt(col.substring(2, 4), 16);
|
||||
b = parseInt(col.substring(4, 6), 16);
|
||||
|
||||
return "rgb(" + r + "," + g + "," + b + ")";
|
||||
}
|
||||
|
||||
return col;
|
||||
}
|
||||
|
||||
function trimSize(size) {
|
||||
return size.replace(/([0-9\.]+)(px|%|in|cm|mm|em|ex|pt|pc)/i, '$1$2');
|
||||
}
|
||||
|
||||
function getCSSSize(size) {
|
||||
size = trimSize(size);
|
||||
|
||||
if (size == "")
|
||||
return "";
|
||||
|
||||
// Add px
|
||||
if (/^[0-9]+$/.test(size))
|
||||
size += 'px';
|
||||
// Sanity check, IE doesn't like broken values
|
||||
else if (!(/^[0-9\.]+(px|%|in|cm|mm|em|ex|pt|pc)$/i.test(size)))
|
||||
return "";
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
function getStyle(elm, attrib, style) {
|
||||
var val = tinyMCEPopup.dom.getAttrib(elm, attrib);
|
||||
|
||||
if (val != '')
|
||||
return '' + val;
|
||||
|
||||
if (typeof(style) == 'undefined')
|
||||
style = attrib;
|
||||
|
||||
return tinyMCEPopup.dom.getStyle(elm, style);
|
||||
}
|
||||
/**
|
||||
* form_utils.js
|
||||
*
|
||||
* Copyright 2009, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://tinymce.moxiecode.com/license
|
||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||
*/
|
||||
|
||||
var themeBaseURL = tinyMCEPopup.editor.baseURI.toAbsolute('themes/' + tinyMCEPopup.getParam("theme"));
|
||||
|
||||
function getColorPickerHTML(id, target_form_element) {
|
||||
var h = "", dom = tinyMCEPopup.dom;
|
||||
|
||||
if (label = dom.select('label[for=' + target_form_element + ']')[0]) {
|
||||
label.id = label.id || dom.uniqueId();
|
||||
}
|
||||
|
||||
h += '<a role="button" aria-labelledby="' + id + '_label" id="' + id + '_link" href="javascript:;" onclick="tinyMCEPopup.pickColor(event,\'' + target_form_element +'\');" onmousedown="return false;" class="pickcolor">';
|
||||
h += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '"> <span id="' + id + '_label" class="mceVoiceLabel mceIconOnly" style="display:none;">' + tinyMCEPopup.getLang('browse') + '</span></span></a>';
|
||||
|
||||
return h;
|
||||
}
|
||||
|
||||
function updateColor(img_id, form_element_id) {
|
||||
document.getElementById(img_id).style.backgroundColor = document.forms[0].elements[form_element_id].value;
|
||||
}
|
||||
|
||||
function setBrowserDisabled(id, state) {
|
||||
var img = document.getElementById(id);
|
||||
var lnk = document.getElementById(id + "_link");
|
||||
|
||||
if (lnk) {
|
||||
if (state) {
|
||||
lnk.setAttribute("realhref", lnk.getAttribute("href"));
|
||||
lnk.removeAttribute("href");
|
||||
tinyMCEPopup.dom.addClass(img, 'disabled');
|
||||
} else {
|
||||
if (lnk.getAttribute("realhref"))
|
||||
lnk.setAttribute("href", lnk.getAttribute("realhref"));
|
||||
|
||||
tinyMCEPopup.dom.removeClass(img, 'disabled');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getBrowserHTML(id, target_form_element, type, prefix) {
|
||||
var option = prefix + "_" + type + "_browser_callback", cb, html;
|
||||
|
||||
cb = tinyMCEPopup.getParam(option, tinyMCEPopup.getParam("file_browser_callback"));
|
||||
|
||||
if (!cb)
|
||||
return "";
|
||||
|
||||
html = "";
|
||||
html += '<a id="' + id + '_link" href="javascript:openBrowser(\'' + id + '\',\'' + target_form_element + '\', \'' + type + '\',\'' + option + '\');" onmousedown="return false;" class="browse">';
|
||||
html += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '"> </span></a>';
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
function openBrowser(img_id, target_form_element, type, option) {
|
||||
var img = document.getElementById(img_id);
|
||||
|
||||
if (img.className != "mceButtonDisabled")
|
||||
tinyMCEPopup.openBrowser(target_form_element, type, option);
|
||||
}
|
||||
|
||||
function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
|
||||
if (!form_obj || !form_obj.elements[field_name])
|
||||
return;
|
||||
|
||||
if (!value)
|
||||
value = "";
|
||||
|
||||
var sel = form_obj.elements[field_name];
|
||||
|
||||
var found = false;
|
||||
for (var i=0; i<sel.options.length; i++) {
|
||||
var option = sel.options[i];
|
||||
|
||||
if (option.value == value || (ignore_case && option.value.toLowerCase() == value.toLowerCase())) {
|
||||
option.selected = true;
|
||||
found = true;
|
||||
} else
|
||||
option.selected = false;
|
||||
}
|
||||
|
||||
if (!found && add_custom && value != '') {
|
||||
var option = new Option(value, value);
|
||||
option.selected = true;
|
||||
sel.options[sel.options.length] = option;
|
||||
sel.selectedIndex = sel.options.length - 1;
|
||||
}
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
function getSelectValue(form_obj, field_name) {
|
||||
var elm = form_obj.elements[field_name];
|
||||
|
||||
if (elm == null || elm.options == null || elm.selectedIndex === -1)
|
||||
return "";
|
||||
|
||||
return elm.options[elm.selectedIndex].value;
|
||||
}
|
||||
|
||||
function addSelectValue(form_obj, field_name, name, value) {
|
||||
var s = form_obj.elements[field_name];
|
||||
var o = new Option(name, value);
|
||||
s.options[s.options.length] = o;
|
||||
}
|
||||
|
||||
function addClassesToList(list_id, specific_option) {
|
||||
// Setup class droplist
|
||||
var styleSelectElm = document.getElementById(list_id);
|
||||
var styles = tinyMCEPopup.getParam('theme_advanced_styles', false);
|
||||
styles = tinyMCEPopup.getParam(specific_option, styles);
|
||||
|
||||
if (styles) {
|
||||
var stylesAr = styles.split(';');
|
||||
|
||||
for (var i=0; i<stylesAr.length; i++) {
|
||||
if (stylesAr != "") {
|
||||
var key, value;
|
||||
|
||||
key = stylesAr[i].split('=')[0];
|
||||
value = stylesAr[i].split('=')[1];
|
||||
|
||||
styleSelectElm.options[styleSelectElm.length] = new Option(key, value);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
tinymce.each(tinyMCEPopup.editor.dom.getClasses(), function(o) {
|
||||
styleSelectElm.options[styleSelectElm.length] = new Option(o.title || o['class'], o['class']);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function isVisible(element_id) {
|
||||
var elm = document.getElementById(element_id);
|
||||
|
||||
return elm && elm.style.display != "none";
|
||||
}
|
||||
|
||||
function convertRGBToHex(col) {
|
||||
var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
|
||||
|
||||
var rgb = col.replace(re, "$1,$2,$3").split(',');
|
||||
if (rgb.length == 3) {
|
||||
r = parseInt(rgb[0]).toString(16);
|
||||
g = parseInt(rgb[1]).toString(16);
|
||||
b = parseInt(rgb[2]).toString(16);
|
||||
|
||||
r = r.length == 1 ? '0' + r : r;
|
||||
g = g.length == 1 ? '0' + g : g;
|
||||
b = b.length == 1 ? '0' + b : b;
|
||||
|
||||
return "#" + r + g + b;
|
||||
}
|
||||
|
||||
return col;
|
||||
}
|
||||
|
||||
function convertHexToRGB(col) {
|
||||
if (col.indexOf('#') != -1) {
|
||||
col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
|
||||
|
||||
r = parseInt(col.substring(0, 2), 16);
|
||||
g = parseInt(col.substring(2, 4), 16);
|
||||
b = parseInt(col.substring(4, 6), 16);
|
||||
|
||||
return "rgb(" + r + "," + g + "," + b + ")";
|
||||
}
|
||||
|
||||
return col;
|
||||
}
|
||||
|
||||
function trimSize(size) {
|
||||
return size.replace(/([0-9\.]+)(px|%|in|cm|mm|em|ex|pt|pc)/i, '$1$2');
|
||||
}
|
||||
|
||||
function getCSSSize(size) {
|
||||
size = trimSize(size);
|
||||
|
||||
if (size == "")
|
||||
return "";
|
||||
|
||||
// Add px
|
||||
if (/^[0-9]+$/.test(size))
|
||||
size += 'px';
|
||||
// Sanity check, IE doesn't like broken values
|
||||
else if (!(/^[0-9\.]+(px|%|in|cm|mm|em|ex|pt|pc)$/i.test(size)))
|
||||
return "";
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
function getStyle(elm, attrib, style) {
|
||||
var val = tinyMCEPopup.dom.getAttrib(elm, attrib);
|
||||
|
||||
if (val != '')
|
||||
return '' + val;
|
||||
|
||||
if (typeof(style) == 'undefined')
|
||||
style = attrib;
|
||||
|
||||
return tinyMCEPopup.dom.getStyle(elm, style);
|
||||
}
|
||||
|
||||
322
functions/tinyMCE/jscripts/tiny_mce/utils/mctabs.js
vendored
322
functions/tinyMCE/jscripts/tiny_mce/utils/mctabs.js
vendored
@@ -1,162 +1,162 @@
|
||||
/**
|
||||
* mctabs.js
|
||||
*
|
||||
* Copyright 2009, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://tinymce.moxiecode.com/license
|
||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||
*/
|
||||
|
||||
function MCTabs() {
|
||||
this.settings = [];
|
||||
this.onChange = tinyMCEPopup.editor.windowManager.createInstance('tinymce.util.Dispatcher');
|
||||
};
|
||||
|
||||
MCTabs.prototype.init = function(settings) {
|
||||
this.settings = settings;
|
||||
};
|
||||
|
||||
MCTabs.prototype.getParam = function(name, default_value) {
|
||||
var value = null;
|
||||
|
||||
value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
|
||||
|
||||
// Fix bool values
|
||||
if (value == "true" || value == "false")
|
||||
return (value == "true");
|
||||
|
||||
return value;
|
||||
};
|
||||
|
||||
MCTabs.prototype.showTab =function(tab){
|
||||
tab.className = 'current';
|
||||
tab.setAttribute("aria-selected", true);
|
||||
tab.setAttribute("aria-expanded", true);
|
||||
tab.tabIndex = 0;
|
||||
};
|
||||
|
||||
MCTabs.prototype.hideTab =function(tab){
|
||||
var t=this;
|
||||
|
||||
tab.className = '';
|
||||
tab.setAttribute("aria-selected", false);
|
||||
tab.setAttribute("aria-expanded", false);
|
||||
tab.tabIndex = -1;
|
||||
};
|
||||
|
||||
MCTabs.prototype.showPanel = function(panel) {
|
||||
panel.className = 'current';
|
||||
panel.setAttribute("aria-hidden", false);
|
||||
};
|
||||
|
||||
MCTabs.prototype.hidePanel = function(panel) {
|
||||
panel.className = 'panel';
|
||||
panel.setAttribute("aria-hidden", true);
|
||||
};
|
||||
|
||||
MCTabs.prototype.getPanelForTab = function(tabElm) {
|
||||
return tinyMCEPopup.dom.getAttrib(tabElm, "aria-controls");
|
||||
};
|
||||
|
||||
MCTabs.prototype.displayTab = function(tab_id, panel_id, avoid_focus) {
|
||||
var panelElm, panelContainerElm, tabElm, tabContainerElm, selectionClass, nodes, i, t = this;
|
||||
|
||||
tabElm = document.getElementById(tab_id);
|
||||
|
||||
if (panel_id === undefined) {
|
||||
panel_id = t.getPanelForTab(tabElm);
|
||||
}
|
||||
|
||||
panelElm= document.getElementById(panel_id);
|
||||
panelContainerElm = panelElm ? panelElm.parentNode : null;
|
||||
tabContainerElm = tabElm ? tabElm.parentNode : null;
|
||||
selectionClass = t.getParam('selection_class', 'current');
|
||||
|
||||
if (tabElm && tabContainerElm) {
|
||||
nodes = tabContainerElm.childNodes;
|
||||
|
||||
// Hide all other tabs
|
||||
for (i = 0; i < nodes.length; i++) {
|
||||
if (nodes[i].nodeName == "LI") {
|
||||
t.hideTab(nodes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// Show selected tab
|
||||
t.showTab(tabElm);
|
||||
}
|
||||
|
||||
if (panelElm && panelContainerElm) {
|
||||
nodes = panelContainerElm.childNodes;
|
||||
|
||||
// Hide all other panels
|
||||
for (i = 0; i < nodes.length; i++) {
|
||||
if (nodes[i].nodeName == "DIV")
|
||||
t.hidePanel(nodes[i]);
|
||||
}
|
||||
|
||||
if (!avoid_focus) {
|
||||
tabElm.focus();
|
||||
}
|
||||
|
||||
// Show selected panel
|
||||
t.showPanel(panelElm);
|
||||
}
|
||||
};
|
||||
|
||||
MCTabs.prototype.getAnchor = function() {
|
||||
var pos, url = document.location.href;
|
||||
|
||||
if ((pos = url.lastIndexOf('#')) != -1)
|
||||
return url.substring(pos + 1);
|
||||
|
||||
return "";
|
||||
};
|
||||
|
||||
|
||||
//Global instance
|
||||
var mcTabs = new MCTabs();
|
||||
|
||||
tinyMCEPopup.onInit.add(function() {
|
||||
var tinymce = tinyMCEPopup.getWin().tinymce, dom = tinyMCEPopup.dom, each = tinymce.each;
|
||||
|
||||
each(dom.select('div.tabs'), function(tabContainerElm) {
|
||||
var keyNav;
|
||||
|
||||
dom.setAttrib(tabContainerElm, "role", "tablist");
|
||||
|
||||
var items = tinyMCEPopup.dom.select('li', tabContainerElm);
|
||||
var action = function(id) {
|
||||
mcTabs.displayTab(id, mcTabs.getPanelForTab(id));
|
||||
mcTabs.onChange.dispatch(id);
|
||||
};
|
||||
|
||||
each(items, function(item) {
|
||||
dom.setAttrib(item, 'role', 'tab');
|
||||
dom.bind(item, 'click', function(evt) {
|
||||
action(item.id);
|
||||
});
|
||||
});
|
||||
|
||||
dom.bind(dom.getRoot(), 'keydown', function(evt) {
|
||||
if (evt.keyCode === 9 && evt.ctrlKey && !evt.altKey) { // Tab
|
||||
keyNav.moveFocus(evt.shiftKey ? -1 : 1);
|
||||
tinymce.dom.Event.cancel(evt);
|
||||
}
|
||||
});
|
||||
|
||||
each(dom.select('a', tabContainerElm), function(a) {
|
||||
dom.setAttrib(a, 'tabindex', '-1');
|
||||
});
|
||||
|
||||
keyNav = tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
|
||||
root: tabContainerElm,
|
||||
items: items,
|
||||
onAction: action,
|
||||
actOnFocus: true,
|
||||
enableLeftRight: true,
|
||||
enableUpDown: true
|
||||
}, tinyMCEPopup.dom);
|
||||
});
|
||||
/**
|
||||
* mctabs.js
|
||||
*
|
||||
* Copyright 2009, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://tinymce.moxiecode.com/license
|
||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||
*/
|
||||
|
||||
function MCTabs() {
|
||||
this.settings = [];
|
||||
this.onChange = tinyMCEPopup.editor.windowManager.createInstance('tinymce.util.Dispatcher');
|
||||
};
|
||||
|
||||
MCTabs.prototype.init = function(settings) {
|
||||
this.settings = settings;
|
||||
};
|
||||
|
||||
MCTabs.prototype.getParam = function(name, default_value) {
|
||||
var value = null;
|
||||
|
||||
value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
|
||||
|
||||
// Fix bool values
|
||||
if (value == "true" || value == "false")
|
||||
return (value == "true");
|
||||
|
||||
return value;
|
||||
};
|
||||
|
||||
MCTabs.prototype.showTab =function(tab){
|
||||
tab.className = 'current';
|
||||
tab.setAttribute("aria-selected", true);
|
||||
tab.setAttribute("aria-expanded", true);
|
||||
tab.tabIndex = 0;
|
||||
};
|
||||
|
||||
MCTabs.prototype.hideTab =function(tab){
|
||||
var t=this;
|
||||
|
||||
tab.className = '';
|
||||
tab.setAttribute("aria-selected", false);
|
||||
tab.setAttribute("aria-expanded", false);
|
||||
tab.tabIndex = -1;
|
||||
};
|
||||
|
||||
MCTabs.prototype.showPanel = function(panel) {
|
||||
panel.className = 'current';
|
||||
panel.setAttribute("aria-hidden", false);
|
||||
};
|
||||
|
||||
MCTabs.prototype.hidePanel = function(panel) {
|
||||
panel.className = 'panel';
|
||||
panel.setAttribute("aria-hidden", true);
|
||||
};
|
||||
|
||||
MCTabs.prototype.getPanelForTab = function(tabElm) {
|
||||
return tinyMCEPopup.dom.getAttrib(tabElm, "aria-controls");
|
||||
};
|
||||
|
||||
MCTabs.prototype.displayTab = function(tab_id, panel_id, avoid_focus) {
|
||||
var panelElm, panelContainerElm, tabElm, tabContainerElm, selectionClass, nodes, i, t = this;
|
||||
|
||||
tabElm = document.getElementById(tab_id);
|
||||
|
||||
if (panel_id === undefined) {
|
||||
panel_id = t.getPanelForTab(tabElm);
|
||||
}
|
||||
|
||||
panelElm= document.getElementById(panel_id);
|
||||
panelContainerElm = panelElm ? panelElm.parentNode : null;
|
||||
tabContainerElm = tabElm ? tabElm.parentNode : null;
|
||||
selectionClass = t.getParam('selection_class', 'current');
|
||||
|
||||
if (tabElm && tabContainerElm) {
|
||||
nodes = tabContainerElm.childNodes;
|
||||
|
||||
// Hide all other tabs
|
||||
for (i = 0; i < nodes.length; i++) {
|
||||
if (nodes[i].nodeName == "LI") {
|
||||
t.hideTab(nodes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// Show selected tab
|
||||
t.showTab(tabElm);
|
||||
}
|
||||
|
||||
if (panelElm && panelContainerElm) {
|
||||
nodes = panelContainerElm.childNodes;
|
||||
|
||||
// Hide all other panels
|
||||
for (i = 0; i < nodes.length; i++) {
|
||||
if (nodes[i].nodeName == "DIV")
|
||||
t.hidePanel(nodes[i]);
|
||||
}
|
||||
|
||||
if (!avoid_focus) {
|
||||
tabElm.focus();
|
||||
}
|
||||
|
||||
// Show selected panel
|
||||
t.showPanel(panelElm);
|
||||
}
|
||||
};
|
||||
|
||||
MCTabs.prototype.getAnchor = function() {
|
||||
var pos, url = document.location.href;
|
||||
|
||||
if ((pos = url.lastIndexOf('#')) != -1)
|
||||
return url.substring(pos + 1);
|
||||
|
||||
return "";
|
||||
};
|
||||
|
||||
|
||||
//Global instance
|
||||
var mcTabs = new MCTabs();
|
||||
|
||||
tinyMCEPopup.onInit.add(function() {
|
||||
var tinymce = tinyMCEPopup.getWin().tinymce, dom = tinyMCEPopup.dom, each = tinymce.each;
|
||||
|
||||
each(dom.select('div.tabs'), function(tabContainerElm) {
|
||||
var keyNav;
|
||||
|
||||
dom.setAttrib(tabContainerElm, "role", "tablist");
|
||||
|
||||
var items = tinyMCEPopup.dom.select('li', tabContainerElm);
|
||||
var action = function(id) {
|
||||
mcTabs.displayTab(id, mcTabs.getPanelForTab(id));
|
||||
mcTabs.onChange.dispatch(id);
|
||||
};
|
||||
|
||||
each(items, function(item) {
|
||||
dom.setAttrib(item, 'role', 'tab');
|
||||
dom.bind(item, 'click', function(evt) {
|
||||
action(item.id);
|
||||
});
|
||||
});
|
||||
|
||||
dom.bind(dom.getRoot(), 'keydown', function(evt) {
|
||||
if (evt.keyCode === 9 && evt.ctrlKey && !evt.altKey) { // Tab
|
||||
keyNav.moveFocus(evt.shiftKey ? -1 : 1);
|
||||
tinymce.dom.Event.cancel(evt);
|
||||
}
|
||||
});
|
||||
|
||||
each(dom.select('a', tabContainerElm), function(a) {
|
||||
dom.setAttrib(a, 'tabindex', '-1');
|
||||
});
|
||||
|
||||
keyNav = tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
|
||||
root: tabContainerElm,
|
||||
items: items,
|
||||
onAction: action,
|
||||
actOnFocus: true,
|
||||
enableLeftRight: true,
|
||||
enableUpDown: true
|
||||
}, tinyMCEPopup.dom);
|
||||
});
|
||||
});
|
||||
@@ -1,252 +1,252 @@
|
||||
/**
|
||||
* validate.js
|
||||
*
|
||||
* Copyright 2009, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://tinymce.moxiecode.com/license
|
||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||
*/
|
||||
|
||||
/**
|
||||
// String validation:
|
||||
|
||||
if (!Validator.isEmail('myemail'))
|
||||
alert('Invalid email.');
|
||||
|
||||
// Form validation:
|
||||
|
||||
var f = document.forms['myform'];
|
||||
|
||||
if (!Validator.isEmail(f.myemail))
|
||||
alert('Invalid email.');
|
||||
*/
|
||||
|
||||
var Validator = {
|
||||
isEmail : function(s) {
|
||||
return this.test(s, '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$');
|
||||
},
|
||||
|
||||
isAbsUrl : function(s) {
|
||||
return this.test(s, '^(news|telnet|nttp|file|http|ftp|https)://[-A-Za-z0-9\\.]+\\/?.*$');
|
||||
},
|
||||
|
||||
isSize : function(s) {
|
||||
return this.test(s, '^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)?$');
|
||||
},
|
||||
|
||||
isId : function(s) {
|
||||
return this.test(s, '^[A-Za-z_]([A-Za-z0-9_])*$');
|
||||
},
|
||||
|
||||
isEmpty : function(s) {
|
||||
var nl, i;
|
||||
|
||||
if (s.nodeName == 'SELECT' && s.selectedIndex < 1)
|
||||
return true;
|
||||
|
||||
if (s.type == 'checkbox' && !s.checked)
|
||||
return true;
|
||||
|
||||
if (s.type == 'radio') {
|
||||
for (i=0, nl = s.form.elements; i<nl.length; i++) {
|
||||
if (nl[i].type == "radio" && nl[i].name == s.name && nl[i].checked)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return new RegExp('^\\s*$').test(s.nodeType == 1 ? s.value : s);
|
||||
},
|
||||
|
||||
isNumber : function(s, d) {
|
||||
return !isNaN(s.nodeType == 1 ? s.value : s) && (!d || !this.test(s, '^-?[0-9]*\\.[0-9]*$'));
|
||||
},
|
||||
|
||||
test : function(s, p) {
|
||||
s = s.nodeType == 1 ? s.value : s;
|
||||
|
||||
return s == '' || new RegExp(p).test(s);
|
||||
}
|
||||
};
|
||||
|
||||
var AutoValidator = {
|
||||
settings : {
|
||||
id_cls : 'id',
|
||||
int_cls : 'int',
|
||||
url_cls : 'url',
|
||||
number_cls : 'number',
|
||||
email_cls : 'email',
|
||||
size_cls : 'size',
|
||||
required_cls : 'required',
|
||||
invalid_cls : 'invalid',
|
||||
min_cls : 'min',
|
||||
max_cls : 'max'
|
||||
},
|
||||
|
||||
init : function(s) {
|
||||
var n;
|
||||
|
||||
for (n in s)
|
||||
this.settings[n] = s[n];
|
||||
},
|
||||
|
||||
validate : function(f) {
|
||||
var i, nl, s = this.settings, c = 0;
|
||||
|
||||
nl = this.tags(f, 'label');
|
||||
for (i=0; i<nl.length; i++) {
|
||||
this.removeClass(nl[i], s.invalid_cls);
|
||||
nl[i].setAttribute('aria-invalid', false);
|
||||
}
|
||||
|
||||
c += this.validateElms(f, 'input');
|
||||
c += this.validateElms(f, 'select');
|
||||
c += this.validateElms(f, 'textarea');
|
||||
|
||||
return c == 3;
|
||||
},
|
||||
|
||||
invalidate : function(n) {
|
||||
this.mark(n.form, n);
|
||||
},
|
||||
|
||||
getErrorMessages : function(f) {
|
||||
var nl, i, s = this.settings, field, msg, values, messages = [], ed = tinyMCEPopup.editor;
|
||||
nl = this.tags(f, "label");
|
||||
for (i=0; i<nl.length; i++) {
|
||||
if (this.hasClass(nl[i], s.invalid_cls)) {
|
||||
field = document.getElementById(nl[i].getAttribute("for"));
|
||||
values = { field: nl[i].textContent };
|
||||
if (this.hasClass(field, s.min_cls, true)) {
|
||||
message = ed.getLang('invalid_data_min');
|
||||
values.min = this.getNum(field, s.min_cls);
|
||||
} else if (this.hasClass(field, s.number_cls)) {
|
||||
message = ed.getLang('invalid_data_number');
|
||||
} else if (this.hasClass(field, s.size_cls)) {
|
||||
message = ed.getLang('invalid_data_size');
|
||||
} else {
|
||||
message = ed.getLang('invalid_data');
|
||||
}
|
||||
|
||||
message = message.replace(/{\#([^}]+)\}/g, function(a, b) {
|
||||
return values[b] || '{#' + b + '}';
|
||||
});
|
||||
messages.push(message);
|
||||
}
|
||||
}
|
||||
return messages;
|
||||
},
|
||||
|
||||
reset : function(e) {
|
||||
var t = ['label', 'input', 'select', 'textarea'];
|
||||
var i, j, nl, s = this.settings;
|
||||
|
||||
if (e == null)
|
||||
return;
|
||||
|
||||
for (i=0; i<t.length; i++) {
|
||||
nl = this.tags(e.form ? e.form : e, t[i]);
|
||||
for (j=0; j<nl.length; j++) {
|
||||
this.removeClass(nl[j], s.invalid_cls);
|
||||
nl[j].setAttribute('aria-invalid', false);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
validateElms : function(f, e) {
|
||||
var nl, i, n, s = this.settings, st = true, va = Validator, v;
|
||||
|
||||
nl = this.tags(f, e);
|
||||
for (i=0; i<nl.length; i++) {
|
||||
n = nl[i];
|
||||
|
||||
this.removeClass(n, s.invalid_cls);
|
||||
|
||||
if (this.hasClass(n, s.required_cls) && va.isEmpty(n))
|
||||
st = this.mark(f, n);
|
||||
|
||||
if (this.hasClass(n, s.number_cls) && !va.isNumber(n))
|
||||
st = this.mark(f, n);
|
||||
|
||||
if (this.hasClass(n, s.int_cls) && !va.isNumber(n, true))
|
||||
st = this.mark(f, n);
|
||||
|
||||
if (this.hasClass(n, s.url_cls) && !va.isAbsUrl(n))
|
||||
st = this.mark(f, n);
|
||||
|
||||
if (this.hasClass(n, s.email_cls) && !va.isEmail(n))
|
||||
st = this.mark(f, n);
|
||||
|
||||
if (this.hasClass(n, s.size_cls) && !va.isSize(n))
|
||||
st = this.mark(f, n);
|
||||
|
||||
if (this.hasClass(n, s.id_cls) && !va.isId(n))
|
||||
st = this.mark(f, n);
|
||||
|
||||
if (this.hasClass(n, s.min_cls, true)) {
|
||||
v = this.getNum(n, s.min_cls);
|
||||
|
||||
if (isNaN(v) || parseInt(n.value) < parseInt(v))
|
||||
st = this.mark(f, n);
|
||||
}
|
||||
|
||||
if (this.hasClass(n, s.max_cls, true)) {
|
||||
v = this.getNum(n, s.max_cls);
|
||||
|
||||
if (isNaN(v) || parseInt(n.value) > parseInt(v))
|
||||
st = this.mark(f, n);
|
||||
}
|
||||
}
|
||||
|
||||
return st;
|
||||
},
|
||||
|
||||
hasClass : function(n, c, d) {
|
||||
return new RegExp('\\b' + c + (d ? '[0-9]+' : '') + '\\b', 'g').test(n.className);
|
||||
},
|
||||
|
||||
getNum : function(n, c) {
|
||||
c = n.className.match(new RegExp('\\b' + c + '([0-9]+)\\b', 'g'))[0];
|
||||
c = c.replace(/[^0-9]/g, '');
|
||||
|
||||
return c;
|
||||
},
|
||||
|
||||
addClass : function(n, c, b) {
|
||||
var o = this.removeClass(n, c);
|
||||
n.className = b ? c + (o != '' ? (' ' + o) : '') : (o != '' ? (o + ' ') : '') + c;
|
||||
},
|
||||
|
||||
removeClass : function(n, c) {
|
||||
c = n.className.replace(new RegExp("(^|\\s+)" + c + "(\\s+|$)"), ' ');
|
||||
return n.className = c != ' ' ? c : '';
|
||||
},
|
||||
|
||||
tags : function(f, s) {
|
||||
return f.getElementsByTagName(s);
|
||||
},
|
||||
|
||||
mark : function(f, n) {
|
||||
var s = this.settings;
|
||||
|
||||
this.addClass(n, s.invalid_cls);
|
||||
n.setAttribute('aria-invalid', 'true');
|
||||
this.markLabels(f, n, s.invalid_cls);
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
markLabels : function(f, n, ic) {
|
||||
var nl, i;
|
||||
|
||||
nl = this.tags(f, "label");
|
||||
for (i=0; i<nl.length; i++) {
|
||||
if (nl[i].getAttribute("for") == n.id || nl[i].htmlFor == n.id)
|
||||
this.addClass(nl[i], ic);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
};
|
||||
/**
|
||||
* validate.js
|
||||
*
|
||||
* Copyright 2009, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://tinymce.moxiecode.com/license
|
||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||
*/
|
||||
|
||||
/**
|
||||
// String validation:
|
||||
|
||||
if (!Validator.isEmail('myemail'))
|
||||
alert('Invalid email.');
|
||||
|
||||
// Form validation:
|
||||
|
||||
var f = document.forms['myform'];
|
||||
|
||||
if (!Validator.isEmail(f.myemail))
|
||||
alert('Invalid email.');
|
||||
*/
|
||||
|
||||
var Validator = {
|
||||
isEmail : function(s) {
|
||||
return this.test(s, '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$');
|
||||
},
|
||||
|
||||
isAbsUrl : function(s) {
|
||||
return this.test(s, '^(news|telnet|nttp|file|http|ftp|https)://[-A-Za-z0-9\\.]+\\/?.*$');
|
||||
},
|
||||
|
||||
isSize : function(s) {
|
||||
return this.test(s, '^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)?$');
|
||||
},
|
||||
|
||||
isId : function(s) {
|
||||
return this.test(s, '^[A-Za-z_]([A-Za-z0-9_])*$');
|
||||
},
|
||||
|
||||
isEmpty : function(s) {
|
||||
var nl, i;
|
||||
|
||||
if (s.nodeName == 'SELECT' && s.selectedIndex < 1)
|
||||
return true;
|
||||
|
||||
if (s.type == 'checkbox' && !s.checked)
|
||||
return true;
|
||||
|
||||
if (s.type == 'radio') {
|
||||
for (i=0, nl = s.form.elements; i<nl.length; i++) {
|
||||
if (nl[i].type == "radio" && nl[i].name == s.name && nl[i].checked)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return new RegExp('^\\s*$').test(s.nodeType == 1 ? s.value : s);
|
||||
},
|
||||
|
||||
isNumber : function(s, d) {
|
||||
return !isNaN(s.nodeType == 1 ? s.value : s) && (!d || !this.test(s, '^-?[0-9]*\\.[0-9]*$'));
|
||||
},
|
||||
|
||||
test : function(s, p) {
|
||||
s = s.nodeType == 1 ? s.value : s;
|
||||
|
||||
return s == '' || new RegExp(p).test(s);
|
||||
}
|
||||
};
|
||||
|
||||
var AutoValidator = {
|
||||
settings : {
|
||||
id_cls : 'id',
|
||||
int_cls : 'int',
|
||||
url_cls : 'url',
|
||||
number_cls : 'number',
|
||||
email_cls : 'email',
|
||||
size_cls : 'size',
|
||||
required_cls : 'required',
|
||||
invalid_cls : 'invalid',
|
||||
min_cls : 'min',
|
||||
max_cls : 'max'
|
||||
},
|
||||
|
||||
init : function(s) {
|
||||
var n;
|
||||
|
||||
for (n in s)
|
||||
this.settings[n] = s[n];
|
||||
},
|
||||
|
||||
validate : function(f) {
|
||||
var i, nl, s = this.settings, c = 0;
|
||||
|
||||
nl = this.tags(f, 'label');
|
||||
for (i=0; i<nl.length; i++) {
|
||||
this.removeClass(nl[i], s.invalid_cls);
|
||||
nl[i].setAttribute('aria-invalid', false);
|
||||
}
|
||||
|
||||
c += this.validateElms(f, 'input');
|
||||
c += this.validateElms(f, 'select');
|
||||
c += this.validateElms(f, 'textarea');
|
||||
|
||||
return c == 3;
|
||||
},
|
||||
|
||||
invalidate : function(n) {
|
||||
this.mark(n.form, n);
|
||||
},
|
||||
|
||||
getErrorMessages : function(f) {
|
||||
var nl, i, s = this.settings, field, msg, values, messages = [], ed = tinyMCEPopup.editor;
|
||||
nl = this.tags(f, "label");
|
||||
for (i=0; i<nl.length; i++) {
|
||||
if (this.hasClass(nl[i], s.invalid_cls)) {
|
||||
field = document.getElementById(nl[i].getAttribute("for"));
|
||||
values = { field: nl[i].textContent };
|
||||
if (this.hasClass(field, s.min_cls, true)) {
|
||||
message = ed.getLang('invalid_data_min');
|
||||
values.min = this.getNum(field, s.min_cls);
|
||||
} else if (this.hasClass(field, s.number_cls)) {
|
||||
message = ed.getLang('invalid_data_number');
|
||||
} else if (this.hasClass(field, s.size_cls)) {
|
||||
message = ed.getLang('invalid_data_size');
|
||||
} else {
|
||||
message = ed.getLang('invalid_data');
|
||||
}
|
||||
|
||||
message = message.replace(/{\#([^}]+)\}/g, function(a, b) {
|
||||
return values[b] || '{#' + b + '}';
|
||||
});
|
||||
messages.push(message);
|
||||
}
|
||||
}
|
||||
return messages;
|
||||
},
|
||||
|
||||
reset : function(e) {
|
||||
var t = ['label', 'input', 'select', 'textarea'];
|
||||
var i, j, nl, s = this.settings;
|
||||
|
||||
if (e == null)
|
||||
return;
|
||||
|
||||
for (i=0; i<t.length; i++) {
|
||||
nl = this.tags(e.form ? e.form : e, t[i]);
|
||||
for (j=0; j<nl.length; j++) {
|
||||
this.removeClass(nl[j], s.invalid_cls);
|
||||
nl[j].setAttribute('aria-invalid', false);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
validateElms : function(f, e) {
|
||||
var nl, i, n, s = this.settings, st = true, va = Validator, v;
|
||||
|
||||
nl = this.tags(f, e);
|
||||
for (i=0; i<nl.length; i++) {
|
||||
n = nl[i];
|
||||
|
||||
this.removeClass(n, s.invalid_cls);
|
||||
|
||||
if (this.hasClass(n, s.required_cls) && va.isEmpty(n))
|
||||
st = this.mark(f, n);
|
||||
|
||||
if (this.hasClass(n, s.number_cls) && !va.isNumber(n))
|
||||
st = this.mark(f, n);
|
||||
|
||||
if (this.hasClass(n, s.int_cls) && !va.isNumber(n, true))
|
||||
st = this.mark(f, n);
|
||||
|
||||
if (this.hasClass(n, s.url_cls) && !va.isAbsUrl(n))
|
||||
st = this.mark(f, n);
|
||||
|
||||
if (this.hasClass(n, s.email_cls) && !va.isEmail(n))
|
||||
st = this.mark(f, n);
|
||||
|
||||
if (this.hasClass(n, s.size_cls) && !va.isSize(n))
|
||||
st = this.mark(f, n);
|
||||
|
||||
if (this.hasClass(n, s.id_cls) && !va.isId(n))
|
||||
st = this.mark(f, n);
|
||||
|
||||
if (this.hasClass(n, s.min_cls, true)) {
|
||||
v = this.getNum(n, s.min_cls);
|
||||
|
||||
if (isNaN(v) || parseInt(n.value) < parseInt(v))
|
||||
st = this.mark(f, n);
|
||||
}
|
||||
|
||||
if (this.hasClass(n, s.max_cls, true)) {
|
||||
v = this.getNum(n, s.max_cls);
|
||||
|
||||
if (isNaN(v) || parseInt(n.value) > parseInt(v))
|
||||
st = this.mark(f, n);
|
||||
}
|
||||
}
|
||||
|
||||
return st;
|
||||
},
|
||||
|
||||
hasClass : function(n, c, d) {
|
||||
return new RegExp('\\b' + c + (d ? '[0-9]+' : '') + '\\b', 'g').test(n.className);
|
||||
},
|
||||
|
||||
getNum : function(n, c) {
|
||||
c = n.className.match(new RegExp('\\b' + c + '([0-9]+)\\b', 'g'))[0];
|
||||
c = c.replace(/[^0-9]/g, '');
|
||||
|
||||
return c;
|
||||
},
|
||||
|
||||
addClass : function(n, c, b) {
|
||||
var o = this.removeClass(n, c);
|
||||
n.className = b ? c + (o != '' ? (' ' + o) : '') : (o != '' ? (o + ' ') : '') + c;
|
||||
},
|
||||
|
||||
removeClass : function(n, c) {
|
||||
c = n.className.replace(new RegExp("(^|\\s+)" + c + "(\\s+|$)"), ' ');
|
||||
return n.className = c != ' ' ? c : '';
|
||||
},
|
||||
|
||||
tags : function(f, s) {
|
||||
return f.getElementsByTagName(s);
|
||||
},
|
||||
|
||||
mark : function(f, n) {
|
||||
var s = this.settings;
|
||||
|
||||
this.addClass(n, s.invalid_cls);
|
||||
n.setAttribute('aria-invalid', 'true');
|
||||
this.markLabels(f, n, s.invalid_cls);
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
markLabels : function(f, n, ic) {
|
||||
var nl, i;
|
||||
|
||||
nl = this.tags(f, "label");
|
||||
for (i=0; i<nl.length; i++) {
|
||||
if (nl[i].getAttribute("for") == n.id || nl[i].htmlFor == n.id)
|
||||
this.addClass(nl[i], ic);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -5,251 +5,259 @@
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (c) 2005-2017 by Martin Willisegger
|
||||
// (c) 2005-2018 by Martin Willisegger
|
||||
//
|
||||
// Project : NagiosQL
|
||||
// Component : Translation Functions
|
||||
// Website : http://www.nagiosql.org
|
||||
// Date : $LastChangedDate: 2017-06-22 09:29:35 +0200 (Thu, 22 Jun 2017) $
|
||||
// Author : $LastChangedBy: martin $
|
||||
// Version : 3.3.0
|
||||
// Revision : $LastChangedRevision: 2 $
|
||||
// Website : https://sourceforge.net/projects/nagiosql/
|
||||
// Version : 3.4.0
|
||||
// GIT Repo : https://gitlab.com/wizonet/NagiosQL
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Translate given text
|
||||
//
|
||||
function translate($translation) {
|
||||
$translation = str_replace('"','"',gettext($translation));
|
||||
$translation = str_replace("'",''',gettext($translation));
|
||||
return $translation;
|
||||
function translate($translation)
|
||||
{
|
||||
$translation = str_replace('"', '"', gettext($translation));
|
||||
$translation = str_replace("'", ''', gettext($translation));
|
||||
return $translation;
|
||||
}
|
||||
///
|
||||
/// Internationalization and Localization utilities
|
||||
///
|
||||
function getLanguageCodefromLanguage($languagetosearch) {
|
||||
$detaillanguages = getLanguageData();
|
||||
foreach ($detaillanguages as $key2=>$languagename) {
|
||||
if ($languagetosearch==$languagename['description']) {
|
||||
return $key2;
|
||||
function getLanguageCodefromLanguage($languagetosearch)
|
||||
{
|
||||
$strReturn = 'en_GB';
|
||||
$detaillanguages = getLanguageData();
|
||||
/** @noinspection ForeachSourceInspection */
|
||||
foreach ($detaillanguages as $key2 => $languagename) {
|
||||
if ($languagetosearch == $languagename['description']) {
|
||||
$strReturn = $key2;
|
||||
}
|
||||
}
|
||||
}
|
||||
// else return default en code
|
||||
return "en_GB";
|
||||
// else return default en code
|
||||
return $strReturn;
|
||||
}
|
||||
|
||||
function getLanguageNameFromCode($codetosearch, $withnative=true) {
|
||||
$detaillanguages = getLanguageData();
|
||||
if (isset($detaillanguages[$codetosearch]['description'])) {
|
||||
if ($withnative) {
|
||||
return $detaillanguages[$codetosearch]['description'].' - '.$detaillanguages[$codetosearch]['nativedescription'];
|
||||
} else {
|
||||
return $detaillanguages[$codetosearch]['description'];}
|
||||
} else {
|
||||
// else return false
|
||||
return false;
|
||||
}
|
||||
function getLanguageNameFromCode($codetosearch, $withnative = true)
|
||||
{
|
||||
$strReturn = false;
|
||||
$detaillanguages = getLanguageData();
|
||||
if (isset($detaillanguages[$codetosearch]['description'])) {
|
||||
if ($withnative) {
|
||||
$strReturn = $detaillanguages[$codetosearch]['description'].' - '.
|
||||
$detaillanguages[$codetosearch]['nativedescription'];
|
||||
} else {
|
||||
$strReturn = $detaillanguages[$codetosearch]['description'];
|
||||
}
|
||||
}
|
||||
return $strReturn;
|
||||
}
|
||||
|
||||
|
||||
function getLanguageData() {
|
||||
unset($supportedLanguages);
|
||||
// English
|
||||
$supportedLanguages['en_GB']['description'] = translate('English');
|
||||
$supportedLanguages['en_GB']['nativedescription'] = 'English';
|
||||
function getLanguageData()
|
||||
{
|
||||
unset($supportedLanguages);
|
||||
// English
|
||||
$supportedLanguages['en_GB']['description'] = translate('English');
|
||||
$supportedLanguages['en_GB']['nativedescription'] = 'English';
|
||||
|
||||
// German
|
||||
$supportedLanguages['de_DE']['description'] = translate('German');
|
||||
$supportedLanguages['de_DE']['nativedescription'] = 'Deutsch';
|
||||
// German
|
||||
$supportedLanguages['de_DE']['description'] = translate('German');
|
||||
$supportedLanguages['de_DE']['nativedescription'] = 'Deutsch';
|
||||
|
||||
// Chinese (Simplified)
|
||||
$supportedLanguages['zh_CN']['description'] = translate('Chinese (Simplified)');
|
||||
$supportedLanguages['zh_CN']['nativedescription'] = '简体中文';
|
||||
// Chinese (Simplified)
|
||||
$supportedLanguages['zh_CN']['description'] = translate('Chinese (Simplified)');
|
||||
$supportedLanguages['zh_CN']['nativedescription'] = '简体中文';
|
||||
|
||||
// Italian
|
||||
$supportedLanguages['it_IT']['description'] = translate('Italian');
|
||||
$supportedLanguages['it_IT']['nativedescription'] = 'Italiano';
|
||||
// Italian
|
||||
$supportedLanguages['it_IT']['description'] = translate('Italian');
|
||||
$supportedLanguages['it_IT']['nativedescription'] = 'Italiano';
|
||||
|
||||
// French
|
||||
$supportedLanguages['fr_FR']['description'] = translate('French');
|
||||
$supportedLanguages['fr_FR']['nativedescription'] = 'Français';
|
||||
// French
|
||||
$supportedLanguages['fr_FR']['description'] = translate('French');
|
||||
$supportedLanguages['fr_FR']['nativedescription'] = 'Français';
|
||||
|
||||
// Russian
|
||||
$supportedLanguages['ru_RU']['description'] = translate('Russian');
|
||||
$supportedLanguages['ru_RU']['nativedescription'] = 'Русский';
|
||||
// Russian
|
||||
$supportedLanguages['ru_RU']['description'] = translate('Russian');
|
||||
$supportedLanguages['ru_RU']['nativedescription'] = 'Русский';
|
||||
|
||||
// Spanish
|
||||
$supportedLanguages['es_ES']['description'] = translate('Spanish');
|
||||
$supportedLanguages['es_ES']['nativedescription'] = 'Español';
|
||||
// Spanish
|
||||
$supportedLanguages['es_ES']['description'] = translate('Spanish');
|
||||
$supportedLanguages['es_ES']['nativedescription'] = 'Español';
|
||||
|
||||
// Brazilian Portuguese
|
||||
$supportedLanguages['pt_BR']['description'] = translate('Portuguese (Brazilian)');
|
||||
$supportedLanguages['pt_BR']['nativedescription'] = 'Português do Brasil';
|
||||
// Brazilian Portuguese
|
||||
$supportedLanguages['pt_BR']['description'] = translate('Portuguese (Brazilian)');
|
||||
$supportedLanguages['pt_BR']['nativedescription'] = 'Português do Brasil';
|
||||
|
||||
// Dutch
|
||||
$supportedLanguages['nl_NL']['description'] = translate('Dutch');
|
||||
$supportedLanguages['nl_NL']['nativedescription'] = 'Nederlands';
|
||||
// Dutch
|
||||
$supportedLanguages['nl_NL']['description'] = translate('Dutch');
|
||||
$supportedLanguages['nl_NL']['nativedescription'] = 'Nederlands';
|
||||
|
||||
// Danish
|
||||
$supportedLanguages['da_DK']['description'] = translate('Danish');
|
||||
$supportedLanguages['da_DK']['nativedescription'] = 'Dansk';
|
||||
// Danish
|
||||
$supportedLanguages['da_DK']['description'] = translate('Danish');
|
||||
$supportedLanguages['da_DK']['nativedescription'] = 'Dansk';
|
||||
|
||||
// No longer supported language because of missing translators
|
||||
//
|
||||
// // Japanese
|
||||
// $supportedLanguages['ja_JP']['description'] = translate('Japanese');
|
||||
// $supportedLanguages['ja_JP']['nativedescription'] = '日本語';
|
||||
//
|
||||
// // Polish
|
||||
// $supportedLanguages['pl_PL']['description'] = translate('Polish');
|
||||
// $supportedLanguages['pl_PL']['nativedescription'] = 'Polski';
|
||||
//
|
||||
// // Spanish (Argentina)
|
||||
// $supportedLanguages['es_AR']['description'] = translate('Spanish (Argentina)');
|
||||
// $supportedLanguages['es_AR']['nativedescription'] = 'Español Argentina';
|
||||
///
|
||||
/// Currently not supported languages
|
||||
//
|
||||
// // Albanian
|
||||
// $supportedLanguages['sq']['description'] = $clang->translate('Albanian');
|
||||
// $supportedLanguages['sq']['nativedescription'] = 'Shqipe';
|
||||
//
|
||||
// // Basque
|
||||
// $supportedLanguages['eu']['description'] = translate('Basque');
|
||||
// $supportedLanguages['eu']['nativedescription'] = 'Euskara';
|
||||
//
|
||||
// // Bosnian
|
||||
// $supportedLanguages['bs']['description'] = translate('Bosnian');
|
||||
// $supportedLanguages['bs']['nativedescription'] = 'Български';
|
||||
//
|
||||
// // Bulgarian
|
||||
// $supportedLanguages['bg']['description'] = translate('Bulgarian');
|
||||
// $supportedLanguages['bg']['nativedescription'] = 'Български';
|
||||
//
|
||||
// // Catalan
|
||||
// $supportedLanguages['ca']['description'] = translate('Catalan');
|
||||
// $supportedLanguages['ca']['nativedescription'] = 'Catalά';
|
||||
//
|
||||
// // Welsh
|
||||
// $supportedLanguages['cy']['description'] = translate('Welsh');
|
||||
// $supportedLanguages['cy']['nativedescription'] = 'Cymraeg';
|
||||
//
|
||||
// // Chinese (Traditional - Hong Kong)
|
||||
// $supportedLanguages['zh-Hant-HK']['description'] = translate('Chinese (Traditional - Hong Kong)');
|
||||
// $supportedLanguages['zh-Hant-HK']['nativedescription'] = '繁體中文語系';
|
||||
//
|
||||
// // Chinese (Traditional - Taiwan)
|
||||
// $supportedLanguages['zh-Hant-TW']['description'] = translate('Chinese (Traditional - Taiwan)');
|
||||
// $supportedLanguages['zh-Hant-TW']['nativedescription'] = 'Chinese (Traditional - Taiwan)';
|
||||
//
|
||||
// // Croatian
|
||||
// $supportedLanguages['hr']['description'] = translate('Croatian');
|
||||
// $supportedLanguages['hr']['nativedescription'] = 'Hrvatski';
|
||||
//
|
||||
// // Czech
|
||||
// $supportedLanguages['cs']['description'] = translate('Czech');
|
||||
// $supportedLanguages['cs']['nativedescription'] = 'Česky';
|
||||
//
|
||||
//
|
||||
// // Estonian
|
||||
// $supportedLanguages['et']['description'] = translate('Estonian');
|
||||
// $supportedLanguages['et']['nativedescription'] = 'Eesti';
|
||||
//
|
||||
// // Finnish
|
||||
// $supportedLanguages['fi']['description'] = translate('Finnish');
|
||||
// $supportedLanguages['fi']['nativedescription'] = 'Suomi';
|
||||
//
|
||||
// // Galician
|
||||
// $supportedLanguages['gl']['description'] = translate('Galician');
|
||||
// $supportedLanguages['gl']['nativedescription'] = 'Galego';
|
||||
//
|
||||
// // German informal
|
||||
// $supportedLanguages['de-informal']['description'] = translate('German informal');
|
||||
// $supportedLanguages['de-informal']['nativedescription'] = 'Deutsch (Du)';
|
||||
//
|
||||
// // Greek
|
||||
// $supportedLanguages['el']['description'] = translate('Greek');
|
||||
// $supportedLanguages['el']['nativedescription'] = 'ελληνικά';
|
||||
//
|
||||
// // Hebrew
|
||||
// $supportedLanguages['he']['description'] = translate('Hebrew');
|
||||
// $supportedLanguages['he']['nativedescription'] = ' עברית';
|
||||
//
|
||||
// // Hungarian
|
||||
// $supportedLanguages['hu']['description'] = translate('Hungarian');
|
||||
// $supportedLanguages['hu']['nativedescription'] = 'Magyar';
|
||||
//
|
||||
// // Indonesian
|
||||
// $supportedLanguages['id']['description'] = translate('Indonesian');
|
||||
// $supportedLanguages['id']['nativedescription'] = 'Bahasa Indonesia';
|
||||
//
|
||||
//
|
||||
// // Lithuanian
|
||||
// $supportedLanguages['lt']['description'] = translate('Lithuanian');
|
||||
// $supportedLanguages['lt']['nativedescription'] = 'Lietuvių';
|
||||
//
|
||||
// // Macedonian
|
||||
// $supportedLanguages['mk']['description'] = translate('Macedonian');
|
||||
// $supportedLanguages['mk']['nativedescription'] = 'Македонски';
|
||||
//
|
||||
// // Norwegian Bokml
|
||||
// $supportedLanguages['nb']['description'] = translate('Norwegian (Bokmal)');
|
||||
// $supportedLanguages['nb']['nativedescription'] = 'Norsk Bokmål';
|
||||
//
|
||||
// // Norwegian Nynorsk
|
||||
// $supportedLanguages['nn']['description'] = translate('Norwegian (Nynorsk)');
|
||||
// $supportedLanguages['nn']['nativedescription'] = 'Norsk Nynorsk';
|
||||
//
|
||||
// // Portuguese
|
||||
// $supportedLanguages['pt']['description'] = translate('Portuguese');
|
||||
// $supportedLanguages['pt']['nativedescription'] = 'Português';
|
||||
//
|
||||
// // Romanian
|
||||
// $supportedLanguages['ro']['description'] = translate('Romanian');
|
||||
// $supportedLanguages['ro']['nativedescription'] = 'Românesc';
|
||||
//
|
||||
// // Slovak
|
||||
// $supportedLanguages['sk']['description'] = translate('Slovak');
|
||||
// $supportedLanguages['sk']['nativedescription'] = 'Slovák';
|
||||
//
|
||||
// // Slovenian
|
||||
// $supportedLanguages['sl']['description'] = translate('Slovenian');
|
||||
// $supportedLanguages['sl']['nativedescription'] = 'Slovenščina';
|
||||
//
|
||||
// // Serbian
|
||||
// $supportedLanguages['sr']['description'] = translate('Serbian');
|
||||
// $supportedLanguages['sr']['nativedescription'] = 'Srpski';
|
||||
//
|
||||
// // Spanish (Mexico)
|
||||
// $supportedLanguages['es-MX']['description'] = translate('Spanish (Mexico)');
|
||||
// $supportedLanguages['es-MX']['nativedescription'] = 'Español Mejicano';
|
||||
//
|
||||
// // Swedish
|
||||
// $supportedLanguages['sv']['description'] = translate('Swedish');
|
||||
// $supportedLanguages['sv']['nativedescription'] = 'Svenska';
|
||||
//
|
||||
// // Turkish
|
||||
// $supportedLanguages['tr']['description'] = translate('Turkish');
|
||||
// $supportedLanguages['tr']['nativedescription'] = 'Türkçe';
|
||||
//
|
||||
// // Thai
|
||||
// $supportedLanguages['th']['description'] = translate('Thai');
|
||||
// $supportedLanguages['th']['nativedescription'] = 'ภาษาไทย';
|
||||
//
|
||||
// // Vietnamese
|
||||
// $supportedLanguages['vi']['description'] = translate('Vietnamese');
|
||||
// $supportedLanguages['vi']['nativedescription'] = 'Tiếng Việt';
|
||||
// No longer supported language because of missing translators
|
||||
//
|
||||
// // Japanese
|
||||
// $supportedLanguages['ja_JP']['description'] = translate('Japanese');
|
||||
// $supportedLanguages['ja_JP']['nativedescription'] = '日本語';
|
||||
//
|
||||
// // Polish
|
||||
// $supportedLanguages['pl_PL']['description'] = translate('Polish');
|
||||
// $supportedLanguages['pl_PL']['nativedescription'] = 'Polski';
|
||||
//
|
||||
// // Spanish (Argentina)
|
||||
// $supportedLanguages['es_AR']['description'] = translate('Spanish (Argentina)');
|
||||
// $supportedLanguages['es_AR']['nativedescription'] = 'Español Argentina';
|
||||
///
|
||||
/// Currently not supported languages
|
||||
//
|
||||
// // Albanian
|
||||
// $supportedLanguages['sq']['description'] = $clang->translate('Albanian');
|
||||
// $supportedLanguages['sq']['nativedescription'] = 'Shqipe';
|
||||
//
|
||||
// // Basque
|
||||
// $supportedLanguages['eu']['description'] = translate('Basque');
|
||||
// $supportedLanguages['eu']['nativedescription'] = 'Euskara';
|
||||
//
|
||||
// // Bosnian
|
||||
// $supportedLanguages['bs']['description'] = translate('Bosnian');
|
||||
// $supportedLanguages['bs']['nativedescription'] =
|
||||
// 'Български';
|
||||
//
|
||||
// // Bulgarian
|
||||
// $supportedLanguages['bg']['description'] = translate('Bulgarian');
|
||||
// $supportedLanguages['bg']['nativedescription'] =
|
||||
// 'Български';
|
||||
//
|
||||
// // Catalan
|
||||
// $supportedLanguages['ca']['description'] = translate('Catalan');
|
||||
// $supportedLanguages['ca']['nativedescription'] = 'Catalά';
|
||||
//
|
||||
// // Welsh
|
||||
// $supportedLanguages['cy']['description'] = translate('Welsh');
|
||||
// $supportedLanguages['cy']['nativedescription'] = 'Cymraeg';
|
||||
//
|
||||
// // Chinese (Traditional - Hong Kong)
|
||||
// $supportedLanguages['zh-Hant-HK']['description'] = translate('Chinese (Traditional - Hong Kong)');
|
||||
// $supportedLanguages['zh-Hant-HK']['nativedescription'] = '繁體中文語系';
|
||||
//
|
||||
// // Chinese (Traditional - Taiwan)
|
||||
// $supportedLanguages['zh-Hant-TW']['description'] = translate('Chinese (Traditional - Taiwan)');
|
||||
// $supportedLanguages['zh-Hant-TW']['nativedescription'] = 'Chinese (Traditional - Taiwan)';
|
||||
//
|
||||
// // Croatian
|
||||
// $supportedLanguages['hr']['description'] = translate('Croatian');
|
||||
// $supportedLanguages['hr']['nativedescription'] = 'Hrvatski';
|
||||
//
|
||||
// // Czech
|
||||
// $supportedLanguages['cs']['description'] = translate('Czech');
|
||||
// $supportedLanguages['cs']['nativedescription'] = 'Česky';
|
||||
//
|
||||
//
|
||||
// // Estonian
|
||||
// $supportedLanguages['et']['description'] = translate('Estonian');
|
||||
// $supportedLanguages['et']['nativedescription'] = 'Eesti';
|
||||
//
|
||||
// // Finnish
|
||||
// $supportedLanguages['fi']['description'] = translate('Finnish');
|
||||
// $supportedLanguages['fi']['nativedescription'] = 'Suomi';
|
||||
//
|
||||
// // Galician
|
||||
// $supportedLanguages['gl']['description'] = translate('Galician');
|
||||
// $supportedLanguages['gl']['nativedescription'] = 'Galego';
|
||||
//
|
||||
// // German informal
|
||||
// $supportedLanguages['de-informal']['description'] = translate('German informal');
|
||||
// $supportedLanguages['de-informal']['nativedescription'] = 'Deutsch (Du)';
|
||||
//
|
||||
// // Greek
|
||||
// $supportedLanguages['el']['description'] = translate('Greek');
|
||||
// $supportedLanguages['el']['nativedescription'] = 'ελληνικά';
|
||||
//
|
||||
// // Hebrew
|
||||
// $supportedLanguages['he']['description'] = translate('Hebrew');
|
||||
// $supportedLanguages['he']['nativedescription'] = ' עברית';
|
||||
//
|
||||
// // Hungarian
|
||||
// $supportedLanguages['hu']['description'] = translate('Hungarian');
|
||||
// $supportedLanguages['hu']['nativedescription'] = 'Magyar';
|
||||
//
|
||||
// // Indonesian
|
||||
// $supportedLanguages['id']['description'] = translate('Indonesian');
|
||||
// $supportedLanguages['id']['nativedescription'] = 'Bahasa Indonesia';
|
||||
//
|
||||
//
|
||||
// // Lithuanian
|
||||
// $supportedLanguages['lt']['description'] = translate('Lithuanian');
|
||||
// $supportedLanguages['lt']['nativedescription'] = 'Lietuvių';
|
||||
//
|
||||
// // Macedonian
|
||||
// $supportedLanguages['mk']['description'] = translate('Macedonian');
|
||||
// $supportedLanguages['mk']['nativedescription'] =
|
||||
// 'Македонски';
|
||||
//
|
||||
// // Norwegian Bokml
|
||||
// $supportedLanguages['nb']['description'] = translate('Norwegian (Bokmal)');
|
||||
// $supportedLanguages['nb']['nativedescription'] = 'Norsk Bokmål';
|
||||
//
|
||||
// // Norwegian Nynorsk
|
||||
// $supportedLanguages['nn']['description'] = translate('Norwegian (Nynorsk)');
|
||||
// $supportedLanguages['nn']['nativedescription'] = 'Norsk Nynorsk';
|
||||
//
|
||||
// // Portuguese
|
||||
// $supportedLanguages['pt']['description'] = translate('Portuguese');
|
||||
// $supportedLanguages['pt']['nativedescription'] = 'Português';
|
||||
//
|
||||
// // Romanian
|
||||
// $supportedLanguages['ro']['description'] = translate('Romanian');
|
||||
// $supportedLanguages['ro']['nativedescription'] = 'Românesc';
|
||||
//
|
||||
// // Slovak
|
||||
// $supportedLanguages['sk']['description'] = translate('Slovak');
|
||||
// $supportedLanguages['sk']['nativedescription'] = 'Slovák';
|
||||
//
|
||||
// // Slovenian
|
||||
// $supportedLanguages['sl']['description'] = translate('Slovenian');
|
||||
// $supportedLanguages['sl']['nativedescription'] = 'Slovenščina';
|
||||
//
|
||||
// // Serbian
|
||||
// $supportedLanguages['sr']['description'] = translate('Serbian');
|
||||
// $supportedLanguages['sr']['nativedescription'] = 'Srpski';
|
||||
//
|
||||
// // Spanish (Mexico)
|
||||
// $supportedLanguages['es-MX']['description'] = translate('Spanish (Mexico)');
|
||||
// $supportedLanguages['es-MX']['nativedescription'] = 'Español Mejicano';
|
||||
//
|
||||
// // Swedish
|
||||
// $supportedLanguages['sv']['description'] = translate('Swedish');
|
||||
// $supportedLanguages['sv']['nativedescription'] = 'Svenska';
|
||||
//
|
||||
// // Turkish
|
||||
// $supportedLanguages['tr']['description'] = translate('Turkish');
|
||||
// $supportedLanguages['tr']['nativedescription'] = 'Türkçe';
|
||||
//
|
||||
// // Thai
|
||||
// $supportedLanguages['th']['description'] = translate('Thai');
|
||||
// $supportedLanguages['th']['nativedescription'] = 'ภาษาไทย';
|
||||
//
|
||||
// // Vietnamese
|
||||
// $supportedLanguages['vi']['description'] = translate('Vietnamese');
|
||||
// $supportedLanguages['vi']['nativedescription'] = 'Tiếng Việt';
|
||||
|
||||
uasort($supportedLanguages,"user_sort");
|
||||
Return $supportedLanguages;
|
||||
uasort($supportedLanguages, 'user_sort');
|
||||
return $supportedLanguages;
|
||||
}
|
||||
|
||||
function user_sort($a, $b) {
|
||||
// smarts is all-important, so sort it first
|
||||
if($a['description'] >$b['description']) {
|
||||
return 1;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
function user_sort($intValue1, $intValue2)
|
||||
{
|
||||
$intReturn = -1;
|
||||
// smarts is all-important, so sort it first
|
||||
if ($intValue1['description'] > $intValue2['description']) {
|
||||
$intReturn = 1;
|
||||
}
|
||||
return $intReturn;
|
||||
}
|
||||
?>
|
||||
8
functions/yui/build/element/element-beta-min.js
vendored
Normal file
8
functions/yui/build/element/element-beta-min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user