diff --git a/framework/base/control.class.php b/framework/base/control.class.php index 6a888e308d..8a5211adb2 100644 --- a/framework/base/control.class.php +++ b/framework/base/control.class.php @@ -445,44 +445,114 @@ class baseControl */ public function getCSS($moduleName, $methodName) { - $moduleName = strtolower(trim($moduleName)); - $methodName = strtolower(trim($methodName)); + $moduleName = strtolower(trim($moduleName)); + $methodName = strtolower(trim($methodName)); - $modulePath = $this->app->getModulePath($this->appName, $moduleName); - $cssExtPath = $this->app->getModuleExtPath($this->appName, $moduleName, 'css') ; + $modulePath = $this->app->getModulePath($this->appName, $moduleName); + $cssExtPath = $this->app->getModuleExtPath($this->appName, $moduleName, 'css') ; - $css = ''; - $mainCssFile = $modulePath . 'css' . DS . $this->devicePrefix . 'common.css'; - $methodCssFile = $modulePath . 'css' . DS . $this->devicePrefix . $methodName . '.css'; - if(file_exists($mainCssFile)) $css .= file_get_contents($mainCssFile); - if(is_file($methodCssFile)) $css .= file_get_contents($methodCssFile); + $clientLang = $this->app->getClientLang(); + $notCNLang = strpos('|zh-cn|zh-tw|', "|{$clientLang}|") === false; + + $css = ''; + $devicePrefix = $this->devicePrefix; + $mainCssPath = $modulePath . 'css' . DS; + + /* Common css file. like module/story/css/common.css. */ + $mainCssFile = $mainCssPath . $devicePrefix . 'common.css'; + if(is_file($mainCssFile)) $css .= file_get_contents($mainCssFile); + + /* Common css file with lang. like module/story/css/common.en.css. */ + $mainCssLangFile = $mainCssPath . $devicePrefix . "common.{$clientLang}.css"; + if(!file_exists($mainCssLangFile) and $notCNLang) $mainCssLangFile = $mainCssPath . $devicePrefix . "common.en.css"; + if(is_file($mainCssLangFile)) $css .= file_get_contents($mainCssLangFile); + + /* Method css file. like module/story/css/create.css. */ + $methodCssFile = $mainCssPath . $devicePrefix . $methodName . '.css'; + if(is_file($methodCssFile)) $css .= file_get_contents($methodCssFile); + + /* Method css file with lang. like module/story/css/create.en.css. */ + $methodCssLangFile = $mainCssPath . $devicePrefix . "{$methodName}.{$clientLang}.css"; + if(!file_exists($methodCssLangFile) and $notCNLang) $methodCssLangFile = $mainCssPath . $devicePrefix . "{$methodName}.en.css"; + if(is_file($methodCssLangFile)) $css .= file_get_contents($methodCssLangFile); if(!empty($cssExtPath)) { $cssMethodExt = $cssExtPath['common'] . $methodName . DS; $cssCommonExt = $cssExtPath['common'] . 'common' . DS; - $cssExtFiles = glob($cssCommonExt . $this->devicePrefix . '*.css'); - if(!empty($cssExtFiles) and is_array($cssExtFiles)) foreach($cssExtFiles as $cssFile) $css .= file_get_contents($cssFile); + $cssExtFiles = glob($cssCommonExt . $devicePrefix . '*.css'); + if(!empty($cssExtFiles) and is_array($cssExtFiles)) $css .= $this->getExtCSS($cssExtFiles); - $cssExtFiles = glob($cssMethodExt . $this->devicePrefix . '*.css'); - if(!empty($cssExtFiles) and is_array($cssExtFiles)) foreach($cssExtFiles as $cssFile) $css .= file_get_contents($cssFile); + $cssExtFiles = glob($cssMethodExt . $devicePrefix . '*.css'); + if(!empty($cssExtFiles) and is_array($cssExtFiles)) $css .= $this->getExtCSS($cssExtFiles); if(!empty($cssExtPath['site'])) { $cssMethodExt = $cssExtPath['site'] . $methodName . DS; $cssCommonExt = $cssExtPath['site'] . 'common' . DS; - $cssExtFiles = glob($cssCommonExt . $this->devicePrefix . '*.css'); - if(!empty($cssExtFiles) and is_array($cssExtFiles)) foreach($cssExtFiles as $cssFile) $css .= file_get_contents($cssFile); + $cssExtFiles = glob($cssCommonExt . $devicePrefix . '*.css'); + if(!empty($cssExtFiles) and is_array($cssExtFiles)) $css .= $this->getExtCSS($cssExtFiles); - $cssExtFiles = glob($cssMethodExt . $this->devicePrefix . '*.css'); - if(!empty($cssExtFiles) and is_array($cssExtFiles)) foreach($cssExtFiles as $cssFile) $css .= file_get_contents($cssFile); + $cssExtFiles = glob($cssMethodExt . $devicePrefix . '*.css'); + if(!empty($cssExtFiles) and is_array($cssExtFiles)) $css .= $this->getExtCSS($cssExtFiles); } } return $css; } + /** + * Get extension css and extension css with lang. + * + * @param array $files + * @access public + * @return string + */ + public function getExtCSS($files) + { + $clientLang = $this->app->getClientLang(); + $notCNLang = strpos('|zh-cn|zh-tw|', "|{$clientLang}|") === false; + + $filePairs = array(); + foreach($files as $cssFile) + { + $fileName = basename($cssFile); + $filePairs[$fileName] = $cssFile; + } + + $css = ''; + $usedCodes = array(); + foreach($filePairs as $fileName => $cssFile) + { + if(preg_match('/^\w+\.css$/', $fileName)) + { + /* Method extension css file. like module/story/ext/css/create/effort.css. */ + $css .= file_get_contents($cssFile); + list($code) = explode('.', $fileName); + } + else + { + list($code) = explode('.', $fileName); + if(isset($usedCodes[$code])) continue; + } + + + /* Method extension css file. like module/story/ext/css/create/effort.zh-cn.css. */ + if(isset($filePairs["{$code}.{$clientLang}.css"])) + { + $css .= file_get_contents($filePairs["{$code}.{$clientLang}.css"]); + } + elseif($notCNLang and isset($filePairs["{$code}.en.css"])) + { + $css .= file_get_contents($filePairs["{$code}.en.css"]); + } + $usedCodes[$code] = $code; + } + + return $css; + } + /** * 获取适用于当前方法的js:该模块公用的js + 当前方法的js + 扩展的js。 * Get js codes applied to current method: module common js + method js + extension js. diff --git a/framework/control.class.php b/framework/control.class.php index 61b1e704b7..b98973b91f 100644 --- a/framework/control.class.php +++ b/framework/control.class.php @@ -21,10 +21,10 @@ include dirname(__FILE__) . '/base/control.class.php'; class control extends baseControl { /** - * 加载指定模块的model文件。 - * Load the model file of one module. - * - * Extension: set appName as empty. + * 企业版部分功能是从然之合并过来的。然之代码中调用loadModel方法时传递了一个非空的appName,在禅道中会导致错误。 + * 调用父类的loadModel方法来避免这个错误。 + * Some codes merged from ranzhi called the function loadModel with a non-empty appName which causes an error in zentao. + * Call the parent function with empty appName to avoid this error. * * @param string $moduleName 模块名,如果为空,使用当前模块。The module name, if empty, use current module's name. * @param string $appName The app name, if empty, use current app's name. @@ -33,52 +33,7 @@ class control extends baseControl */ public function loadModel($moduleName = '', $appName = '') { - $appName = ''; - - if(empty($moduleName)) $moduleName = $this->moduleName; - if(empty($appName)) $appName = $this->appName; - - global $loadedModels; - if(isset($loadedModels[$appName][$moduleName])) - { - $this->$moduleName = $loadedModels[$appName][$moduleName]; - $this->dao = $this->$moduleName->dao; - return $this->$moduleName; - } - - $modelFile = $this->app->setModelFile($moduleName, $appName); - - /** - * 如果没有model文件,尝试加载config配置信息。 - * If no model file, try load config. - */ - if(!helper::import($modelFile)) - { - $this->app->loadModuleConfig($moduleName, $appName); - $this->app->loadLang($moduleName, $appName); - $this->dao = new dao(); - return false; - } - - /** - * 如果没有扩展文件,model类名是$moduleName + 'model',如果有扩展,还需要增加ext前缀。 - * If no extension file, model class name is $moduleName + 'model', else with 'ext' as the prefix. - */ - $modelClass = class_exists('ext' . $appName . $moduleName. 'model') ? 'ext' . $appName . $moduleName . 'model' : $appName . $moduleName . 'model'; - if(!class_exists($modelClass)) - { - $modelClass = class_exists('ext' . $moduleName. 'model') ? 'ext' . $moduleName . 'model' : $moduleName . 'model'; - if(!class_exists($modelClass)) $this->app->triggerError(" The model $modelClass not found", __FILE__, __LINE__, $exit = true); - } - - /** - * 初始化model对象,在control对象中可以通过$this->$moduleName来引用。同时将dao对象赋为control对象的成员变量,方便引用。 - * Init the model object thus you can try $this->$moduleName to access it. Also assign the $dao object as a member of control object. - */ - $loadedModels[$appName][$moduleName] = new $modelClass($appName); - $this->$moduleName = $loadedModels[$appName][$moduleName]; - $this->dao = $this->$moduleName->dao; - return $this->$moduleName; + return parent::loadModel($moduleName); } /** diff --git a/framework/model.class.php b/framework/model.class.php index caa3db33d1..5132163f4c 100644 --- a/framework/model.class.php +++ b/framework/model.class.php @@ -21,12 +21,10 @@ include dirname(__FILE__) . '/base/model.class.php'; class model extends baseModel { /** - * 加载一个模块的model。加载完成后,使用$this->$moduleName来访问这个model对象。 - * 比如:loadModel('user')引入user模块的model实例对象,可以通过$this->user来访问它。 - * - * Load the model of one module. After loaded, can use $this->$moduleName to visit the model object. - * - * Extension: set appName as empty. + * 企业版部分功能是从然之合并过来的。然之代码中调用loadModel方法时传递了一个非空的appName,在禅道中会导致错误。 + * 调用父类的loadModel方法来避免这个错误。 + * Some codes merged from ranzhi called the function loadModel with a non-empty appName which causes an error in zentao. + * Call the parent function with empty appName to avoid this error. * * @param string $moduleName * @access public @@ -34,31 +32,7 @@ class model extends baseModel */ public function loadModel($moduleName, $appName = '') { - $appName = ''; - - if(empty($moduleName)) return false; - if(empty($appName)) $appName = $this->appName; - - global $loadedModels; - if(isset($loadedModels[$appName][$moduleName])) - { - $this->$moduleName = $loadedModels[$appName][$moduleName]; - return $this->$moduleName; - } - - $modelFile = $this->app->setModelFile($moduleName, $appName); - - if(!helper::import($modelFile)) return false; - $modelClass = class_exists('ext' . $appName . $moduleName. 'model') ? 'ext' . $appName . $moduleName . 'model' : $appName . $moduleName . 'model'; - if(!class_exists($modelClass)) - { - $modelClass = class_exists('ext' . $moduleName. 'model') ? 'ext' . $moduleName . 'model' : $moduleName . 'model'; - if(!class_exists($modelClass)) $this->app->triggerError(" The model $modelClass not found", __FILE__, __LINE__, $exit = true); - } - - $loadedModels[$appName][$moduleName] = new $modelClass($appName); - $this->$moduleName = $loadedModels[$appName][$moduleName]; - return $this->$moduleName; + return parent::loadModel($moduleName); } /** diff --git a/framework/router.class.php b/framework/router.class.php index 3879faeae1..fd1cbd4bdc 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -66,8 +66,10 @@ class router extends baseRouter } /** - * 加载语言文件,返回全局$lang对象。 - * Load lang and return it as the global lang object. + * 企业版部分功能是从然之合并过来的。然之代码中调用loadLang方法时传递了一个非空的appName,在禅道中会导致错误。 + * 把appName设置为空来避免这个错误。 + * Some codes merged from ranzhi called the function loadLang with a non-empty appName which causes an error in zentao. + * Set the value of appName to empty to avoid this error. * * @param string $moduleName the module name * @param string $appName the app name @@ -176,13 +178,10 @@ class router extends baseRouter } /** - * 加载模块的config文件,返回全局$config对象。 - * 如果该模块是common,加载$configRoot的配置文件,其他模块则加载其模块的配置文件。 - * - * Load config and return it as the global config object. - * If the module is common, search in $configRoot, else in $modulePath. - * - * Extension: set appName as empty. + * 企业版部分功能是从然之合并过来的。然之代码中调用loadModuleConfig方法时传递了一个非空的appName,在禅道中会导致错误。 + * 把appName设置为空来避免这个错误。 + * Some codes merged from ranzhi called the function loadModuleConfig with a non-empty appName which causes an error in zentao. + * Set the value of appName to empty to avoid this error. * * @param string $moduleName module name * @param string $appName app name diff --git a/lib/base/front/front.class.php b/lib/base/front/front.class.php index 6fbe58ac12..4281932177 100644 --- a/lib/base/front/front.class.php +++ b/lib/base/front/front.class.php @@ -1075,6 +1075,7 @@ EOT; $jsLang = new stdclass(); $jsLang->submitting = isset($lang->loading) ? $lang->loading : ''; $jsLang->save = $jsConfig->save; + $jsLang->expand = isset($lang->expand) ? $lang->expand : ''; $jsLang->timeout = isset($lang->timeout) ? $lang->timeout : ''; $js = self::start(false); diff --git a/lib/filter/filter.class.php b/lib/filter/filter.class.php index 9de422aca0..a6e1ae9d42 100644 --- a/lib/filter/filter.class.php +++ b/lib/filter/filter.class.php @@ -47,7 +47,19 @@ class fixer extends baseFixer foreach($this->data as $field => $value) { /* Implode array when form has array. */ - if(isset($flowFields[$field]) and is_array($value)) $this->data->$field = implode(',', $value); + if(isset($flowFields[$field]) and is_array($value)) + { + $canImplode = true; + foreach($value as $k => $v) + { + if(is_object($v) or is_array($v)) + { + $canImplode = false; + break; + } + } + if($canImplode) $this->data->$field = implode(',', $value); + } $this->specialChars($field); } diff --git a/lib/phpmailer/class.smtp.php b/lib/phpmailer/class.smtp.php index d8bfd6f136..1d2aa89c82 100644 --- a/lib/phpmailer/class.smtp.php +++ b/lib/phpmailer/class.smtp.php @@ -617,7 +617,7 @@ class SMTP { protected function parseHelloFields($type) { - $this->server_caps = []; + $this->server_caps = array(); $lines = explode("\n", $this->helo_rply); foreach ($lines as $n => $s) { @@ -639,7 +639,7 @@ class SMTP { break; case 'AUTH': if (!is_array($fields)) { - $fields = []; + $fields = array(); } break; default: diff --git a/module/action/model.php b/module/action/model.php index 4c6093d3f0..20231c749b 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -45,9 +45,11 @@ class actionModel extends model $action->actor = $actor; $action->action = $actionType; $action->date = helper::now(); - $action->comment = trim(strip_tags($comment, $this->config->allowedTags)); $action->extra = $extra; + $_POST['comment'] = $comment; + $action->comment = fixer::input('post')->stripTags('comment')->get('comment'); + /* Process action. */ $action = $this->loadModel('file')->processImgURL($action, 'comment', $this->post->uid); if($autoDelete) $this->file->autoDelete($this->post->uid); diff --git a/module/action/view/trash.html.php b/module/action/view/trash.html.php index d38027d700..6e56576a07 100755 --- a/module/action/view/trash.html.php +++ b/module/action/view/trash.html.php @@ -53,7 +53,7 @@ $flow = $config->action->customFlows[$action->objectType]; $module = $flow->module; } - if(strpos(',doclib,module,webhook,workflowdatasource,workflowfield,workflowlabel,workflowlayout,workflowrule,', ",{$module},") !== false) + if(strpos(',doclib,module,webhook,', ",{$module},") !== false) { echo $action->objectName; } diff --git a/module/admin/css/safe.css b/module/admin/css/safe.css deleted file mode 100644 index 940f4e5493..0000000000 --- a/module/admin/css/safe.css +++ /dev/null @@ -1,2 +0,0 @@ -.thWidth{width:300px !important;} -html[lang^='zh-'] .thWidth{width:130px !important;} diff --git a/module/admin/css/safe.en.css b/module/admin/css/safe.en.css new file mode 100644 index 0000000000..968bede65b --- /dev/null +++ b/module/admin/css/safe.en.css @@ -0,0 +1 @@ +.thWidth{width:300px !important;} diff --git a/module/admin/css/safe.zh-cn.css b/module/admin/css/safe.zh-cn.css new file mode 100644 index 0000000000..82442a3745 --- /dev/null +++ b/module/admin/css/safe.zh-cn.css @@ -0,0 +1 @@ +.thWidth{width:130px !important;} diff --git a/module/admin/css/safe.zh-tw.css b/module/admin/css/safe.zh-tw.css new file mode 100644 index 0000000000..82442a3745 --- /dev/null +++ b/module/admin/css/safe.zh-tw.css @@ -0,0 +1 @@ +.thWidth{width:130px !important;} diff --git a/module/backup/css/index.css b/module/backup/css/index.css deleted file mode 100644 index e399fae36d..0000000000 --- a/module/backup/css/index.css +++ /dev/null @@ -1,2 +0,0 @@ -.actionWidth{width:140px !important;} -html[lang^='zh-'] .actionWidth{width:110px !important;} diff --git a/module/backup/css/index.en.css b/module/backup/css/index.en.css new file mode 100644 index 0000000000..e38ab72482 --- /dev/null +++ b/module/backup/css/index.en.css @@ -0,0 +1 @@ +.actionWidth{width:140px !important;} diff --git a/module/backup/css/index.zh-cn.css b/module/backup/css/index.zh-cn.css new file mode 100644 index 0000000000..451eb8c96e --- /dev/null +++ b/module/backup/css/index.zh-cn.css @@ -0,0 +1 @@ +.actionWidth{width:110px !important;} diff --git a/module/backup/css/index.zh-tw.css b/module/backup/css/index.zh-tw.css new file mode 100644 index 0000000000..451eb8c96e --- /dev/null +++ b/module/backup/css/index.zh-tw.css @@ -0,0 +1 @@ +.actionWidth{width:110px !important;} diff --git a/module/bug/css/create.css b/module/bug/css/create.css index f1e616083b..f006a70179 100644 --- a/module/bug/css/create.css +++ b/module/bug/css/create.css @@ -38,6 +38,7 @@ html[lang='en'] #deadlineTd .input-group-addon{padding: 5px 18px} .title-group #severity + .chosen-container > .chosen-single {border-radius: 0!important;} .title-group #pri + .chosen-container > .chosen-single {border-top-left-radius: 0!important; border-bottom-left-radius: 0!important;} .title-group .has-icon-right{min-width:700px} +#mainContent .center-block{padding-bottom:40px;} #typeBox {width:180px;} #osBox {width:190px;} diff --git a/module/bug/css/edit.css b/module/bug/css/edit.css index ddb55edfd8..581c88c64e 100644 --- a/module/bug/css/edit.css +++ b/module/bug/css/edit.css @@ -4,6 +4,3 @@ .col-side .chosen-container[id^="resolvedBuild"] {width: 172px!important} .chosen-choices li.search-choice{word-break: break-all;} #linkBugBox > li {margin-left:-56px} - -.thWidth{width:100px !important;} -html[lang^='zh-'] .thWidth{width:80px !important;} diff --git a/module/bug/css/edit.en.css b/module/bug/css/edit.en.css new file mode 100644 index 0000000000..b0e274a3db --- /dev/null +++ b/module/bug/css/edit.en.css @@ -0,0 +1 @@ +.thWidth{width:100px !important;} diff --git a/module/bug/css/edit.zh-cn.css b/module/bug/css/edit.zh-cn.css new file mode 100644 index 0000000000..585844a6f4 --- /dev/null +++ b/module/bug/css/edit.zh-cn.css @@ -0,0 +1 @@ +.thWidth{width:80px !important;} diff --git a/module/bug/css/edit.zh-tw.css b/module/bug/css/edit.zh-tw.css new file mode 100644 index 0000000000..585844a6f4 --- /dev/null +++ b/module/bug/css/edit.zh-tw.css @@ -0,0 +1 @@ +.thWidth{width:80px !important;} diff --git a/module/bug/css/resolve.css b/module/bug/css/resolve.css index eafaa6152e..097655b0a0 100644 --- a/module/bug/css/resolve.css +++ b/module/bug/css/resolve.css @@ -1,4 +1 @@ .chosen-container[id^="buildProject"] {max-width: 160px; border-radius: 0} - -.thWidth{width:130px !important;} -html[lang^='zh-'] .thWidth{width:100px !important;} diff --git a/module/bug/css/resolve.en.css b/module/bug/css/resolve.en.css new file mode 100644 index 0000000000..82442a3745 --- /dev/null +++ b/module/bug/css/resolve.en.css @@ -0,0 +1 @@ +.thWidth{width:130px !important;} diff --git a/module/bug/css/resolve.zh-cn.css b/module/bug/css/resolve.zh-cn.css new file mode 100644 index 0000000000..b0e274a3db --- /dev/null +++ b/module/bug/css/resolve.zh-cn.css @@ -0,0 +1 @@ +.thWidth{width:100px !important;} diff --git a/module/bug/css/resolve.zh-tw.css b/module/bug/css/resolve.zh-tw.css new file mode 100644 index 0000000000..b0e274a3db --- /dev/null +++ b/module/bug/css/resolve.zh-tw.css @@ -0,0 +1 @@ +.thWidth{width:100px !important;} diff --git a/module/bug/css/view.css b/module/bug/css/view.css index 065bf82cc4..f426ccc058 100644 --- a/module/bug/css/view.css +++ b/module/bug/css/view.css @@ -3,8 +3,3 @@ .table-data tr > td{word-break: break-all; word-wrap: break-word;} .side-col .cell{padding:0px;} .tab-pane table {border: 1px solid #ddd; border-top: none;} - -#legendBasicInfo .thWidth{width:110px !important;} -#legendLife .thWidth{width:100px !important;} -html[lang^='zh-'] #legendBasicInfo .thWidth{width:70px !important;} -html[lang^='zh-'] #legendLife .thWidth{width:90px !important;} diff --git a/module/bug/css/view.en.css b/module/bug/css/view.en.css new file mode 100644 index 0000000000..a12586a55b --- /dev/null +++ b/module/bug/css/view.en.css @@ -0,0 +1,2 @@ +#legendBasicInfo .thWidth{width:110px !important;} +#legendLife .thWidth{width:100px !important;} diff --git a/module/bug/css/view.zh-cn.css b/module/bug/css/view.zh-cn.css new file mode 100644 index 0000000000..ae536dd36e --- /dev/null +++ b/module/bug/css/view.zh-cn.css @@ -0,0 +1,2 @@ +#legendBasicInfo .thWidth{width:70px !important;} +#legendLife .thWidth{width:90px !important;} diff --git a/module/bug/css/view.zh-tw.css b/module/bug/css/view.zh-tw.css new file mode 100644 index 0000000000..ae536dd36e --- /dev/null +++ b/module/bug/css/view.zh-tw.css @@ -0,0 +1,2 @@ +#legendBasicInfo .thWidth{width:70px !important;} +#legendLife .thWidth{width:90px !important;} diff --git a/module/company/css/edit.css b/module/company/css/edit.css deleted file mode 100644 index be70b5a9c2..0000000000 --- a/module/company/css/edit.css +++ /dev/null @@ -1,2 +0,0 @@ -.thWidth{width:120px !important;} -html[lang^='zh-'] .thWidth{width:80px !important;} diff --git a/module/company/css/edit.en.css b/module/company/css/edit.en.css new file mode 100644 index 0000000000..62f3e6f10c --- /dev/null +++ b/module/company/css/edit.en.css @@ -0,0 +1 @@ +.thWidth{width:120px !important;} diff --git a/module/company/css/edit.zh-cn.css b/module/company/css/edit.zh-cn.css new file mode 100644 index 0000000000..585844a6f4 --- /dev/null +++ b/module/company/css/edit.zh-cn.css @@ -0,0 +1 @@ +.thWidth{width:80px !important;} diff --git a/module/company/css/edit.zh-tw.css b/module/company/css/edit.zh-tw.css new file mode 100644 index 0000000000..585844a6f4 --- /dev/null +++ b/module/company/css/edit.zh-tw.css @@ -0,0 +1 @@ +.thWidth{width:80px !important;} diff --git a/module/custom/css/required.css b/module/custom/css/required.css deleted file mode 100644 index 9c5f944bf1..0000000000 --- a/module/custom/css/required.css +++ /dev/null @@ -1,2 +0,0 @@ -.thWidth{width:250px !important;} -html[lang^='zh-'] .thWidth{width:120px !important;} diff --git a/module/custom/css/required.en.css b/module/custom/css/required.en.css new file mode 100644 index 0000000000..3f91eb211b --- /dev/null +++ b/module/custom/css/required.en.css @@ -0,0 +1 @@ +.thWidth{width:250px !important;} diff --git a/module/custom/css/required.zh-cn.css b/module/custom/css/required.zh-cn.css new file mode 100644 index 0000000000..62f3e6f10c --- /dev/null +++ b/module/custom/css/required.zh-cn.css @@ -0,0 +1 @@ +.thWidth{width:120px !important;} diff --git a/module/custom/css/required.zh-tw.css b/module/custom/css/required.zh-tw.css new file mode 100644 index 0000000000..62f3e6f10c --- /dev/null +++ b/module/custom/css/required.zh-tw.css @@ -0,0 +1 @@ +.thWidth{width:120px !important;} diff --git a/module/custom/css/set.css b/module/custom/css/set.css deleted file mode 100644 index b7f3c09196..0000000000 --- a/module/custom/css/set.css +++ /dev/null @@ -1,2 +0,0 @@ -.thWidth{width:140px !important;} -html[lang^='zh-'] .thWidth{width:80px !important;} diff --git a/module/custom/css/set.en.css b/module/custom/css/set.en.css new file mode 100644 index 0000000000..ba5d77e51b --- /dev/null +++ b/module/custom/css/set.en.css @@ -0,0 +1 @@ +.thWidth{width:140px !important;} diff --git a/module/custom/css/set.zh-cn.css b/module/custom/css/set.zh-cn.css new file mode 100644 index 0000000000..585844a6f4 --- /dev/null +++ b/module/custom/css/set.zh-cn.css @@ -0,0 +1 @@ +.thWidth{width:80px !important;} diff --git a/module/custom/css/set.zh-tw.css b/module/custom/css/set.zh-tw.css new file mode 100644 index 0000000000..585844a6f4 --- /dev/null +++ b/module/custom/css/set.zh-tw.css @@ -0,0 +1 @@ +.thWidth{width:80px !important;} diff --git a/module/dept/css/edit.css b/module/dept/css/edit.css deleted file mode 100644 index ebe41c894d..0000000000 --- a/module/dept/css/edit.css +++ /dev/null @@ -1,2 +0,0 @@ -.thWidth{width:130px !important;} -html[lang^='zh-'] .thWidth{width:80px !important;} diff --git a/module/dept/css/edit.en.css b/module/dept/css/edit.en.css new file mode 100644 index 0000000000..82442a3745 --- /dev/null +++ b/module/dept/css/edit.en.css @@ -0,0 +1 @@ +.thWidth{width:130px !important;} diff --git a/module/dept/css/edit.zh-cn.css b/module/dept/css/edit.zh-cn.css new file mode 100644 index 0000000000..585844a6f4 --- /dev/null +++ b/module/dept/css/edit.zh-cn.css @@ -0,0 +1 @@ +.thWidth{width:80px !important;} diff --git a/module/dept/css/edit.zh-tw.css b/module/dept/css/edit.zh-tw.css new file mode 100644 index 0000000000..585844a6f4 --- /dev/null +++ b/module/dept/css/edit.zh-tw.css @@ -0,0 +1 @@ +.thWidth{width:80px !important;} diff --git a/module/group/css/managepriv.css b/module/group/css/managepriv.css index c82b07f179..a7d7b2b229 100644 --- a/module/group/css/managepriv.css +++ b/module/group/css/managepriv.css @@ -6,6 +6,3 @@ #mainMenu #groupName{line-height:33px; float: left} .checkbox-right{padding-left:0px !important;} - -.thWidth{width:180px !important;} -html[lang^='zh-'] .thWidth{width:150px !important;} diff --git a/module/group/css/managepriv.en.css b/module/group/css/managepriv.en.css new file mode 100644 index 0000000000..3852bbb549 --- /dev/null +++ b/module/group/css/managepriv.en.css @@ -0,0 +1 @@ +.thWidth{width:180px !important;} diff --git a/module/group/css/managepriv.zh-cn.css b/module/group/css/managepriv.zh-cn.css new file mode 100644 index 0000000000..6ea5450c92 --- /dev/null +++ b/module/group/css/managepriv.zh-cn.css @@ -0,0 +1 @@ +.thWidth{width:150px !important;} diff --git a/module/group/css/managepriv.zh-tw.css b/module/group/css/managepriv.zh-tw.css new file mode 100644 index 0000000000..6ea5450c92 --- /dev/null +++ b/module/group/css/managepriv.zh-tw.css @@ -0,0 +1 @@ +.thWidth{width:150px !important;} diff --git a/module/group/css/manageview.css b/module/group/css/manageview.css index 6f91b77ee0..acb6d7c648 100644 --- a/module/group/css/manageview.css +++ b/module/group/css/manageview.css @@ -4,6 +4,3 @@ .checkbox-primary>label{padding-left:20px;} .pl-0px {padding-left:0px !important;} .pt-0px {padding-top:0px !important;} - -.thWidth{width:130px !important;} -html[lang^='zh-'] .thWidth{width:100px !important;} diff --git a/module/group/css/manageview.en.css b/module/group/css/manageview.en.css new file mode 100644 index 0000000000..82442a3745 --- /dev/null +++ b/module/group/css/manageview.en.css @@ -0,0 +1 @@ +.thWidth{width:130px !important;} diff --git a/module/group/css/manageview.zh-cn.css b/module/group/css/manageview.zh-cn.css new file mode 100644 index 0000000000..b0e274a3db --- /dev/null +++ b/module/group/css/manageview.zh-cn.css @@ -0,0 +1 @@ +.thWidth{width:100px !important;} diff --git a/module/group/css/manageview.zh-tw.css b/module/group/css/manageview.zh-tw.css new file mode 100644 index 0000000000..b0e274a3db --- /dev/null +++ b/module/group/css/manageview.zh-tw.css @@ -0,0 +1 @@ +.thWidth{width:100px !important;} diff --git a/module/install/css/index.css b/module/install/css/index.css index e6ebccd685..2a8bd39a7b 100644 --- a/module/install/css/index.css +++ b/module/install/css/index.css @@ -53,7 +53,6 @@ li{line-height: 2em} .card>.card-reveal>.card-heading{padding:20px 10px} .card:hover>.card-reveal{top:0} -.card.ad{margin-bottom:0px;} .card.ad > .img-wrapper { background-position: center; background-repeat: no-repeat; diff --git a/module/install/lang/en.php b/module/install/lang/en.php index c3c665ec05..d90fe141be 100644 --- a/module/install/lang/en.php +++ b/module/install/lang/en.php @@ -25,15 +25,17 @@ $lang->install->seeLatestRelease = 'View latest version'; $lang->install->welcome = 'Thanks for choosing ZenTao!'; $lang->install->license = 'ZenTao is under Z PUBLIC LICENSE(ZPL) 1.2'; $lang->install->desc = <<Z Public License. It integrates with Product Management, Project Management, QA Management, Document Management, Todos Management, Company Management etc. ZenTao is the best choice for software project management. +ZenTao ALM is an open source software released under Z Public License. It integrates with Product Management, Project Management, QA Management, Document Management, Todo Management, Company Management etc. ZenTao is a perfect choice for software development projects. -ZenTao ALM is built on PHP + MySQL and based on ZenTaoPHP framework, an independent framework developed by our team. Third-party developers/organizations can develop extensions or customize for their requirements. +ZenTao ALM is built on PHP + MySQL and zentaoPHP, an independent framework developed by Nature Easy Soft. Third-party developers/organizations can develop extensions or customize accordingly. EOT; $lang->install->links = <<Nature Easy Soft Co., LTD. -Official Website : https://www.zentao.pm -Technical Support : https://www.zentao.pm/forum/ -WhatsApp Group : https://chat.whatsapp.com/B6pi6b3gv0S7x7jqMxwhbF +Official Website: https://www.zentao.pm +Technical Support: https://www.zentao.pm/forum/ +WhatsApp Group: https://chat.whatsapp.com/B6pi6b3gv0S7x7jqMxwhbF +LinkedIn Group: ZenTao Project Management Software +Facebook: Nature Easy Soft Twitter: cneasysoft You are installing ZenTao %s. @@ -132,15 +134,15 @@ $lang->install->errorEmptyPassword = 'Password should not be blank.'; $lang->install->groupList['ADMIN']['name'] = 'Admin'; $lang->install->groupList['ADMIN']['desc'] = 'System Admin'; -$lang->install->groupList['DEV']['name'] = 'Dev.'; +$lang->install->groupList['DEV']['name'] = 'Dev'; $lang->install->groupList['DEV']['desc'] = 'Developer'; $lang->install->groupList['QA']['name'] = 'QA'; -$lang->install->groupList['QA']['desc'] = 'tester'; +$lang->install->groupList['QA']['desc'] = 'Tester'; $lang->install->groupList['PM']['name'] = 'PM'; $lang->install->groupList['PM']['desc'] = 'Project Manager'; $lang->install->groupList['PO']['name'] = 'PO'; $lang->install->groupList['PO']['desc'] = 'Product Owner'; -$lang->install->groupList['TD']['name'] = 'Dev. Manager'; +$lang->install->groupList['TD']['name'] = 'Dev Manager'; $lang->install->groupList['TD']['desc'] = 'Development Manager'; $lang->install->groupList['PD']['name'] = 'PD'; $lang->install->groupList['PD']['desc'] = 'Product Director'; @@ -169,34 +171,64 @@ $lang->install->login = 'Login ZenTao'; $lang->install->register = 'Register in ZenTao Community'; $lang->install->joinZentao = <<You have installed ZenTao %s. Please delete install.php asap.

Note: In order to get the latest news of ZenTao, please register in ZenTao(www.zentao.pm).

+

You have installed ZenTao %s. Please delete install.php asap.

Note: In order to get the latest news of ZenTao, please register on ZenTao(www.zentao.pm).

EOT; -$lang->install->product = array('chanzhi', 'ranzhi'); +$lang->install->product = array('chanzhi', 'ranzhi', 'ydisk', 'meshiot'); -$lang->install->promotion = "Products also from Nature Easy Soft team:"; -$lang->install->chanzhi = new stdclass(); -$lang->install->chanzhi->name = 'ZSITE Content Management System'; -$lang->install->chanzhi->logo = 'images/main/chanzhi_en.png'; -$lang->install->chanzhi->url = 'http://www.zsite.net'; -$lang->install->chanzhi->desc = <<install->promotion = "Products also from Nature Easy Soft:"; +$lang->install->chanzhi = new stdclass(); +$lang->install->chanzhi->name = 'ZSITE Content Management System'; +$lang->install->chanzhi->width = 'col-md-6'; +$lang->install->chanzhi->logo = 'images/main/chanzhi_en.png'; +$lang->install->chanzhi->url = 'http://www.zsite.net'; +$lang->install->chanzhi->desc = <<
  • Article, Blog, Manual, Member, Shop, Forum, Feedback……
  • -
  • Customize page freely by theme, effect, widget, css, js and layout
  • -
  • Support desktop and mobile in one system
  • -
  • Deeply optimized for search engine
  • +
  • Customize page at will by Theme, Effect, Widget, CSS, JS and layout
  • +
  • Support both desktop and mobile in one system
  • +
  • Highly optimized for search engines
  • EOD; $lang->install->ranzhi = new stdclass(); -$lang->install->ranzhi->name = 'ZDOO Collaborative System'; -$lang->install->ranzhi->logo = 'images/main/zdoo_org.png'; -$lang->install->ranzhi->url = 'http://www.zdoo.org'; -$lang->install->ranzhi->desc = <<install->ranzhi->name = 'ZDOO Collaborative System'; +$lang->install->ranzhi->width = 'col-md-6'; +$lang->install->ranzhi->logo = 'images/main/zdoo_org.png'; +$lang->install->ranzhi->url = 'http://www.zdoo.org'; +$lang->install->ranzhi->desc = <<
  • CRM: Customer Management and Order Tracking
  • OA: Approve, Announce, Trip, Leave and so on.
  • -
  • Project,Task and Document management
  • +
  • Projec t,Task and Document management
  • Money: Income, Expense, Transfer, Invest and Debt
  • EOD; + +$lang->install->ydisk = new stdclass(); +$lang->install->ydisk->name = 'Y Disk-Free NetDisk for Enterprises'; +$lang->install->ydisk->width = 'col-md-6'; +$lang->install->ydisk->logo = 'images/main/ydisk.png'; +$lang->install->ydisk->url = 'http://www.ydisk.cn'; +$lang->install->ydisk->desc = << +
  • Self-Hosted: deploy on your own machine
  • +
  • Storage: depend on your hard drive size
  • +
  • Transmission: as fast as your bandwidth allows
  • +
  • Secure: 12 permissions for any strict settings
  • + +EOD; + +$lang->install->meshiot = new stdclass(); +$lang->install->meshiot->name = 'MeshIoT'; +$lang->install->meshiot->width = 'col-md-6'; +$lang->install->meshiot->logo = 'images/main/meshiot.png'; +$lang->install->meshiot->url = 'https://www.meshiot.com'; +$lang->install->meshiot->desc = << +
  • Performance: one gateway can monitor 65,536 equipments
  • +
  • Accessibility: unique radio communication protocol covers 2,500m radius
  • +
  • Dimming System: 200+ sensors and monitors
  • +
  • Battery Available: no requirements to any equipment on your site
  • + +EOD; diff --git a/module/install/lang/zh-cn.php b/module/install/lang/zh-cn.php index 893a92576c..6dd25da825 100644 --- a/module/install/lang/zh-cn.php +++ b/module/install/lang/zh-cn.php @@ -82,7 +82,7 @@ $lang->install->iconvFail = '修改PHP配置文件,加载ICONV扩展。'; $lang->install->tmpRoot = '临时文件目录'; $lang->install->dataRoot = '上传文件目录'; $lang->install->session = 'Session存储目录'; -$lang->install->sessionFail = '修改PHP配置文件,设置session.save_path'; +$lang->install->sessionFail = '修改PHP配置文件,设置session.save_path。
    如果使用宝塔面板,可以到宝塔Web面板中“软件商店”,打开PHP设置,到“Session配置”项,选择files,点击保存。老版本需要修改php配置文件。'; $lang->install->mkdirWin = '

    需要创建目录%s。命令为:
    mkdir %s

    '; $lang->install->chmodWin = '需要修改目录 "%s" 的权限。'; $lang->install->mkdirLinux = '

    需要创建目录%s。
    命令为:
    mkdir -p %s

    '; @@ -172,14 +172,15 @@ $lang->install->joinZentao = <<您已经成功安装禅道管理系统%s,请及时删除install.php。

    友情提示:为了您及时获得禅道的最新动态,请在禅道社区(www.zentao.net)进行登记。

    EOT; -$lang->install->product = array('chanzhi', 'ranzhi', 'xuanxuan'); +$lang->install->product = array('chanzhi', 'ranzhi', 'xuanxuan', 'ydisk', 'meshiot'); -$lang->install->promotion = "为您推荐易软天创旗下其他产品:"; -$lang->install->chanzhi = new stdclass(); -$lang->install->chanzhi->name = '蝉知企业门户系统'; -$lang->install->chanzhi->logo = 'images/main/chanzhi.png'; -$lang->install->chanzhi->url = 'http://www.chanzhi.org'; -$lang->install->chanzhi->desc = <<install->promotion = "为您推荐易软天创旗下其他产品:"; +$lang->install->chanzhi = new stdclass(); +$lang->install->chanzhi->name = '蝉知企业门户系统'; +$lang->install->chanzhi->width = 'col-md-4'; +$lang->install->chanzhi->logo = 'images/main/chanzhi.png'; +$lang->install->chanzhi->url = 'http://www.chanzhi.org'; +$lang->install->chanzhi->desc = <<
  • 专业的企业营销门户系统
  • 功能丰富,操作简洁方便
  • @@ -189,10 +190,11 @@ $lang->install->chanzhi->desc = <<install->ranzhi = new stdclass(); -$lang->install->ranzhi->name = '然之协同管理系统'; -$lang->install->ranzhi->logo = 'images/main/ranzhi.png'; -$lang->install->ranzhi->url = 'http://www.ranzhi.org'; -$lang->install->ranzhi->desc = <<install->ranzhi->name = '然之协同管理系统'; +$lang->install->ranzhi->width = 'col-md-4'; +$lang->install->ranzhi->logo = 'images/main/ranzhi.png'; +$lang->install->ranzhi->url = 'http://www.ranzhi.org'; +$lang->install->ranzhi->desc = <<
  • 客户管理,订单跟踪
  • 项目任务,公告文档
  • @@ -202,8 +204,10 @@ $lang->install->ranzhi->desc = <<install->zdoo = new stdclass(); -$lang->install->zdoo->name = '可深度定制的云端一体化协作平台'; -$lang->install->zdoo->desc = <<install->zdoo->name = '可深度定制的云端一体化协作平台'; +$lang->install->zdoo->width = 'col-md-4'; +$lang->install->zdoo->url = 'http://www.zdoo.com'; +$lang->install->zdoo->desc = <<
  • 安全、稳定、高效
  • 以容器为交付单位
  • @@ -213,10 +217,11 @@ $lang->install->zdoo->desc = <<install->xuanxuan = new stdclass(); -$lang->install->xuanxuan->name = '喧喧即时聊天软件'; -$lang->install->xuanxuan->logo = 'images/main/xuanxuan.png'; -$lang->install->xuanxuan->url = 'http://www.xuan.im'; -$lang->install->xuanxuan->desc = <<install->xuanxuan->name = '喧喧即时聊天软件'; +$lang->install->xuanxuan->width = 'col-md-4'; +$lang->install->xuanxuan->logo = 'images/main/xuanxuan.png'; +$lang->install->xuanxuan->url = 'http://www.xuan.im'; +$lang->install->xuanxuan->desc = <<
  • 轻:轻量级架构,容易部署
  • 跨:真正完整跨平台解决方案
  • @@ -224,3 +229,31 @@ $lang->install->xuanxuan->desc = <<开:开放架构,方便二开集成 EOD; + +$lang->install->ydisk = new stdclass(); +$lang->install->ydisk->name = '悦库免费企业网盘'; +$lang->install->ydisk->width = 'col-md-6'; +$lang->install->ydisk->logo = 'images/main/ydisk.png'; +$lang->install->ydisk->url = 'http://www.ydisk.cn'; +$lang->install->ydisk->desc = << +
  • 绝对私有,只部署在自己的机器上。
  • +
  • 海量存储,只取决于您的硬盘大小。
  • +
  • 极限传输,只取决于您的网络带宽。
  • +
  • 极度安全,十二种权限组合。
  • + +EOD; + +$lang->install->meshiot = new stdclass(); +$lang->install->meshiot->name = '易天物联'; +$lang->install->meshiot->width = 'col-md-6'; +$lang->install->meshiot->logo = 'images/main/meshiot.png'; +$lang->install->meshiot->url = 'https://www.meshiot.com'; +$lang->install->meshiot->desc = << +
  • 超性能网关,一个就可管65536个设备。
  • +
  • 独创无线电通讯协议,2500米穿墙无障碍。
  • +
  • 200余款传感器控制器,独创调光系统。
  • +
  • 可配电池,对既有场地设备无任何要求。
  • + +EOD; diff --git a/module/install/view/index.html.php b/module/install/view/index.html.php index ce3a8d3c3a..c751b11f68 100644 --- a/module/install/view/index.html.php +++ b/module/install/view/index.html.php @@ -42,8 +42,9 @@
    install->promotion?>
    + install->product);?> install->product as $product):?> -
    +
    diff --git a/module/my/css/changepassword.css b/module/my/css/changepassword.css deleted file mode 100644 index 142e74674d..0000000000 --- a/module/my/css/changepassword.css +++ /dev/null @@ -1,2 +0,0 @@ -.thWidth{width:130px !important;} -html[lang^='zh-'] .thWidth{width:100px !important;} diff --git a/module/my/css/changepassword.en.css b/module/my/css/changepassword.en.css new file mode 100644 index 0000000000..82442a3745 --- /dev/null +++ b/module/my/css/changepassword.en.css @@ -0,0 +1 @@ +.thWidth{width:130px !important;} diff --git a/module/my/css/changepassword.zh-cn.css b/module/my/css/changepassword.zh-cn.css new file mode 100644 index 0000000000..b0e274a3db --- /dev/null +++ b/module/my/css/changepassword.zh-cn.css @@ -0,0 +1 @@ +.thWidth{width:100px !important;} diff --git a/module/my/css/changepassword.zh-tw.css b/module/my/css/changepassword.zh-tw.css new file mode 100644 index 0000000000..b0e274a3db --- /dev/null +++ b/module/my/css/changepassword.zh-tw.css @@ -0,0 +1 @@ +.thWidth{width:100px !important;} diff --git a/module/product/model.php b/module/product/model.php index e514e67dfc..2206bcbb79 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -636,7 +636,7 @@ class productModel extends model { if(($plan->end != '0000-00-00' and strtotime($plan->end) - time() <= 0) or $plan->end == '2030-01-01') continue; $year = substr($plan->end, 0, 4); - $roadmap[$year][$plan->branch][] = $plan; + $roadmap[$year][$plan->branch][$plan->end] = $plan; $total++; } @@ -650,7 +650,7 @@ class productModel extends model foreach($releases as $release) { $year = substr($release->date, 0, 4); - $roadmap[$year][$release->branch][] = $release; + $roadmap[$year][$release->branch][$release->date] = $release; $total++; if($count > 0 and $total >= $count) break; @@ -664,6 +664,7 @@ class productModel extends model { foreach($branchRoadmaps as $branch => $roadmaps) { + krsort($roadmaps); $totalData = count($roadmaps); $rows = ceil($totalData / 8); $maxPerRow = ceil($totalData / $rows); diff --git a/module/product/view/edit.html.php b/module/product/view/edit.html.php index b8a6b4d35c..572d8b9935 100644 --- a/module/product/view/edit.html.php +++ b/module/product/view/edit.html.php @@ -58,11 +58,11 @@ product->status;?> product->statusList, $product->status, "class='form-control'");?> + printExtendFields($product, 'table', 'columns=1');?> product->desc;?> desc), "rows='8' class='form-control'");?> - printExtendFields($product, 'table', 'columns=1');?> product->acl;?> product->aclList, $product->acl, "onclick='setWhite(this.value);'", 'block'));?> diff --git a/module/productplan/view/edit.html.php b/module/productplan/view/edit.html.php index a8708a0391..3a22833ff6 100644 --- a/module/productplan/view/edit.html.php +++ b/module/productplan/view/edit.html.php @@ -52,11 +52,11 @@ end != '2030-01-01' ? formatTime($plan->end) : '', 'class="form-control form-date"');?> productplan->endList , '', "onclick='computeEndDate(this.value)'");?> + printExtendFields($plan, 'table', 'columns=1');?> productplan->desc;?> desc), "rows='10' class='form-control kindeditor' hidefocus='true'");?> - printExtendFields($plan, 'table', 'columns=3');?> diff --git a/module/project/control.php b/module/project/control.php index ec748ad826..bf88055040 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1490,22 +1490,24 @@ class project extends control $stories = $this->loadModel('story')->getProjectStories($projectID, $orderBy); $kanbanGroup = $this->project->getKanbanGroupData($stories, $tasks, $bugs, $type); - $kanbanSetting = $this->project->getKanbanSetting($projectID); + $kanbanSetting = $this->project->getKanbanSetting(); - $this->view->title = $this->lang->project->kanban; - $this->view->position[] = html::a($this->createLink('project', 'browse', "projectID=$projectID"), $project->name); - $this->view->position[] = $this->lang->project->kanban; - $this->view->stories = $stories; - $this->view->realnames = $this->loadModel('user')->getPairs('noletter'); - $this->view->storyOrder = $orderBy; - $this->view->orderBy = 'id_asc'; - $this->view->projectID = $projectID; - $this->view->browseType = ''; - $this->view->project = $project; - $this->view->type = $type; - $this->view->kanbanGroup = $kanbanGroup; - $this->view->allCols = $kanbanSetting->allCols; - $this->view->colorList = $kanbanSetting->colorList; + $this->view->title = $this->lang->project->kanban; + $this->view->position[] = html::a($this->createLink('project', 'browse', "projectID=$projectID"), $project->name); + $this->view->position[] = $this->lang->project->kanban; + $this->view->stories = $stories; + $this->view->realnames = $this->loadModel('user')->getPairs('noletter'); + $this->view->storyOrder = $orderBy; + $this->view->orderBy = 'id_asc'; + $this->view->projectID = $projectID; + $this->view->browseType = ''; + $this->view->project = $project; + $this->view->type = $type; + $this->view->kanbanGroup = $kanbanGroup; + $this->view->kanbanColumns = $this->project->getKanbanColumns($kanbanSetting); + $this->view->statusMap = $this->project->getKanbanStatusMap($kanbanSetting); + $this->view->statusList = $this->project->getKanbanStatusList($kanbanSetting); + $this->view->colorList = $this->project->getKanbanColorList($kanbanSetting); $this->display(); } @@ -2339,11 +2341,9 @@ class project extends control } $this->app->loadLang('task'); - $kanbanSetting = $this->project->getKanbanSetting($projectID); - $this->view->allCols = $kanbanSetting->allCols; - $this->view->colorList = $kanbanSetting->colorList; - $this->view->projectID = $projectID; + $this->view->setting = $this->project->getKanbanSetting(); + $this->view->projectID = $projectID; $this->display(); } @@ -2357,7 +2357,7 @@ class project extends control */ public function ajaxResetKanban($projectID, $confirm = 'no') { - if($confirm != 'yes')die(js::confirm($this->lang->kanbanSetting->noticeReset, inlink('ajaxResetKanban', "projectID=$projectID&confirm=yes"))); + if($confirm != 'yes') die(js::confirm($this->lang->kanbanSetting->noticeReset, inlink('ajaxResetKanban', "projectID=$projectID&confirm=yes"))); $this->loadModel('setting'); @@ -2387,8 +2387,8 @@ class project extends control */ public function importPlanStories($projectID, $planID) { - $planStories = $planProducts = array(); - $planStory = $this->loadModel('story')->getPlanStories($planID); + $planStories = $planProducts = array(); + $planStory = $this->loadModel('story')->getPlanStories($planID); $count = 0; if(!empty($planStory)) { diff --git a/module/project/css/all.css b/module/project/css/all.css index 827c53d254..f0b971a934 100644 --- a/module/project/css/all.css +++ b/module/project/css/all.css @@ -1,4 +1 @@ #product_chosen .chosen-single{width:180px;} - -.thWidth{width:130px !important;} -html[lang^='zh-'] .thWidth{width:100px !important;} diff --git a/module/project/css/all.en.css b/module/project/css/all.en.css new file mode 100644 index 0000000000..82442a3745 --- /dev/null +++ b/module/project/css/all.en.css @@ -0,0 +1 @@ +.thWidth{width:130px !important;} diff --git a/module/project/css/all.zh-cn.css b/module/project/css/all.zh-cn.css new file mode 100644 index 0000000000..b0e274a3db --- /dev/null +++ b/module/project/css/all.zh-cn.css @@ -0,0 +1 @@ +.thWidth{width:100px !important;} diff --git a/module/project/css/all.zh-tw.css b/module/project/css/all.zh-tw.css new file mode 100644 index 0000000000..b0e274a3db --- /dev/null +++ b/module/project/css/all.zh-tw.css @@ -0,0 +1 @@ +.thWidth{width:100px !important;} diff --git a/module/project/css/burn.css b/module/project/css/burn.css index b3f814d982..5154777aa2 100644 --- a/module/project/css/burn.css +++ b/module/project/css/burn.css @@ -5,6 +5,3 @@ #burnLegend > div {position: relative; padding-left: 30px;} #burnLegend > div > .barline {position: absolute; width: 20px; left: 0; top: 13px; height: 3px; background: #EEEEEE;} #burnLegend .line-real .bg-primary{background: #1183fb} - -.thWidth{width:150px !important;} -html[lang^='zh-'] .thWidth{width:120px !important;} diff --git a/module/project/css/burn.en.css b/module/project/css/burn.en.css new file mode 100644 index 0000000000..6ea5450c92 --- /dev/null +++ b/module/project/css/burn.en.css @@ -0,0 +1 @@ +.thWidth{width:150px !important;} diff --git a/module/project/css/burn.zh-cn.css b/module/project/css/burn.zh-cn.css new file mode 100644 index 0000000000..62f3e6f10c --- /dev/null +++ b/module/project/css/burn.zh-cn.css @@ -0,0 +1 @@ +.thWidth{width:120px !important;} diff --git a/module/project/css/burn.zh-tw.css b/module/project/css/burn.zh-tw.css new file mode 100644 index 0000000000..62f3e6f10c --- /dev/null +++ b/module/project/css/burn.zh-tw.css @@ -0,0 +1 @@ +.thWidth{width:120px !important;} diff --git a/module/project/css/treestory.css b/module/project/css/treestory.css deleted file mode 100644 index 168c123dd1..0000000000 --- a/module/project/css/treestory.css +++ /dev/null @@ -1,2 +0,0 @@ -.thWidth{width:120px !important;} -html[lang^='zh-'] .thWidth{width:100px !important;} diff --git a/module/project/css/treestory.en.css b/module/project/css/treestory.en.css new file mode 100644 index 0000000000..62f3e6f10c --- /dev/null +++ b/module/project/css/treestory.en.css @@ -0,0 +1 @@ +.thWidth{width:120px !important;} diff --git a/module/project/css/treestory.zh-cn.css b/module/project/css/treestory.zh-cn.css new file mode 100644 index 0000000000..b0e274a3db --- /dev/null +++ b/module/project/css/treestory.zh-cn.css @@ -0,0 +1 @@ +.thWidth{width:100px !important;} diff --git a/module/project/css/treestory.zh-tw.css b/module/project/css/treestory.zh-tw.css new file mode 100644 index 0000000000..b0e274a3db --- /dev/null +++ b/module/project/css/treestory.zh-tw.css @@ -0,0 +1 @@ +.thWidth{width:100px !important;} diff --git a/module/project/js/kanban.js b/module/project/js/kanban.js index c0a58ea515..5fbdd3bed1 100644 --- a/module/project/js/kanban.js +++ b/module/project/js/kanban.js @@ -38,26 +38,7 @@ $(function() $.cookie('selfClose', 0, {expires:config.cookieLife, path:config.webRoot}); var $kanban = $('#kanban'); - var statusMap = - { - task: - { - wait : {doing: 'start', done: 'finish', cancel: 'cancel'}, - doing : {done: 'finish', pause: 'pause'}, - pause : {doing: 'activate', done: 'finish', cancel: 'cancel'}, - done : {doing: 'activate', closed: 'close'}, - cancel : {doing: 'activate', closed: 'close'}, - closed : {doing: 'activate'} - }, - bug: - { - wait : {done: 'resolve', cancel: 'resolve'}, - doing : {}, - done : {wait: 'activate', closed: 'close'}, - cancel : {wait: 'activate', closed: 'close'}, - closed : {wait: 'activate'} - } - }; + console.log(statusMap); // Get scrollbar width var getScrollbarWidth = function () diff --git a/module/project/lang/en.php b/module/project/lang/en.php index cd77bb4913..7ded04f922 100644 --- a/module/project/lang/en.php +++ b/module/project/lang/en.php @@ -115,7 +115,7 @@ $lang->project->statusList['closed'] = 'Closed'; $lang->project->aclList['open'] = "Default (Users who can visit {$lang->projectCommon} can access it.)"; $lang->project->aclList['private'] = 'Private (For team members only.)'; -$lang->project->aclList['custom'] = 'Whitelist (Team members and the whitelist users can access it.)'; +$lang->project->aclList['custom'] = 'Custom (Team members and the whitelist users can access it.)'; /* Method list. */ $lang->project->index = "{$lang->projectCommon} Home"; diff --git a/module/project/model.php b/module/project/model.php index afc9f6bd45..535e4879d3 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -2002,6 +2002,13 @@ class projectModel extends model { foreach($taskTeam as $taskID => $team) $tasks[$taskID]->team = $team; } + + $parents = array(); + foreach($tasks as $task) + { + if($task->parent > 0) $parents[$task->parent] = $task->parent; + } + $parents = $this->dao->select('*')->from(TABLE_TASK)->where('id')->in($parents)->fetchAll('id'); foreach($tasks as $task) { @@ -2012,6 +2019,11 @@ class projectModel extends model $tasks[$task->parent]->children[$task->id] = $task; unset($tasks[$task->id]); } + else + { + $parent = $parents[$task->parent]; + $task->parentName = $parent->name; + } } } return $this->loadModel('task')->processTasks($tasks); @@ -2477,11 +2489,10 @@ class projectModel extends model /** * Get kanban setting. * - * @param int $projectID * @access public * @return object */ - public function getKanbanSetting($projectID) + public function getKanbanSetting() { $allCols = '1'; $showOption = '0'; @@ -2498,6 +2509,100 @@ class projectModel extends model return $kanbanSetting; } + /** + * Get kanban columns. + * + * @param object $kanbanSetting + * @access public + * @return array + */ + public function getKanbanColumns($kanbanSetting) + { + if($kanbanSetting->allCols) return array('wait', 'doing', 'pause', 'done', 'cancel', 'closed'); + return array('wait', 'doing', 'pause', 'done'); + } + + /** + * 获取状态和方法的映射关系,此关系决定了看板内容能否从一个泳道拖动到另一个泳道,以及拖动后执行什么方法。 + * Get the mapping between state and method. This relationship determines whether kanban content can be dragged from one lane + * to another, and what method is executed after dragging. + * + * 映射关系的基本格式为 map[$mode][$fromStatus][$toStatus] = $methodName。 + * The basic format of the mapping relationship is map[$mode][$fromStatus][$toStatus] = $methodName. + * + * @param string $mode 看板内容类型,可选值 task|bug The content mode of kanban, should be task or bug. + * @param string $fromStatus 拖动内容的来源泳道 The origin lane the content draged from. + * @param string $toStatus 拖动内容的目标泳道 The destination lane the content draged to. + * @param string $methodName 拖动到目标泳道后执行的方法名 The method to execute after draged the content. + * + * 例如 map['task']['doing']['done'] = 'close' 表示:任务(task)看板从进行中(doing)泳道拖动到已完成(done)泳道时,执行关闭(close)方法。 + * For example, map['task']['doing']['done'] = 'close' means: when the task kanban is dragged from the doing lane to the done lane, + * execute the close method. + * + * @param object $kanbanSetting This param is used in the biz version, don't remove it. + * @access public + * @return string + */ + public function getKanbanStatusMap($kanbanSetting) + { + $statusMap = array(); + $statusMap['task']['wait']['doing'] = 'start'; + $statusMap['task']['wait']['done'] = 'finish'; + $statusMap['task']['wait']['cancel'] = 'cancel'; + + $statusMap['task']['doing']['done'] = 'finish'; + $statusMap['task']['doing']['pause'] = 'pause'; + + $statusMap['task']['pause']['doing'] = 'activate'; + $statusMap['task']['pause']['done'] = 'finish'; + $statusMap['task']['pause']['cancel'] = 'cancel'; + + $statusMap['task']['done']['doing'] = 'activate'; + $statusMap['task']['done']['closed'] = 'close'; + + $statusMap['task']['cancel']['doing'] = 'activate'; + $statusMap['task']['cancel']['closed'] = 'close'; + + $statusMap['task']['closed']['doing'] = 'activate'; + + $statusMap['bug']['wait']['done'] = 'resolve'; + $statusMap['bug']['wait']['cancel'] = 'resolve'; + + $statusMap['bug']['done']['wait'] = 'activate'; + $statusMap['bug']['done']['closed'] = 'close'; + + $statusMap['bug']['cancel']['wait'] = 'activate'; + $statusMap['bug']['cancel']['closed'] = 'close'; + + $statusMap['bug']['closed']['wait'] = 'activate'; + + return $statusMap; + } + + /** + * Get status list of kanban. + * + * @param object $kanbanSetting This param is used in the biz version, don't remove it. + * @access public + * @return string + */ + public function getKanbanStatusList($kanbanSetting) + { + return $this->lang->task->statusList; + } + + /** + * Get color list of kanban. + * + * @param object $kanbanSetting + * @access public + * @return array + */ + public function getKanbanColorList($kanbanSetting) + { + return $kanbanSetting->colorList; + } + /** * Build burn data. * diff --git a/module/project/view/ajaxkanbansetting.html.php b/module/project/view/ajaxkanbansetting.html.php index e129cedb95..409ebc7d2d 100644 --- a/module/project/view/ajaxkanbansetting.html.php +++ b/module/project/view/ajaxkanbansetting.html.php @@ -26,17 +26,17 @@ form {padding: 30px 0 40px;}
    - + - + - + + + @@ -143,10 +139,10 @@ $account = $this->app->user->account; - + printExtendFields($release, 'table', 'columns=1');?> - printExtendFields($release, 'table', 'columns=2');?> diff --git a/module/sso/model.php b/module/sso/model.php index fd53fd52da..8d902b3107 100644 --- a/module/sso/model.php +++ b/module/sso/model.php @@ -61,12 +61,6 @@ class ssoModel extends model $user = $this->dao->select('*')->from(TABLE_USER)->where('account')->eq($data->account)->fetch(); if($user) die(js::alert($this->lang->sso->bindHasAccount)); - if(isset($this->config->safe->mode) and $this->user->computePasswordStrength($data->password1) < $this->config->safe->mode) - { - dao::$errors['password1'][] = $this->lang->user->weakPassword; - return false; - } - $user = new stdclass(); $user->account = $data->account; $user->password = md5($data->password1); diff --git a/module/story/css/close.css b/module/story/css/close.css deleted file mode 100644 index feca0918c6..0000000000 --- a/module/story/css/close.css +++ /dev/null @@ -1,2 +0,0 @@ -.thWidth{width:150px !important;} -html[lang^='zh-'] .thWidth{width:80px !important;} diff --git a/module/story/css/close.en.css b/module/story/css/close.en.css new file mode 100644 index 0000000000..6ea5450c92 --- /dev/null +++ b/module/story/css/close.en.css @@ -0,0 +1 @@ +.thWidth{width:150px !important;} diff --git a/module/story/css/close.zh-cn.css b/module/story/css/close.zh-cn.css new file mode 100644 index 0000000000..585844a6f4 --- /dev/null +++ b/module/story/css/close.zh-cn.css @@ -0,0 +1 @@ +.thWidth{width:80px !important;} diff --git a/module/story/css/close.zh-tw.css b/module/story/css/close.zh-tw.css new file mode 100644 index 0000000000..585844a6f4 --- /dev/null +++ b/module/story/css/close.zh-tw.css @@ -0,0 +1 @@ +.thWidth{width:80px !important;} diff --git a/module/story/css/creat.en.css b/module/story/css/creat.en.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/module/story/css/create.zh-cn.css b/module/story/css/create.zh-cn.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/module/story/css/edit.css b/module/story/css/edit.css index 448a1e0e70..325971cb2f 100644 --- a/module/story/css/edit.css +++ b/module/story/css/edit.css @@ -1,6 +1 @@ #product_chosen .chosen-single{border-right-width:1px} - -.thWidth{width:100px !important;} -.linkThWidth{width:110px !important;} -html[lang^='zh-'] .thWidth{width:80px !important;} -html[lang^='zh-'] .linkThWidth{width:70px !important;} diff --git a/module/story/css/edit.en.css b/module/story/css/edit.en.css new file mode 100644 index 0000000000..571d243dd6 --- /dev/null +++ b/module/story/css/edit.en.css @@ -0,0 +1,2 @@ +.thWidth{width:100px !important;} +.linkThWidth{width:110px !important;} diff --git a/module/story/css/edit.zh-cn.css b/module/story/css/edit.zh-cn.css new file mode 100644 index 0000000000..433f2d837b --- /dev/null +++ b/module/story/css/edit.zh-cn.css @@ -0,0 +1,2 @@ +.thWidth{width:80px !important;} +.linkThWidth{width:70px !important;} diff --git a/module/story/css/edit.zh-tw.css b/module/story/css/edit.zh-tw.css new file mode 100644 index 0000000000..433f2d837b --- /dev/null +++ b/module/story/css/edit.zh-tw.css @@ -0,0 +1,2 @@ +.thWidth{width:80px !important;} +.linkThWidth{width:70px !important;} diff --git a/module/story/css/review.css b/module/story/css/review.css deleted file mode 100644 index ccda3106fd..0000000000 --- a/module/story/css/review.css +++ /dev/null @@ -1,2 +0,0 @@ -.thWidth{width:110px !important;} -html[lang^='zh-'] .thWidth{width:80px !important;} diff --git a/module/story/css/review.en.css b/module/story/css/review.en.css new file mode 100644 index 0000000000..b3e7551ab2 --- /dev/null +++ b/module/story/css/review.en.css @@ -0,0 +1 @@ +.thWidth{width:110px !important;} diff --git a/module/story/css/review.zh-cn.css b/module/story/css/review.zh-cn.css new file mode 100644 index 0000000000..585844a6f4 --- /dev/null +++ b/module/story/css/review.zh-cn.css @@ -0,0 +1 @@ +.thWidth{width:80px !important;} diff --git a/module/story/css/review.zh-tw.css b/module/story/css/review.zh-tw.css new file mode 100644 index 0000000000..585844a6f4 --- /dev/null +++ b/module/story/css/review.zh-tw.css @@ -0,0 +1 @@ +.thWidth{width:80px !important;} diff --git a/module/story/css/view.css b/module/story/css/view.css index 4ec3f19163..09f389c1f7 100644 --- a/module/story/css/view.css +++ b/module/story/css/view.css @@ -1,8 +1,3 @@ .side-col .cell{padding:0px;} .side-col #legendProjectAndTask .list-unstyled{padding:10px; border-top:0px; margin:0px;} .col-4 .cell .tab-content .text-top{padding-top: 1px} - -#legendLifeTime .thWidth{width:100px !important;} -#legendRelated .thWidth{width:110px !important;} -html[lang^='zh-'] #legendLifeTime .thWidth{width:70px !important;} -html[lang^='zh-'] #legendRelated .thWidth{width:70px !important;} diff --git a/module/story/css/view.en.css b/module/story/css/view.en.css new file mode 100644 index 0000000000..3daeffdbef --- /dev/null +++ b/module/story/css/view.en.css @@ -0,0 +1,2 @@ +#legendLifeTime .thWidth{width:100px !important;} +#legendRelated .thWidth{width:110px !important;} diff --git a/module/story/css/view.zh-cn.css b/module/story/css/view.zh-cn.css new file mode 100644 index 0000000000..84342de772 --- /dev/null +++ b/module/story/css/view.zh-cn.css @@ -0,0 +1,2 @@ +#legendLifeTime .thWidth{width:70px !important;} +#legendRelated .thWidth{width:70px !important;} diff --git a/module/story/css/view.zh-tw.css b/module/story/css/view.zh-tw.css new file mode 100644 index 0000000000..84342de772 --- /dev/null +++ b/module/story/css/view.zh-tw.css @@ -0,0 +1,2 @@ +#legendLifeTime .thWidth{width:70px !important;} +#legendRelated .thWidth{width:70px !important;} diff --git a/module/story/css/zerocase.css b/module/story/css/zerocase.css deleted file mode 100644 index 75f34ad64a..0000000000 --- a/module/story/css/zerocase.css +++ /dev/null @@ -1,2 +0,0 @@ -.thWidth{width:120px !important;} -html[lang^='zh-'] .thWidth{width:90px !important;} diff --git a/module/story/css/zerocase.en.css b/module/story/css/zerocase.en.css new file mode 100644 index 0000000000..62f3e6f10c --- /dev/null +++ b/module/story/css/zerocase.en.css @@ -0,0 +1 @@ +.thWidth{width:120px !important;} diff --git a/module/story/css/zerocase.zh-cn.css b/module/story/css/zerocase.zh-cn.css new file mode 100644 index 0000000000..6e60376bc6 --- /dev/null +++ b/module/story/css/zerocase.zh-cn.css @@ -0,0 +1 @@ +.thWidth{width:90px !important;} diff --git a/module/story/css/zerocase.zh-tw.css b/module/story/css/zerocase.zh-tw.css new file mode 100644 index 0000000000..6e60376bc6 --- /dev/null +++ b/module/story/css/zerocase.zh-tw.css @@ -0,0 +1 @@ +.thWidth{width:90px !important;} diff --git a/module/task/css/activate.css b/module/task/css/activate.css deleted file mode 100644 index 40079b4d82..0000000000 --- a/module/task/css/activate.css +++ /dev/null @@ -1,2 +0,0 @@ -.thWidth{width:90px !important;} -html[lang^='zh-'] .thWidth{width:70px !important;} diff --git a/module/task/css/activate.en.css b/module/task/css/activate.en.css new file mode 100644 index 0000000000..6e60376bc6 --- /dev/null +++ b/module/task/css/activate.en.css @@ -0,0 +1 @@ +.thWidth{width:90px !important;} diff --git a/module/task/css/activate.zh-cn.css b/module/task/css/activate.zh-cn.css new file mode 100644 index 0000000000..b9b2a977fd --- /dev/null +++ b/module/task/css/activate.zh-cn.css @@ -0,0 +1 @@ +.thWidth{width:70px !important;} diff --git a/module/task/css/activate.zh-tw.css b/module/task/css/activate.zh-tw.css new file mode 100644 index 0000000000..b9b2a977fd --- /dev/null +++ b/module/task/css/activate.zh-tw.css @@ -0,0 +1 @@ +.thWidth{width:70px !important;} diff --git a/module/task/css/edit.css b/module/task/css/edit.css deleted file mode 100644 index 75a2ee6bcb..0000000000 --- a/module/task/css/edit.css +++ /dev/null @@ -1,4 +0,0 @@ -.thWidth{width:85px !important;} -.lifeThWidth{width:120px !important;} -html[lang^='zh-'] .thWidth{width:80px !important;} -html[lang^='zh-'] .lifeThWidth{width:80px !important;} diff --git a/module/task/css/edit.en.css b/module/task/css/edit.en.css new file mode 100644 index 0000000000..431f63ee3f --- /dev/null +++ b/module/task/css/edit.en.css @@ -0,0 +1,2 @@ +.thWidth{width:85px !important;} +.lifeThWidth{width:120px !important;} diff --git a/module/task/css/edit.zh-cn.css b/module/task/css/edit.zh-cn.css new file mode 100644 index 0000000000..0845bfd2fc --- /dev/null +++ b/module/task/css/edit.zh-cn.css @@ -0,0 +1,2 @@ +.thWidth{width:80px !important;} +.lifeThWidth{width:80px !important;} diff --git a/module/task/css/edit.zh-tw.css b/module/task/css/edit.zh-tw.css new file mode 100644 index 0000000000..0845bfd2fc --- /dev/null +++ b/module/task/css/edit.zh-tw.css @@ -0,0 +1,2 @@ +.thWidth{width:80px !important;} +.lifeThWidth{width:80px !important;} diff --git a/module/task/css/finish.css b/module/task/css/finish.css deleted file mode 100644 index 168c123dd1..0000000000 --- a/module/task/css/finish.css +++ /dev/null @@ -1,2 +0,0 @@ -.thWidth{width:120px !important;} -html[lang^='zh-'] .thWidth{width:100px !important;} diff --git a/module/task/css/finish.en.css b/module/task/css/finish.en.css new file mode 100644 index 0000000000..62f3e6f10c --- /dev/null +++ b/module/task/css/finish.en.css @@ -0,0 +1 @@ +.thWidth{width:120px !important;} diff --git a/module/task/css/finish.zh-cn.css b/module/task/css/finish.zh-cn.css new file mode 100644 index 0000000000..b0e274a3db --- /dev/null +++ b/module/task/css/finish.zh-cn.css @@ -0,0 +1 @@ +.thWidth{width:100px !important;} diff --git a/module/task/css/finish.zh-tw.css b/module/task/css/finish.zh-tw.css new file mode 100644 index 0000000000..b0e274a3db --- /dev/null +++ b/module/task/css/finish.zh-tw.css @@ -0,0 +1 @@ +.thWidth{width:100px !important;} diff --git a/module/task/css/recordestimate.css b/module/task/css/recordestimate.css index 29f1fdaf3b..e9786a1ccf 100644 --- a/module/task/css/recordestimate.css +++ b/module/task/css/recordestimate.css @@ -1,4 +1 @@ .form-condensed .table-form {margin-bottom: 20px;} - -.thWidth{width:90px !important;} -html[lang^='zh-'] .thWidth{width:70px !important;} diff --git a/module/task/css/recordestimate.en.css b/module/task/css/recordestimate.en.css new file mode 100644 index 0000000000..6e60376bc6 --- /dev/null +++ b/module/task/css/recordestimate.en.css @@ -0,0 +1 @@ +.thWidth{width:90px !important;} diff --git a/module/task/css/recordestimate.zh-cn.css b/module/task/css/recordestimate.zh-cn.css new file mode 100644 index 0000000000..b9b2a977fd --- /dev/null +++ b/module/task/css/recordestimate.zh-cn.css @@ -0,0 +1 @@ +.thWidth{width:70px !important;} diff --git a/module/task/css/recordestimate.zh-tw.css b/module/task/css/recordestimate.zh-tw.css new file mode 100644 index 0000000000..b9b2a977fd --- /dev/null +++ b/module/task/css/recordestimate.zh-tw.css @@ -0,0 +1 @@ +.thWidth{width:70px !important;} diff --git a/module/task/css/view.css b/module/task/css/view.css index b504eafd4b..f925220cde 100644 --- a/module/task/css/view.css +++ b/module/task/css/view.css @@ -2,8 +2,4 @@ .side-col #legendProjectAndTask .list-unstyled{padding:10px; border:1px solid #ddd; border-top:0px; margin:0px;} .tab-pane table {border: 1px solid #ddd; border-top: none;} -#legendLife .thWidth{width:100px !important;} -.effortThWidth{width:90px !important;} -html[lang^='zh-'] #legendLife .thWidth{width:70px !important;} -html[lang^='zh-'] .effortThWidth{width:70px !important;} html[lang^='zh-'] .thWidth{width:80px !important;} diff --git a/module/task/css/view.en.css b/module/task/css/view.en.css new file mode 100644 index 0000000000..c470aad1aa --- /dev/null +++ b/module/task/css/view.en.css @@ -0,0 +1,2 @@ +#legendLife .thWidth{width:100px !important;} +.effortThWidth{width:90px !important;} diff --git a/module/task/css/view.zh-cn.css b/module/task/css/view.zh-cn.css new file mode 100644 index 0000000000..fdc11d4eec --- /dev/null +++ b/module/task/css/view.zh-cn.css @@ -0,0 +1,2 @@ +#legendLife .thWidth{width:70px !important;} +.effortThWidth{width:70px !important;} diff --git a/module/task/css/view.zh-tw.css b/module/task/css/view.zh-tw.css new file mode 100644 index 0000000000..fdc11d4eec --- /dev/null +++ b/module/task/css/view.zh-tw.css @@ -0,0 +1,2 @@ +#legendLife .thWidth{width:70px !important;} +.effortThWidth{width:70px !important;} diff --git a/module/task/js/start.js b/module/task/js/start.js index 1b64249543..42d34541d7 100644 --- a/module/task/js/start.js +++ b/module/task/js/start.js @@ -8,4 +8,4 @@ function checkLeft() if(!result) setTimeout(function() {$.enableForm()}, 500); return result; } -} \ No newline at end of file +} diff --git a/module/task/model.php b/module/task/model.php index 48931e09ca..7e0f0bd64e 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -1674,41 +1674,9 @@ class taskModel extends model $parents = array(); foreach($tasks as $task) { - if($task->parent == -1) $parents[] = $task->id; - } - if(!empty($parents)) - { - /* Select children task. */ - $children = $this->dao->select('DISTINCT t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.product, t2.branch, t2.version AS latestStoryVersion, t2.status AS storyStatus, t3.realname AS assignedToRealName') - ->from(TABLE_TASK)->alias('t1') - ->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id') - ->leftJoin(TABLE_USER)->alias('t3')->on('t1.assignedTo = t3.account') - ->leftJoin(TABLE_MODULE)->alias('t4')->on('t1.module = t4.id') - ->where('t1.parent')->in($parents) - ->andWhere('t1.deleted')->eq(0) - ->beginIF($productID)->andWhere("((t4.root=" . (int)$productID . " and t4.type='story') OR t2.product=" . (int)$productID . ")")->fi() - ->beginIF($type == 'undone')->andWhere("(t1.status = 'wait' or t1.status ='doing')")->fi() - ->beginIF($type == 'needconfirm')->andWhere('t2.version > t1.storyVersion')->andWhere("t2.status = 'active'")->fi() - ->beginIF($type == 'assignedtome')->andWhere('t1.assignedTo')->eq($this->app->user->account)->fi() - ->beginIF($type == 'finishedbyme') - ->andWhere('t1.finishedby', 1)->eq($this->app->user->account) - ->orWhere('t1.finishedList')->like("%,{$this->app->user->account},%") - ->markRight(1) - ->fi() - ->beginIF($type == 'delayed')->andWhere('t1.deadline')->gt('1970-1-1')->andWhere('t1.deadline')->lt(date(DT_DATE1))->andWhere('t1.status')->in('wait,doing')->fi() - ->beginIF(is_array($type) or strpos(',all,undone,needconfirm,assignedtome,delayed,finishedbyme,myinvolved,', ",$type,") === false)->andWhere('t1.status')->in($type)->fi() - ->beginIF($modules)->andWhere('t1.module')->in($modules)->fi() - ->orderBy("t1.$orderBy") - ->fetchAll('id'); - - if(!empty($children)) - { - foreach($children as $child) - { - $tasks[$child->parent]->children[$child->id] = $child; - } - } + if($task->parent > 0) $parents[$task->parent] = $task->parent; } + $parents = $this->dao->select('*')->from(TABLE_TASK)->where('id')->in($parents)->fetchAll('id'); foreach($tasks as $task) { @@ -1719,6 +1687,11 @@ class taskModel extends model $tasks[$task->parent]->children[$task->id] = $task; unset($tasks[$task->id]); } + else + { + $parent = $parents[$task->parent]; + $task->parentName = $parent->name; + } } } @@ -1861,26 +1834,9 @@ class taskModel extends model $parents = array(); foreach($tasks as $task) { - if($task->parent == -1) $parents[] = $task->id; - } - if(!empty($parents)) - { - /* Select children task. */ - $children = $this->dao->select('id, parent, name, assignedTo, pri, status, estimate, consumed, closedReason, `left`') - ->from(TABLE_TASK) - ->where('story')->eq((int)$storyID) - ->andwhere('parent')->in($parents) - ->beginIF($projectID)->andWhere('project')->eq($projectID)->fi() - ->fetchAll('id'); - - if(!empty($children)) - { - foreach($children as $child) - { - $tasks[$child->parent]->children[$child->id] = $child; - } - } + if($task->parent > 0) $parents[$task->parent] = $task->parent; } + $parents = $this->dao->select('*')->from(TABLE_TASK)->where('id')->in($parents)->fetchAll('id'); foreach($tasks as $task) { @@ -1891,6 +1847,11 @@ class taskModel extends model $tasks[$task->parent]->children[$task->id] = $task; unset($tasks[$task->id]); } + else + { + $parent = $parents[$task->parent]; + $task->parentName = $parent->name; + } } } @@ -2690,6 +2651,7 @@ class taskModel extends model echo ""; break; case 'name': + if($task->parent > 0 and isset($task->parentName)) $task->name = "{$task->parentName} / {$task->name}"; if(!empty($task->product) && isset($branchGroups[$task->product][$task->branch])) echo "" . $branchGroups[$task->product][$task->branch] . ' '; if(empty($task->children) and $task->module and isset($modulePairs[$task->module])) echo "" . $modulePairs[$task->module] . ' '; if($task->parent > 0) echo '' . $this->lang->task->childrenAB . ' '; diff --git a/module/testcase/css/view.css b/module/testcase/css/view.css index 097ea7a91e..8c667e34d5 100644 --- a/module/testcase/css/view.css +++ b/module/testcase/css/view.css @@ -4,8 +4,3 @@ .outer .col-side .side-handle{right:0px;top:10px;} .outer.hide-side .main-side{display:none;} .table-fixed td{white-space: unset;} - -.thWidth{width:90px !important;} -.lifeThWidth{width:100px !important;} -html[lang^='zh-'] .thWidth{width:60px !important;} -html[lang^='zh-'] .lifeThWidth{width:60px !important;} diff --git a/module/testcase/css/view.en.css b/module/testcase/css/view.en.css new file mode 100644 index 0000000000..3b04fa1321 --- /dev/null +++ b/module/testcase/css/view.en.css @@ -0,0 +1,2 @@ +.thWidth{width:90px !important;} +.lifeThWidth{width:100px !important;} diff --git a/module/testcase/css/view.zh-cn.css b/module/testcase/css/view.zh-cn.css new file mode 100644 index 0000000000..2d131540f7 --- /dev/null +++ b/module/testcase/css/view.zh-cn.css @@ -0,0 +1,2 @@ +.thWidth{width:60px !important;} +.lifeThWidth{width:60px !important;} diff --git a/module/testcase/css/view.zh-tw.css b/module/testcase/css/view.zh-tw.css new file mode 100644 index 0000000000..2d131540f7 --- /dev/null +++ b/module/testcase/css/view.zh-tw.css @@ -0,0 +1,2 @@ +.thWidth{width:60px !important;} +.lifeThWidth{width:60px !important;} diff --git a/module/testcase/lang/en.php b/module/testcase/lang/en.php index df0e01009b..7174ebf558 100644 --- a/module/testcase/lang/en.php +++ b/module/testcase/lang/en.php @@ -68,10 +68,10 @@ $lang->testcase->stepNumberAB = 'S'; $lang->testcase->createBug = 'Report Bug'; $lang->testcase->fromModule = 'Source Module'; $lang->testcase->fromCase = 'Source Case'; -$lang->testcase->sync = 'Sync. Case'; +$lang->testcase->sync = 'Synchronize Case'; $lang->testcase->ignore = 'Ignore'; $lang->testcase->fromTesttask = 'From Test Request'; -$lang->testcase->fromCaselib = 'From CaseLib'; +$lang->testcase->fromCaselib = 'From Case Library'; $lang->testcase->deleted = 'Deleted'; $lang->case = $lang->testcase; // For dao checking using. Because 'case' is a php keywords, so the module name is testcase, table name is still case. @@ -118,7 +118,7 @@ $lang->testcase->copy = 'Copy Case'; $lang->testcase->group = 'Group'; $lang->testcase->groupName = 'Group Name'; $lang->testcase->step = 'Steps'; -$lang->testcase->stepChild = 'Child Step'; +$lang->testcase->stepChild = 'Child Steps'; $lang->testcase->viewAll = 'All Cases'; $lang->testcase->new = 'New'; @@ -143,7 +143,7 @@ $lang->testcase->lblTypeValue = 'Type Value'; $lang->testcase->lblStageValue = 'Phase Value'; $lang->testcase->lblStatusValue = 'Status Value'; -$lang->testcase->legendBasicInfo = 'Basic Info'; +$lang->testcase->legendBasicInfo = 'Basic Information'; $lang->testcase->legendAttatch = 'Files'; $lang->testcase->legendLinkBugs = 'Bugs'; $lang->testcase->legendOpenAndEdit = 'Create/Edit'; @@ -168,8 +168,8 @@ $lang->testcase->priList[4] = 4; $lang->testcase->typeList[''] = ''; $lang->testcase->typeList['feature'] = 'Feature'; $lang->testcase->typeList['performance'] = 'Performance'; -$lang->testcase->typeList['config'] = 'Config'; -$lang->testcase->typeList['install'] = 'Install'; +$lang->testcase->typeList['config'] = 'Configuration'; +$lang->testcase->typeList['install'] = 'Installation'; $lang->testcase->typeList['security'] = 'Security'; $lang->testcase->typeList['interface'] = 'Interface'; $lang->testcase->typeList['other'] = 'Others'; diff --git a/module/testsuite/control.php b/module/testsuite/control.php index cffacb98dd..f97162dd4d 100644 --- a/module/testsuite/control.php +++ b/module/testsuite/control.php @@ -659,6 +659,7 @@ class testsuite extends control $this->view->position[] = $this->lang->testsuite->view; $this->view->lib = $lib; + $this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter'); $this->view->actions = $this->loadModel('action')->getList('caselib', $libID); $this->display(); } diff --git a/module/todo/css/create.css b/module/todo/css/create.css index 79bfeb460a..2a9a6facd0 100644 --- a/module/todo/css/create.css +++ b/module/todo/css/create.css @@ -3,8 +3,3 @@ #end_chosen .chosen-single{border-left: none;} .cycleConfig .checkbox-primary{float:left; width:100px;} .cycleConfig .tab-pane{padding:8px 0px;} - -.thWidth{width:110px !important;} -.inputGroupWidth{width:270px !important;} -html[lang^='zh-'] .thWidth{width:80px !important;} -html[lang^='zh-'] .inputGroupWidth{width:200px !important;} diff --git a/module/todo/css/create.en.css b/module/todo/css/create.en.css new file mode 100644 index 0000000000..db36066e9e --- /dev/null +++ b/module/todo/css/create.en.css @@ -0,0 +1,2 @@ +.thWidth{width:110px !important;} +.inputGroupWidth{width:270px !important;} diff --git a/module/todo/css/create.zh-cn.css b/module/todo/css/create.zh-cn.css new file mode 100644 index 0000000000..5dbcc35dcf --- /dev/null +++ b/module/todo/css/create.zh-cn.css @@ -0,0 +1,2 @@ +.thWidth{width:80px !important;} +.inputGroupWidth{width:200px !important;} diff --git a/module/todo/css/create.zh-tw.css b/module/todo/css/create.zh-tw.css new file mode 100644 index 0000000000..5dbcc35dcf --- /dev/null +++ b/module/todo/css/create.zh-tw.css @@ -0,0 +1,2 @@ +.thWidth{width:80px !important;} +.inputGroupWidth{width:200px !important;} diff --git a/module/todo/css/view.css b/module/todo/css/view.css index 3b85559125..b978984d1f 100644 --- a/module/todo/css/view.css +++ b/module/todo/css/view.css @@ -1,5 +1,2 @@ #projectModal .modal-dialog, #productModal .modal-dialog {top: auto!important; bottom: 90px;} .body-modal #projectModal .modal-dialog, .body-modal #productModal .modal-dialog {top: auto!important; bottom: 55px;} - -.thWidth{width:100px !important;} -html[lang^='zh-'] .thWidth{width:80px !important;} diff --git a/module/todo/css/view.en.css b/module/todo/css/view.en.css new file mode 100644 index 0000000000..b0e274a3db --- /dev/null +++ b/module/todo/css/view.en.css @@ -0,0 +1 @@ +.thWidth{width:100px !important;} diff --git a/module/todo/css/view.zh-cn.css b/module/todo/css/view.zh-cn.css new file mode 100644 index 0000000000..585844a6f4 --- /dev/null +++ b/module/todo/css/view.zh-cn.css @@ -0,0 +1 @@ +.thWidth{width:80px !important;} diff --git a/module/todo/css/view.zh-tw.css b/module/todo/css/view.zh-tw.css new file mode 100644 index 0000000000..585844a6f4 --- /dev/null +++ b/module/todo/css/view.zh-tw.css @@ -0,0 +1 @@ +.thWidth{width:80px !important;} diff --git a/module/translate/css/choosemodule.css b/module/translate/css/choosemodule.css deleted file mode 100644 index fec930329c..0000000000 --- a/module/translate/css/choosemodule.css +++ /dev/null @@ -1,2 +0,0 @@ -.thWidth{width:150px !important;} -html[lang^='zh-'] .thWidth{width:110px !important;} diff --git a/module/translate/css/choosemodule.en.css b/module/translate/css/choosemodule.en.css new file mode 100644 index 0000000000..6ea5450c92 --- /dev/null +++ b/module/translate/css/choosemodule.en.css @@ -0,0 +1 @@ +.thWidth{width:150px !important;} diff --git a/module/translate/css/choosemodule.zh-cn.css b/module/translate/css/choosemodule.zh-cn.css new file mode 100644 index 0000000000..b3e7551ab2 --- /dev/null +++ b/module/translate/css/choosemodule.zh-cn.css @@ -0,0 +1 @@ +.thWidth{width:110px !important;} diff --git a/module/translate/css/choosemodule.zh-tw.css b/module/translate/css/choosemodule.zh-tw.css new file mode 100644 index 0000000000..b3e7551ab2 --- /dev/null +++ b/module/translate/css/choosemodule.zh-tw.css @@ -0,0 +1 @@ +.thWidth{width:110px !important;} diff --git a/module/translate/css/index.css b/module/translate/css/index.css index 4724f3d925..36d02bab5f 100644 --- a/module/translate/css/index.css +++ b/module/translate/css/index.css @@ -14,6 +14,3 @@ #finishedLangs .item{height:30px;} #finishedLangs .item h4{margin:0; height:100%; line-height:30px;} #finishedLangs .item .pull-right{color:#999; line-height:30px;} - -.thWidth{width:130px !important;} -html[lang^='zh-'] .thWidth{width:95px !important;} diff --git a/module/translate/css/index.en.css b/module/translate/css/index.en.css new file mode 100644 index 0000000000..82442a3745 --- /dev/null +++ b/module/translate/css/index.en.css @@ -0,0 +1 @@ +.thWidth{width:130px !important;} diff --git a/module/translate/css/index.zh-cn.css b/module/translate/css/index.zh-cn.css new file mode 100644 index 0000000000..d6f932be53 --- /dev/null +++ b/module/translate/css/index.zh-cn.css @@ -0,0 +1 @@ +.thWidth{width:95px !important;} diff --git a/module/translate/css/index.zh-tw.css b/module/translate/css/index.zh-tw.css new file mode 100644 index 0000000000..d6f932be53 --- /dev/null +++ b/module/translate/css/index.zh-tw.css @@ -0,0 +1 @@ +.thWidth{width:95px !important;} diff --git a/module/tree/css/edit.css b/module/tree/css/edit.css index 5fffac811f..0037a851da 100644 --- a/module/tree/css/edit.css +++ b/module/tree/css/edit.css @@ -1,4 +1 @@ body{background:white; overflow:none} - -.thWidth{width:120px !important;} -html[lang^='zh-'] .thWidth{width:80px !important;} diff --git a/module/tree/css/edit.en.css b/module/tree/css/edit.en.css new file mode 100644 index 0000000000..62f3e6f10c --- /dev/null +++ b/module/tree/css/edit.en.css @@ -0,0 +1 @@ +.thWidth{width:120px !important;} diff --git a/module/tree/css/edit.zh-cn.css b/module/tree/css/edit.zh-cn.css new file mode 100644 index 0000000000..585844a6f4 --- /dev/null +++ b/module/tree/css/edit.zh-cn.css @@ -0,0 +1 @@ +.thWidth{width:80px !important;} diff --git a/module/tree/css/edit.zh-tw.css b/module/tree/css/edit.zh-tw.css new file mode 100644 index 0000000000..585844a6f4 --- /dev/null +++ b/module/tree/css/edit.zh-tw.css @@ -0,0 +1 @@ +.thWidth{width:80px !important;} diff --git a/module/tutorial/control.php b/module/tutorial/control.php index 6c98ca423a..8cd151406b 100644 --- a/module/tutorial/control.php +++ b/module/tutorial/control.php @@ -71,7 +71,7 @@ class tutorial extends control { $this->session->set('tutorialMode', false); $this->loadModel('setting')->setItem($this->app->user->account . '.common.global.novice', 0); - if(empty($referer)) $referer = $this->createLink('index'); + if(empty($referer)) $referer = helper::safe64Encode(helper::createLink('my', 'index', '', 'html')); die(js::locate(helper::safe64Decode($referer), 'parent')); } diff --git a/module/tutorial/view/index.html.php b/module/tutorial/view/index.html.php index 8b48a0cff0..6675547e4f 100644 --- a/module/tutorial/view/index.html.php +++ b/module/tutorial/view/index.html.php @@ -12,7 +12,7 @@ ?> - +
    @@ -22,7 +22,7 @@

    tutorial->congratulation ?>

    -   tutorial->exit ?> +   ' class='btn btn-success'> tutorial->exit ?>
    @@ -36,7 +36,7 @@

    tutorial->common ?>

    diff --git a/module/upgrade/css/afterexec.css b/module/upgrade/css/afterexec.css index d25a8583a6..88647422e9 100644 --- a/module/upgrade/css/afterexec.css +++ b/module/upgrade/css/afterexec.css @@ -46,7 +46,6 @@ .card>.card-reveal>.card-heading{padding:20px 10px} .card:hover>.card-reveal{top:0} -.card.ad{margin-bottom:0px;} .card.ad > .img-wrapper { background-position: center; background-repeat: no-repeat; diff --git a/module/upgrade/view/afterexec.html.php b/module/upgrade/view/afterexec.html.php index 24632e4e80..f8189dfd31 100644 --- a/module/upgrade/view/afterexec.html.php +++ b/module/upgrade/view/afterexec.html.php @@ -24,7 +24,7 @@
    install->promotion?>
    install->product as $product):?> -
    +
    diff --git a/module/user/control.php b/module/user/control.php index 6718ac3213..0ae554abab 100644 --- a/module/user/control.php +++ b/module/user/control.php @@ -372,14 +372,17 @@ class user extends control */ public function setReferer($referer = '') { - if(!empty($referer)) - { - $this->referer = helper::safe64Decode($referer); - } - else - { - $this->referer = $this->server->http_referer ? $this->server->http_referer: ''; - } + $this->referer = $this->server->http_referer ? $this->server->http_referer: ''; + if(!empty($referer)) $this->referer = helper::safe64Decode($referer); + + /* Build zentao link regular. */ + $webRoot = $this->config->webRoot; + $linkReg = $webRoot . 'index.php?' . $this->config->moduleVar . '=\w+&' . $this->config->methodVar . '=\w+'; + if($this->config->requestType == 'PATH_INFO') $linkReg = $webRoot . '\w+' . $this->config->requestFix . '\w+'; + $linkReg = str_replace(array('/', '.', '?', '-'), array('\/', '\.', '\?', '\-'), $linkReg); + + /* Check zentao link by regular. */ + $this->referer = preg_match('/^' . $linkReg . '/', $this->referer) ? $this->referer : $webRoot; } /** diff --git a/module/user/css/batchcreate.css b/module/user/css/batchcreate.css index 54a34a9262..a00d948957 100644 --- a/module/user/css/batchcreate.css +++ b/module/user/css/batchcreate.css @@ -1,6 +1 @@ th.required:after {position: relative; right: 10px;} - -.accountThWidth{width:200px !important;} -.genderThWidth{width:140px !important;} -html[lang^='zh-'] .accountThWidth{width:180px !important;} -html[lang^='zh-'] .genderThWidth{width:90px !important;} diff --git a/module/user/css/batchcreate.en.css b/module/user/css/batchcreate.en.css new file mode 100644 index 0000000000..a3d9df2c27 --- /dev/null +++ b/module/user/css/batchcreate.en.css @@ -0,0 +1,2 @@ +.accountThWidth{width:200px !important;} +.genderThWidth{width:140px !important;} diff --git a/module/user/css/batchcreate.zh-cn.css b/module/user/css/batchcreate.zh-cn.css new file mode 100644 index 0000000000..fa09b2cae3 --- /dev/null +++ b/module/user/css/batchcreate.zh-cn.css @@ -0,0 +1,2 @@ +.accountThWidth{width:180px !important;} +.genderThWidth{width:90px !important;} diff --git a/module/user/css/batchcreate.zh-tw.css b/module/user/css/batchcreate.zh-tw.css new file mode 100644 index 0000000000..fa09b2cae3 --- /dev/null +++ b/module/user/css/batchcreate.zh-tw.css @@ -0,0 +1,2 @@ +.accountThWidth{width:180px !important;} +.genderThWidth{width:90px !important;} diff --git a/module/user/js/batchcreate.js b/module/user/js/batchcreate.js index 570f4b526e..bce0dc7c6b 100644 --- a/module/user/js/batchcreate.js +++ b/module/user/js/batchcreate.js @@ -10,15 +10,26 @@ function changeGroup(role, i) } $('#group' + i).trigger('chosen:updated'); } + function toggleCheck(obj, i) { - if($(obj).val() == '') + var $this = $(obj); + var password = $this.val(); + var $ditto = $('#ditto' + i); + var $passwordStrength = $this.closest('.input-group').find('.passwordStrength'); + if(password == '') { - $('#ditto' + i).attr('checked', true); + $ditto.attr('checked', true); + $ditto.closest('.input-group-addon').show(); + $passwordStrength.hide(); + $passwordStrength.html(''); } else { - $('#ditto' + i).removeAttr('checked'); + $ditto.removeAttr('checked'); + $ditto.closest('.input-group-addon').hide(); + $passwordStrength.html(passwordStrengthList[computePasswordStrength(password)]); + $passwordStrength.show(); } } diff --git a/module/user/js/login.js b/module/user/js/login.js index c3eb257456..4a59b47655 100644 --- a/module/user/js/login.js +++ b/module/user/js/login.js @@ -26,7 +26,10 @@ $(document).ready(function() { var password = $('input:password').val().trim(); var passwordStrength = computePasswordStrength(password); - $('#submit').after(""); + + if($('#loginPanel #passwordStrength').length == 0) $(this).after(""); + $('#loginPanel #passwordStrength').val(passwordStrength); + var rand = $('input#verifyRand').val(); if(password.length != 32 && typeof(md5) == 'function') $('input:password').val(md5(md5(password) + rand)); }); diff --git a/module/user/lang/zh-cn.php b/module/user/lang/zh-cn.php index 506799db86..5b70b18831 100644 --- a/module/user/lang/zh-cn.php +++ b/module/user/lang/zh-cn.php @@ -113,6 +113,7 @@ $lang->user->loginFailed = "登录失败,请检查您的用户名或密码是 $lang->user->lockWarning = "您还有%s次尝试机会。"; $lang->user->loginLocked = "密码尝试次数太多,请联系管理员解锁,或%s分钟后重试。"; $lang->user->weakPassword = "您的密码强度小于系统设定。"; +$lang->user->errorWeak = "密码不能使用【%s】这些常用弱口令。"; $lang->user->roleList[''] = ''; $lang->user->roleList['dev'] = '研发'; @@ -171,6 +172,8 @@ $lang->user->error->realname = "【ID %s】的真实姓名必须填写"; $lang->user->error->password = "【ID %s】的密码必须为六位以上"; $lang->user->error->mail = "【ID %s】的邮箱地址不正确"; $lang->user->error->reserved = "【ID %s】的用户名已被系统预留"; +$lang->user->error->weakPassword = "【ID %s】的密码强度小于系统设定。"; +$lang->user->error->commonWeak = "【ID %s】的密码不能使用【%s】这些常用若口令。"; $lang->user->error->verifyPassword = "验证失败,请检查您的系统登录密码是否正确"; $lang->user->error->originalPassword = "原密码不正确"; diff --git a/module/user/model.php b/module/user/model.php index 069be4698e..40d737f1f9 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -220,12 +220,6 @@ class userModel extends model ->remove('group, password1, password2, verifyPassword') ->get(); - if(isset($this->config->safe->mode) and $this->computePasswordStrength($this->post->password1) < $this->config->safe->mode) - { - dao::$errors['password1'][] = $this->lang->user->weakPassword; - return false; - } - if(empty($_POST['verifyPassword']) or $this->post->verifyPassword != md5($this->app->user->password . $this->session->rand)) { dao::$errors['verifyPassword'][] = $this->lang->user->error->verifyPassword; @@ -276,17 +270,21 @@ class userModel extends model $users->account[$i] = trim($users->account[$i]); if($users->account[$i] != '') { - if(strtolower($users->account[$i]) == 'guest') die(js::error(sprintf($this->lang->user->error->reserved, $i+1))); + if(strtolower($users->account[$i]) == 'guest') die(js::error(sprintf($this->lang->user->error->reserved, $i + 1))); $account = $this->dao->select('account')->from(TABLE_USER)->where('account')->eq($users->account[$i])->fetch(); - if($account) die(js::error(sprintf($this->lang->user->error->accountDupl, $i+1))); - if(in_array($users->account[$i], $accounts)) die(js::error(sprintf($this->lang->user->error->accountDupl, $i+1))); - if(!validater::checkAccount($users->account[$i])) die(js::error(sprintf($this->lang->user->error->account, $i+1))); - if($users->realname[$i] == '') die(js::error(sprintf($this->lang->user->error->realname, $i+1))); - if($users->email[$i] and !validater::checkEmail($users->email[$i])) die(js::error(sprintf($this->lang->user->error->mail, $i+1))); + if($account) die(js::error(sprintf($this->lang->user->error->accountDupl, $i + 1))); + if(in_array($users->account[$i], $accounts)) die(js::error(sprintf($this->lang->user->error->accountDupl, $i + 1))); + if(!validater::checkAccount($users->account[$i])) die(js::error(sprintf($this->lang->user->error->account, $i + 1))); + if($users->realname[$i] == '') die(js::error(sprintf($this->lang->user->error->realname, $i + 1))); + if($users->email[$i] and !validater::checkEmail($users->email[$i])) die(js::error(sprintf($this->lang->user->error->mail, $i + 1))); $users->password[$i] = (isset($prev['password']) and $users->ditto[$i] == 'on' and empty($users->password[$i])) ? $prev['password'] : $users->password[$i]; - if(!validater::checkReg($users->password[$i], '|(.){6,}|')) die(js::error(sprintf($this->lang->user->error->password, $i+1))); + if(!validater::checkReg($users->password[$i], '|(.){6,}|')) die(js::error(sprintf($this->lang->user->error->password, $i + 1))); $role = $users->role[$i] == 'ditto' ? (isset($prev['role']) ? $prev['role'] : '') : $users->role[$i]; + /* Check weak and common weak password. */ + if(isset($this->config->safe->mode) and $this->computePasswordStrength($users->password[$i]) < $this->config->safe->mode) die(js::error(sprintf($this->lang->user->error->weakPassword, $i + 1))); + if(!empty($this->config->safe->changeWeak) and strpos(",{$this->config->safe->weak},", ",{$this->post->password1},") !== false) die(js::error(sprintf($this->lang->user->error->commonWeak, $i + 1, $this->config->safe->weak))); + $data[$i] = new stdclass(); $data[$i]->dept = $users->dept[$i] == 'ditto' ? (isset($prev['dept']) ? $prev['dept'] : 0) : $users->dept[$i]; $data[$i]->account = $users->account[$i]; @@ -377,12 +375,6 @@ class userModel extends model ->remove('password1, password2, groups,verifyPassword') ->get(); - if(isset($this->config->safe->mode) and isset($user->password) and $this->computePasswordStrength($this->post->password1) < $this->config->safe->mode) - { - dao::$errors['password1'][] = $this->lang->user->weakPassword; - return false; - } - if(empty($_POST['verifyPassword']) or $this->post->verifyPassword != md5($this->app->user->password . $this->session->rand)) { dao::$errors['verifyPassword'][] = $this->lang->user->error->verifyPassword; @@ -560,12 +552,6 @@ class userModel extends model ->remove('account, password1, password2, originalPassword') ->get(); - if(isset($this->config->safe->mode) and $this->computePasswordStrength($this->post->password1) < $this->config->safe->mode) - { - dao::$errors['password1'][] = $this->lang->user->weakPassword; - return false; - } - if(empty($_POST['originalPassword']) or md5($this->post->originalPassword) != $this->app->user->password) { dao::$errors['originalPassword'][] = $this->lang->user->error->originalPassword; @@ -595,12 +581,6 @@ class userModel extends model if(!$user) return false; $password = md5($this->post->password1); - if(isset($this->config->safe->mode) and $this->computePasswordStrength($this->post->password1) < $this->config->safe->mode) - { - dao::$errors['password1'][] = $this->lang->user->weakPassword; - return false; - } - $this->dao->update(TABLE_USER)->set('password')->eq($password)->autoCheck()->where('account')->eq($this->post->account)->exec(); return !dao::isError(); } @@ -620,6 +600,9 @@ class userModel extends model { if($this->post->password1 != $this->post->password2) dao::$errors['password'][] = $this->lang->error->passwordsame; if(!validater::checkReg($this->post->password1, '|(.){6,}|')) dao::$errors['password'][] = $this->lang->error->passwordrule; + + if(isset($this->config->safe->mode) and $this->computePasswordStrength($this->post->password1) < $this->config->safe->mode) dao::$errors['password1'][] = $this->lang->user->weakPassword; + if(!empty($this->config->safe->changeWeak) and strpos(",{$this->config->safe->weak},", ",{$this->post->password1},") !== false) dao::$errors['password1'][] = sprintf($this->lang->user->errorWeak, $this->config->safe->weak); } return !dao::isError(); } diff --git a/module/user/view/batchcreate.html.php b/module/user/view/batchcreate.html.php index 877dedbe87..990e55b5cb 100644 --- a/module/user/view/batchcreate.html.php +++ b/module/user/view/batchcreate.html.php @@ -76,6 +76,7 @@
    "; if($i != 0) echo " 0 ? "checked" : '') . " /> {$lang->user->ditto}"; ?>
    @@ -116,4 +117,5 @@
    +user->passwordStrengthList)?> diff --git a/module/webhook/css/create.css b/module/webhook/css/create.css index 7d7140893c..3cc7643665 100644 --- a/module/webhook/css/create.css +++ b/module/webhook/css/create.css @@ -3,6 +3,3 @@ .objectType {margin-right: 5px !important;} #paramsTR th{padding-left:25px;} #paramsTR th label{font-weight:bold; padding-left:25px;} - -.thWidth{width:120px !important;} -html[lang^='zh-'] .thWidth{width:90px !important;} diff --git a/module/webhook/css/create.en.css b/module/webhook/css/create.en.css new file mode 100644 index 0000000000..62f3e6f10c --- /dev/null +++ b/module/webhook/css/create.en.css @@ -0,0 +1 @@ +.thWidth{width:120px !important;} diff --git a/module/webhook/css/create.zh-cn.css b/module/webhook/css/create.zh-cn.css new file mode 100644 index 0000000000..6e60376bc6 --- /dev/null +++ b/module/webhook/css/create.zh-cn.css @@ -0,0 +1 @@ +.thWidth{width:90px !important;} diff --git a/module/webhook/css/create.zh-tw.css b/module/webhook/css/create.zh-tw.css new file mode 100644 index 0000000000..6e60376bc6 --- /dev/null +++ b/module/webhook/css/create.zh-tw.css @@ -0,0 +1 @@ +.thWidth{width:90px !important;} diff --git a/module/webhook/css/edit.css b/module/webhook/css/edit.css index 7d7140893c..3cc7643665 100644 --- a/module/webhook/css/edit.css +++ b/module/webhook/css/edit.css @@ -3,6 +3,3 @@ .objectType {margin-right: 5px !important;} #paramsTR th{padding-left:25px;} #paramsTR th label{font-weight:bold; padding-left:25px;} - -.thWidth{width:120px !important;} -html[lang^='zh-'] .thWidth{width:90px !important;} diff --git a/module/webhook/css/edit.en.css b/module/webhook/css/edit.en.css new file mode 100644 index 0000000000..62f3e6f10c --- /dev/null +++ b/module/webhook/css/edit.en.css @@ -0,0 +1 @@ +.thWidth{width:120px !important;} diff --git a/module/webhook/css/edit.zh-cn.css b/module/webhook/css/edit.zh-cn.css new file mode 100644 index 0000000000..6e60376bc6 --- /dev/null +++ b/module/webhook/css/edit.zh-cn.css @@ -0,0 +1 @@ +.thWidth{width:90px !important;} diff --git a/module/webhook/css/edit.zh-tw.css b/module/webhook/css/edit.zh-tw.css new file mode 100644 index 0000000000..6e60376bc6 --- /dev/null +++ b/module/webhook/css/edit.zh-tw.css @@ -0,0 +1 @@ +.thWidth{width:90px !important;} diff --git a/www/js/my.full.js b/www/js/my.full.js index 3323ac1790..49c6a867c2 100644 --- a/www/js/my.full.js +++ b/www/js/my.full.js @@ -91,17 +91,39 @@ function setFormAction(actionLink, hiddenwin, obj) * @access public * @return void */ -function setImageSize(image, maxWidth) +function setImageSize(image, maxWidth, maxHeight) { + var $image = $(image); + if($image.parent().prop('tagName').toLowerCase() == 'a') return; + /* If not set maxWidth, set it auto. */ if(!maxWidth) { bodyWidth = $('body').width(); maxWidth = bodyWidth - 470; // The side bar's width is 336, and add some margins. } + if(!maxHeight) maxHeight = $(top.window).height(); - if($(image).width() > maxWidth) $(image).attr('width', maxWidth); - $(image).wrap('
    '); + setTimeout(function() + { + maxHeightStyle = $image.height() > 0 ? 'max-height:' + maxHeight + 'px' : ''; + if($image.width() > 0 && $image.width() > maxWidth) $image.attr('width', maxWidth); + $image.wrap(''); + if($image.height() > 0 && $image.height() > maxHeight) $image.closest('a').append("" + lang.expand + " "); + }, 50); +} + +/** + * Show more image when image is too height. + * + * @param obj $obj + * @access public + * @return void + */ +function showMoreImage(obj) +{ + $(obj).parents('a').css('max-height', 'none'); + $(obj).remove(); } /** @@ -734,10 +756,10 @@ function convertURL() $('.article-content, .article>.content').each(function() { - var aTags = []; + var aTags = []; var iframeTags = []; - var imgTags = []; - var content = $(this).html(); + var imgTags = []; + var content = $(this).html(); $(this).find('a').each(function(i) { aTags[i] = $(this).prop('outerHTML'); diff --git a/www/theme/default/style.css b/www/theme/default/style.css index f9ddf54bad..8beaab96c0 100644 --- a/www/theme/default/style.css +++ b/www/theme/default/style.css @@ -24,6 +24,9 @@ #dropMenu.show-right-col .col-right>.list-group{width:250px;max-width:260px;} #dropMenu .col-footer{width:230px;} +.main-actions .btn-toolbar .divider {margin-right:8px !important; margin-left: 8px !important;} +.main-actions .btn-toolbar .btn + .btn {margin-left: 8px !important;} + /* Pager v-align. */ .pager>li>.pager-label { padding: 2px; line-height: 21px; } @@ -33,3 +36,17 @@ .modal-title{font-size: 14px;} .fixed-footer .text {color: #fff;} + +a.showMoreImage { +display: block; +height: 30px; +line-height: 30px; +background: #888; +position: absolute; +bottom: 0px; +width: 100%; +opacity: 0.7; +text-align: center; +color:red; +} +a.showMoreImage:hover{opacity: 1;} diff --git a/www/upgrade.php.tmp b/www/upgrade.php.tmp index 609ed1c84b..13abaab89e 100644 --- a/www/upgrade.php.tmp +++ b/www/upgrade.php.tmp @@ -12,9 +12,9 @@ /* Judge my.php exists or not. */ define('IN_UPGRADE', true); $dbConfig = dirname(dirname(__FILE__)) . '/config/db.php'; +$myConfig = dirname(dirname(__FILE__)) . '/config/my.php'; if(file_exists($dbConfig)) { - $myConfig = dirname(dirname(__FILE__)) . '/config/my.php'; if(file_exists($myConfig)) { $myContent = trim(file_get_contents($myConfig)); @@ -35,6 +35,7 @@ if(file_exists($dbConfig)) file_put_contents($myConfig, $myContent); } } +if(!file_exists($myConfig)) die(header('location: install.php')); error_reporting(0); diff --git a/xuanxuan/module/chat/ext/model/class/xuanxuan.class.php b/xuanxuan/module/chat/ext/model/class/xuanxuan.class.php index 1392498605..728e0799a5 100644 --- a/xuanxuan/module/chat/ext/model/class/xuanxuan.class.php +++ b/xuanxuan/module/chat/ext/model/class/xuanxuan.class.php @@ -92,7 +92,7 @@ class xuanxuanChat extends chatModel $position = strrpos($host, ':'); $port = $position === false ? '' : substr($host, $position + 1); $server = $this->config->xuanxuan->server; - if($port and strpos($server, ":$port") === false) + if($port and strpos($server, ":") === false) { $server = rtrim($server, '/'); $server = "{$server}:{$port}";
    project->kanbanHideCols?>kanbanSetting->optionList, $allCols)?>kanbanSetting->optionList, $setting->allCols)?>
    project->kanbanColsColor?>
    - $color):?> + colorList as $status => $color):?>
    diff --git a/module/project/view/kanban.html.php b/module/project/view/kanban.html.php index 92e32ad200..f11ebab71d 100644 --- a/module/project/view/kanban.html.php +++ b/module/project/view/kanban.html.php @@ -9,6 +9,7 @@ */ ?> +
    task->statusList[$col];?>
    +
    - +
    tasks[$col])):?> tasks[$col] as $task):?> diff --git a/module/release/lang/zh-cn.php b/module/release/lang/zh-cn.php index fb2a646e98..91903b68a1 100644 --- a/module/release/lang/zh-cn.php +++ b/module/release/lang/zh-cn.php @@ -28,6 +28,7 @@ $lang->release->confirmUnlinkStory = "您确认移除该需求吗?"; $lang->release->confirmUnlinkBug = "您确认移除该Bug吗?"; $lang->release->existBuild = '『版本』已经有『%s』这条记录了。您可以更改『发布名称』或者选择一个『版本』。'; $lang->release->noRelease = '暂时没有发布。'; +$lang->release->errorDate = '发布日期不能大于今天。'; $lang->release->basicInfo = '基本信息'; diff --git a/module/release/model.php b/module/release/model.php index bb22044618..a11b44f7dd 100644 --- a/module/release/model.php +++ b/module/release/model.php @@ -106,6 +106,11 @@ class releaseModel extends model $productID = (int)$productID; $branch = (int)$branch; $buildID = 0; + + /* Check date must be not more than today. */ + if($this->post->date > date('Y-m-d')) return dao::$errors[] = $this->lang->release->errorDate; + + /* Auto create build when release is not link build. */ if($this->post->build == false && $this->post->name) { $build = $this->dao->select('*')->from(TABLE_BUILD) @@ -125,7 +130,7 @@ class releaseModel extends model ->add('builder', $this->app->user->account) ->add('branch', $branch) ->stripTags($this->config->release->editor->create['id'], $this->config->allowedTags) - ->remove('marker,build,files,labels,uid') + ->remove('marker,build,files,labels,uid,subStatus') // There is the subStatus field in the biz version. ->get(); $build = $this->loadModel('file')->processImgURL($build, $this->config->release->editor->create['id']); $this->dao->insert(TABLE_BUILD)->data($build) diff --git a/module/release/view/edit.html.php b/module/release/view/edit.html.php index c256264445..d35affc5ed 100644 --- a/module/release/view/edit.html.php +++ b/module/release/view/edit.html.php @@ -47,11 +47,11 @@
    release->status;?> release->statusList, $release->status, "class='form-control'");?>
    release->desc;?> desc), "rows=10 class='form-control kindeditor' hidefocus='true'");?>
    files;?> fetch('file', 'buildform');?>