Commit adb6a1dc authored by clone's avatar clone

BUG

parent 5e1fca10
...@@ -19,7 +19,8 @@ if (!function_exists('create_editor')) { ...@@ -19,7 +19,8 @@ if (!function_exists('create_editor')) {
if (!empty($config)) { if (!empty($config)) {
$_config = array_merge($_config, $config); $_config = array_merge($_config, $config);
} }
$CKEditor->editor("describe", $value, $_config); //$CKEditor->editor("describe", $value, $_config);
$CKEditor->editor($id,$value,$_config);
} }
} }
......
...@@ -324,7 +324,7 @@ ...@@ -324,7 +324,7 @@
<!--<label for="" style="width: 100%;">内容</label>--> <!--<label for="" style="width: 100%;">内容</label>-->
<div class="input-group" style="width: 100%;" id="dajiangtang"> <div class="input-group" style="width: 100%;" id="dajiangtang">
<?php <?php
create_editor('describe'); create_editor('goods_sup_id','');
?> ?>
</div> </div>
</div> </div>
...@@ -434,7 +434,7 @@ ...@@ -434,7 +434,7 @@
<!--<label for="" style="width: 100%;">内容</label>--> <!--<label for="" style="width: 100%;">内容</label>-->
<div class="input-group" style="width: 100%;" id="dajiangtang"> <div class="input-group" style="width: 100%;" id="dajiangtang">
<?php <?php
create_editor('describe'); create_editor('goods_sup_id','');
?> ?>
</div> </div>
</div> </div>
......
...@@ -402,7 +402,9 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde ...@@ -402,7 +402,9 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
var _urlCut = location.origin + '/resource/lib/Attachments/images/';//要截取的部分url var _urlCut = location.origin + '/resource/lib/Attachments/images/';//要截取的部分url
var _dajiangtangObj = $('#dajiangtang'); //大讲堂 var _dajiangtangObj = $('#dajiangtang'); //大讲堂
var _dajiangtangVal = _dajiangtangObj.find('iframe').contents().find('body').html(); var _dajiangtangVal = _dajiangtangObj.find('iframe').contents().find('body').html();
console.log(_dajiangtangVal); console.log( getCKeditorValue("goods_sup_id"));
return false;
if(_liebiaoPicObj.length < 1) { if(_liebiaoPicObj.length < 1) {
alert('列表页封面图需要上传'); alert('列表页封面图需要上传');
......
...@@ -42,7 +42,7 @@ require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/ImagesConfig.php"; ...@@ -42,7 +42,7 @@ require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/ImagesConfig.php";
* @package CKFinder * @package CKFinder
* @subpackage Config * @subpackage Config
* @copyright CKSource - Frederico Knabben * @copyright CKSource - Frederico Knabben
* @global string $GLOBALS['config'] * @global string $GLOBALS ['config']
*/ */
class CKFinder_Connector_Core_Config class CKFinder_Connector_Core_Config
{ {
...@@ -62,11 +62,11 @@ class CKFinder_Connector_Core_Config ...@@ -62,11 +62,11 @@ class CKFinder_Connector_Core_Config
*/ */
private $_isEnabled = false; private $_isEnabled = false;
/** /**
* License Name * License Name
* *
* @var string * @var string
* @access private * @access private
*/ */
private $_licenseName = ""; private $_licenseName = "";
/** /**
* License Key * License Key
...@@ -157,7 +157,7 @@ class CKFinder_Connector_Core_Config ...@@ -157,7 +157,7 @@ class CKFinder_Connector_Core_Config
* @var array * @var array
* @access private * @access private
*/ */
private $_htmlExtensions = array('html', 'htm', 'xml', 'xsd', 'txt', 'js'); private $_htmlExtensions = array( 'html', 'htm', 'xml', 'xsd', 'txt', 'js' );
/** /**
* Chmod files after upload to the following permission * Chmod files after upload to the following permission
* *
...@@ -178,14 +178,14 @@ class CKFinder_Connector_Core_Config ...@@ -178,14 +178,14 @@ class CKFinder_Connector_Core_Config
* @var array * @var array
* @access private * @access private
*/ */
private $_hideFolders = array(".svn", "CVS"); private $_hideFolders = array( ".svn", "CVS" );
/** /**
* Hide files * Hide files
* *
* @var integer * @var integer
* @access private * @access private
*/ */
private $_hideFiles = array(".*"); private $_hideFiles = array( ".*" );
/** /**
* If set to true, force ASCII names * If set to true, force ASCII names
* *
...@@ -202,13 +202,13 @@ class CKFinder_Connector_Core_Config ...@@ -202,13 +202,13 @@ class CKFinder_Connector_Core_Config
private $_tempDirectory = ''; private $_tempDirectory = '';
/** /**
* If set to true send files using X-Sendfile server module * If set to true send files using X-Sendfile server module
* @var bool $_xsendfile * @var bool $_xsendfile
*/ */
private $_xsendfile = false; private $_xsendfile = false;
/** /**
* Additional Nginx X-Sendfile configuration * Additional Nginx X-Sendfile configuration
* *
* @var array $_xsendfileNginx Configuration for location => root * @var array $_xsendfileNginx Configuration for location => root
*/ */
private $_xsendfileNginx = array(); private $_xsendfileNginx = array();
...@@ -218,66 +218,66 @@ class CKFinder_Connector_Core_Config ...@@ -218,66 +218,66 @@ class CKFinder_Connector_Core_Config
} }
/** /**
* Get file system encoding, returns null if encoding is not set * Get file system encoding, returns null if encoding is not set
* *
* @access public * @access public
* @return string * @return string
*/ */
public function getFilesystemEncoding() public function getFilesystemEncoding()
{ {
return $this->_filesystemEncoding; return $this->_filesystemEncoding;
} }
/** /**
* Get "secureImageUploads" value * Get "secureImageUploads" value
* *
* @access public * @access public
* @return boolean * @return boolean
*/ */
public function getSecureImageUploads() public function getSecureImageUploads()
{ {
return $this->_secureImageUploads; return $this->_secureImageUploads;
} }
/** /**
* Get "checkSizeAfterScaling" value * Get "checkSizeAfterScaling" value
* *
* @access public * @access public
* @return boolean * @return boolean
*/ */
public function checkSizeAfterScaling() public function checkSizeAfterScaling()
{ {
return $this->_checkSizeAfterScaling; return $this->_checkSizeAfterScaling;
} }
/** /**
* Get "htmlExtensions" value * Get "htmlExtensions" value
* *
* @access public * @access public
* @return array * @return array
*/ */
public function getHtmlExtensions() public function getHtmlExtensions()
{ {
return $this->_htmlExtensions; return $this->_htmlExtensions;
} }
/** /**
* Get "forceAscii" value * Get "forceAscii" value
* *
* @access public * @access public
* @return array * @return array
*/ */
public function forceAscii() public function forceAscii()
{ {
return $this->_forceAscii; return $this->_forceAscii;
} }
/** /**
* Get regular expression to hide folders * Get regular expression to hide folders
* *
* @access public * @access public
* @return array * @return array
*/ */
public function getHideFoldersRegex() public function getHideFoldersRegex()
{ {
static $folderRegex; static $folderRegex;
...@@ -285,12 +285,11 @@ class CKFinder_Connector_Core_Config ...@@ -285,12 +285,11 @@ class CKFinder_Connector_Core_Config
if (!isset($folderRegex)) { if (!isset($folderRegex)) {
if (is_array($this->_hideFolders) && $this->_hideFolders) { if (is_array($this->_hideFolders) && $this->_hideFolders) {
$folderRegex = join("|", $this->_hideFolders); $folderRegex = join("|", $this->_hideFolders);
$folderRegex = strtr($folderRegex, array("?" => "__QMK__", "*" => "__AST__", "|" => "__PIP__")); $folderRegex = strtr($folderRegex, array( "?" => "__QMK__", "*" => "__AST__", "|" => "__PIP__" ));
$folderRegex = preg_quote($folderRegex, "/"); $folderRegex = preg_quote($folderRegex, "/");
$folderRegex = strtr($folderRegex, array("__QMK__" => ".", "__AST__" => ".*", "__PIP__" => "|")); $folderRegex = strtr($folderRegex, array( "__QMK__" => ".", "__AST__" => ".*", "__PIP__" => "|" ));
$folderRegex = "/^(?:" . $folderRegex . ")$/uim"; $folderRegex = "/^(?:" . $folderRegex . ")$/uim";
} } else {
else {
$folderRegex = ""; $folderRegex = "";
} }
} }
...@@ -299,11 +298,11 @@ class CKFinder_Connector_Core_Config ...@@ -299,11 +298,11 @@ class CKFinder_Connector_Core_Config
} }
/** /**
* Get regular expression to hide files * Get regular expression to hide files
* *
* @access public * @access public
* @return array * @return array
*/ */
public function getHideFilesRegex() public function getHideFilesRegex()
{ {
static $fileRegex; static $fileRegex;
...@@ -311,12 +310,11 @@ class CKFinder_Connector_Core_Config ...@@ -311,12 +310,11 @@ class CKFinder_Connector_Core_Config
if (!isset($fileRegex)) { if (!isset($fileRegex)) {
if (is_array($this->_hideFiles) && $this->_hideFiles) { if (is_array($this->_hideFiles) && $this->_hideFiles) {
$fileRegex = join("|", $this->_hideFiles); $fileRegex = join("|", $this->_hideFiles);
$fileRegex = strtr($fileRegex, array("?" => "__QMK__", "*" => "__AST__", "|" => "__PIP__")); $fileRegex = strtr($fileRegex, array( "?" => "__QMK__", "*" => "__AST__", "|" => "__PIP__" ));
$fileRegex = preg_quote($fileRegex, "/"); $fileRegex = preg_quote($fileRegex, "/");
$fileRegex = strtr($fileRegex, array("__QMK__" => ".", "__AST__" => ".*", "__PIP__" => "|")); $fileRegex = strtr($fileRegex, array( "__QMK__" => ".", "__AST__" => ".*", "__PIP__" => "|" ));
$fileRegex = "/^(?:" . $fileRegex . ")$/uim"; $fileRegex = "/^(?:" . $fileRegex . ")$/uim";
} } else {
else {
$fileRegex = ""; $fileRegex = "";
} }
} }
...@@ -325,44 +323,44 @@ class CKFinder_Connector_Core_Config ...@@ -325,44 +323,44 @@ class CKFinder_Connector_Core_Config
} }
/** /**
* Get "Check double extension" value * Get "Check double extension" value
* *
* @access public * @access public
* @return boolean * @return boolean
*/ */
public function getCheckDoubleExtension() public function getCheckDoubleExtension()
{ {
return $this->_checkDoubleExtension; return $this->_checkDoubleExtension;
} }
/** /**
* Get "Disallow unsafe characters" value * Get "Disallow unsafe characters" value
* *
* @access public * @access public
* @return boolean * @return boolean
*/ */
public function getDisallowUnsafeCharacters() public function getDisallowUnsafeCharacters()
{ {
return $this->_disallowUnsafeCharacters; return $this->_disallowUnsafeCharacters;
} }
/** /**
* Get default resource types * Get default resource types
* *
* @access public * @access public
* @return array() * @return array()
*/ */
public function getDefaultResourceTypes() public function getDefaultResourceTypes()
{ {
return $this->_defaultResourceTypes; return $this->_defaultResourceTypes;
} }
/** /**
* Is CKFinder enabled * Is CKFinder enabled
* *
* @access public * @access public
* @return boolean * @return boolean
*/ */
public function getIsEnabled() public function getIsEnabled()
{ {
return $this->_isEnabled; return $this->_isEnabled;
...@@ -391,67 +389,67 @@ class CKFinder_Connector_Core_Config ...@@ -391,67 +389,67 @@ class CKFinder_Connector_Core_Config
} }
/** /**
* Get license key * Get license key
* *
* @access public * @access public
* @return string * @return string
*/ */
public function getLicenseKey() public function getLicenseKey()
{ {
return $this->_licenseKey; return $this->_licenseKey;
} }
/** /**
* Get license name * Get license name
* *
* @access public * @access public
* @return string * @return string
*/ */
public function getLicenseName() public function getLicenseName()
{ {
return $this->_licenseName; return $this->_licenseName;
} }
/** /**
* Get chmod settings for uploaded files * Get chmod settings for uploaded files
* *
* @access public * @access public
* @return integer * @return integer
*/ */
public function getChmodFiles() public function getChmodFiles()
{ {
return $this->_chmodFiles; return $this->_chmodFiles;
} }
/** /**
* Get chmod settings for created directories * Get chmod settings for created directories
* *
* @access public * @access public
* @return integer * @return integer
*/ */
public function getChmodFolders() public function getChmodFolders()
{ {
return $this->_chmodFolders; return $this->_chmodFolders;
} }
/** /**
* Get role sesion variable name * Get role sesion variable name
* *
* @access public * @access public
* @return string * @return string
*/ */
public function getRoleSessionVar() public function getRoleSessionVar()
{ {
return $this->_roleSessionVar; return $this->_roleSessionVar;
} }
/** /**
* Get resourceTypeName config * Get resourceTypeName config
* *
* @param string $resourceTypeName * @param string $resourceTypeName
* @return CKFinder_Connector_Core_ResourceTypeConfig|null * @return CKFinder_Connector_Core_ResourceTypeConfig|null
* @access public * @access public
*/ */
public function &getResourceTypeConfig($resourceTypeName) public function &getResourceTypeConfig($resourceTypeName)
{ {
$_null = null; $_null = null;
...@@ -465,7 +463,15 @@ class CKFinder_Connector_Core_Config ...@@ -465,7 +463,15 @@ class CKFinder_Connector_Core_Config
} }
reset($GLOBALS['config']['ResourceType']); reset($GLOBALS['config']['ResourceType']);
while (list($_key,$_resourceTypeNode) = each($GLOBALS['config']['ResourceType'])) { /* while (list($_key,$_resourceTypeNode) = each($GLOBALS['config']['ResourceType'])) {
if ($_resourceTypeNode['name'] === $resourceTypeName) {
$this->_resourceTypeConfigCache[$resourceTypeName] = new CKFinder_Connector_Core_ResourceTypeConfig($_resourceTypeNode);
return $this->_resourceTypeConfigCache[$resourceTypeName];
}
}*/
foreach ($GLOBALS['config']['ResourceType'] as $_key => $_resourceTypeNode) {
if ($_resourceTypeNode['name'] === $resourceTypeName) { if ($_resourceTypeNode['name'] === $resourceTypeName) {
$this->_resourceTypeConfigCache[$resourceTypeName] = new CKFinder_Connector_Core_ResourceTypeConfig($_resourceTypeNode); $this->_resourceTypeConfigCache[$resourceTypeName] = new CKFinder_Connector_Core_ResourceTypeConfig($_resourceTypeNode);
...@@ -531,10 +537,10 @@ class CKFinder_Connector_Core_Config ...@@ -531,10 +537,10 @@ class CKFinder_Connector_Core_Config
if (function_exists('CheckAuthentication')) { if (function_exists('CheckAuthentication')) {
$this->_isEnabled = CheckAuthentication(); $this->_isEnabled = CheckAuthentication();
} }
if(isset($GLOBALS['config']['Resource_Root_Dir'])){ if (isset($GLOBALS['config']['Resource_Root_Dir'])) {
$this->_resource_root_dir = (string)$GLOBALS['config']['Resource_Root_Dir']; $this->_resource_root_dir = (string)$GLOBALS['config']['Resource_Root_Dir'];
} }
if(isset($GLOBALS['config']['Resource_Space_Size'])){ if (isset($GLOBALS['config']['Resource_Space_Size'])) {
$this->_resource_space_size = (array)$GLOBALS['config']['Resource_Space_Size']; $this->_resource_space_size = (array)$GLOBALS['config']['Resource_Space_Size'];
} }
if (isset($GLOBALS['config']['LicenseName'])) { if (isset($GLOBALS['config']['LicenseName'])) {
...@@ -586,13 +592,13 @@ class CKFinder_Connector_Core_Config ...@@ -586,13 +592,13 @@ class CKFinder_Connector_Core_Config
} }
} }
if (isset($GLOBALS['config']['TempDirectory'])) { if (isset($GLOBALS['config']['TempDirectory'])) {
$this->_tempDirectory = $GLOBALS['config']['TempDirectory']; $this->_tempDirectory = $GLOBALS['config']['TempDirectory'];
} }
if (isset($GLOBALS['config']['XSendfile'])) { if (isset($GLOBALS['config']['XSendfile'])) {
$this->_xsendfile = CKFinder_Connector_Utils_Misc::booleanValue($GLOBALS['config']['XSendfile']); $this->_xsendfile = CKFinder_Connector_Utils_Misc::booleanValue($GLOBALS['config']['XSendfile']);
} }
if (isset($GLOBALS['config']['XSendfileNginx'])) { if (isset($GLOBALS['config']['XSendfileNginx'])) {
$this->_xsendfileNginx = (array)$GLOBALS['config']['XSendfileNginx']; $this->_xsendfileNginx = (array)$GLOBALS['config']['XSendfileNginx'];
} }
} }
...@@ -625,32 +631,34 @@ class CKFinder_Connector_Core_Config ...@@ -625,32 +631,34 @@ class CKFinder_Connector_Core_Config
*/ */
public function getTempDirectory() public function getTempDirectory()
{ {
return $this->_tempDirectory; return $this->_tempDirectory;
} }
/** /**
* Get X-Sendfile option * Get X-Sendfile option
*/ */
public function getXSendfile(){ public function getXSendfile()
return $this->_xsendfile; {
return $this->_xsendfile;
} }
/** /**
* Get the dditional Nginx X-Sendfile configuration (location => root) * Get the dditional Nginx X-Sendfile configuration (location => root)
*/ */
public function getXSendfileNginx(){ public function getXSendfileNginx()
$xsendfileNginx = array(); {
foreach ( $this->_xsendfileNginx as $location => $root ){ $xsendfileNginx = array();
$root = (string)$root; foreach ($this->_xsendfileNginx as $location => $root) {
$location = rtrim((string)$location,'/').'/'; $root = (string)$root;
if ( substr($root,-1,1) != '/' && substr($root,-1,1) != '\\') { $location = rtrim((string)$location, '/') . '/';
// root and location paths are concatenated if (substr($root, -1, 1) != '/' && substr($root, -1, 1) != '\\') {
// @see http://wiki.nginx.org/XSendfile // root and location paths are concatenated
$root = CKFinder_Connector_Utils_FileSystem::combinePaths(rtrim($root,'/'),$location); // @see http://wiki.nginx.org/XSendfile
} $root = CKFinder_Connector_Utils_FileSystem::combinePaths(rtrim($root, '/'), $location);
$xsendfileNginx[$location] = $root; }
} $xsendfileNginx[$location] = $root;
return $xsendfileNginx; }
return $xsendfileNginx;
} }
} }
var global = {
'attach_prefix' : '/public/resource/lib/Attachments/'
}
function BrowseServer(input_image,fun ) function BrowseServer(input_image,fun )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment