From ce08eaed8d4b5d3db3bd9ab6612fdfb8cf2a44f8 Mon Sep 17 00:00:00 2001 From: azhi Date: Fri, 2 Aug 2013 08:50:36 +0800 Subject: [PATCH] * adjust the placeholder of chosen. --- module/bug/js/batchcreate.js | 2 -- module/bug/js/common.js | 1 - module/bug/lang/en.php | 3 --- module/bug/lang/zh-cn.php | 3 --- module/bug/view/assignto.html.php | 1 - module/bug/view/batchcreate.html.php | 3 +-- module/bug/view/confirmbug.html.php | 1 - module/bug/view/create.html.php | 1 - module/bug/view/edit.html.php | 1 - module/common/lang/en.php | 3 ++- module/common/lang/zh-cn.php | 3 ++- module/common/view/chosen.html.php | 4 +++- module/story/lang/en.php | 1 - module/story/lang/zh-cn.php | 1 - module/story/view/create.html.php | 2 +- module/story/view/header.html.php | 4 ---- module/story/view/review.html.php | 2 +- module/task/js/create.js | 1 - module/task/js/edit.js | 1 - module/task/lang/en.php | 3 --- module/task/lang/zh-cn.php | 3 --- module/task/view/create.html.php | 1 - module/task/view/edit.html.php | 1 - module/user/control.php | 4 ++-- 24 files changed, 12 insertions(+), 38 deletions(-) diff --git a/module/bug/js/batchcreate.js b/module/bug/js/batchcreate.js index 9c64d3017c..0a61812bff 100644 --- a/module/bug/js/batchcreate.js +++ b/module/bug/js/batchcreate.js @@ -1,7 +1,6 @@ $(function() { $(".chosenBox select").chosen({no_results_text: noResultsMatch}); - $(".chzn-container-multi .chzn-choices li.search-field input").attr('value', chooseBuilds); }) /** @@ -32,6 +31,5 @@ function loadProjectBuilds(productID, projectID, index) $('#buildBox' + index + ' select').addClass('select-1'); $('#buildBox' + index + ' select').attr('id', 'openedBuilds[' + index + '][]'); $('#buildBox' + index + ' select').chosen({no_results_text: ''}); - $('#buildBox' + index + ' .chzn-container-multi .chzn-choices li.search-field input').attr('value', chooseBuilds); }); } diff --git a/module/bug/js/common.js b/module/bug/js/common.js index 0f2a7fcde3..1fb51070c7 100644 --- a/module/bug/js/common.js +++ b/module/bug/js/common.js @@ -18,7 +18,6 @@ $(function() $("#story").chosen({no_results_text:noResultsMatch}); $("#task").chosen({no_results_text:noResultsMatch}); $("#mailto").chosen({no_results_text:noResultsMatch}); - $(".chzn-container-multi .chzn-choices li.search-field input").attr('value', mailto); } }); diff --git a/module/bug/lang/en.php b/module/bug/lang/en.php index d561ba36f8..c35cfa613a 100644 --- a/module/bug/lang/en.php +++ b/module/bug/lang/en.php @@ -363,6 +363,3 @@ $lang->bug->action->unlinkedfromplan = array('main' => '$date, 由 $acto $lang->bug->placeholder = new stdclass(); $lang->bug->placeholder->chooseBuilds = 'Choose builds...'; - -$lang->bug->chosen = new stdClass(); -$lang->bug->chosen->mailto = 'Select users to mail...'; diff --git a/module/bug/lang/zh-cn.php b/module/bug/lang/zh-cn.php index 455c89ab83..c6a80c45d1 100644 --- a/module/bug/lang/zh-cn.php +++ b/module/bug/lang/zh-cn.php @@ -363,6 +363,3 @@ $lang->bug->action->unlinkedfromplan = array('main' => '$date, 由 $acto $lang->bug->placeholder = new stdclass(); $lang->bug->placeholder->chooseBuilds = '选择相关版本...'; - -$lang->bug->chosen = new stdClass(); -$lang->bug->chosen->mailto = '输入用户名自动选择...'; diff --git a/module/bug/view/assignto.html.php b/module/bug/view/assignto.html.php index c7bd08f39f..03f598694c 100644 --- a/module/bug/view/assignto.html.php +++ b/module/bug/view/assignto.html.php @@ -16,7 +16,6 @@ include '../../common/view/kindeditor.html.php'; include '../../common/view/chosen.html.php'; js::set('holders', $lang->bug->placeholder); js::set('page', 'assignedto'); -js::set('mailto', $lang->bug->chosen->mailto); ?>
diff --git a/module/bug/view/batchcreate.html.php b/module/bug/view/batchcreate.html.php index 5d1c997fdf..9e80b127a6 100644 --- a/module/bug/view/batchcreate.html.php +++ b/module/bug/view/batchcreate.html.php @@ -12,7 +12,6 @@ ?> -bug->placeholder->chooseBuilds);?>
@@ -34,7 +33,7 @@ - + diff --git a/module/bug/view/confirmbug.html.php b/module/bug/view/confirmbug.html.php index 94b5410f16..3ce7fa410e 100755 --- a/module/bug/view/confirmbug.html.php +++ b/module/bug/view/confirmbug.html.php @@ -16,7 +16,6 @@ include '../../common/view/kindeditor.html.php'; include '../../common/view/chosen.html.php'; js::set('holders', $lang->bug->placeholder); js::set('page', 'confirmbug'); -js::set('mailto', $lang->bug->chosen->mailto); ?>
bug->project . $lang->colon . $lang->bug->batchCreate;?>
bug->placeholder->chooseBuilds}'");?> bug->typeList, '');?>
diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index 29231a14a9..a5b99f7719 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -18,7 +18,6 @@ include '../../common/view/alert.html.php'; include '../../common/view/kindeditor.html.php'; js::set('holders', $lang->bug->placeholder); js::set('page', 'create'); -js::set('mailto', $lang->bug->chosen->mailto); ?> diff --git a/module/bug/view/edit.html.php b/module/bug/view/edit.html.php index a13709fb18..a2fa684a8b 100644 --- a/module/bug/view/edit.html.php +++ b/module/bug/view/edit.html.php @@ -26,7 +26,6 @@ js::set('oldStoryID' , $bug->story); js::set('oldTaskID' , $bug->task); js::set('oldOpenedBuild' , $bug->openedBuild); js::set('oldResolvedBuild' , $bug->resolvedBuild); -js::set('mailto' , $lang->bug->chosen->mailto); ?> diff --git a/module/common/lang/en.php b/module/common/lang/en.php index fbf9cb49d2..deb8ca5bcb 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -355,7 +355,8 @@ $lang->downNotify = "Down notify"; $lang->suhosinInfo = "Warming:data is too large! Please enlarge the setting of sohusin.post.max_vars and sohusin.request.max_vars in php.ini. Otherwise partial data can't be saved."; -$lang->noResultsMatch = "No results match"; +$lang->noResultsMatch = "No results match"; +$lang->chooseUsersToMail = "Choose users to mail..."; /* Date times. */ define('DT_DATETIME1', 'Y-m-d H:i:s'); diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 214a45361e..5395c44d80 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -356,7 +356,8 @@ $lang->downNotify = "下载桌面提醒"; $lang->suhosinInfo = "警告:数据太多,请在php.ini中修改sohusin.post.max_varssohusin.request.max_vars(设置更大的数)。 保存并重新启动apache,否则会造成部分数据无法保存。"; -$lang->noResultsMatch = "没有匹配结果"; +$lang->noResultsMatch = "没有匹配结果"; +$lang->chooseUsersToMail = "选择要发信通知的用户..."; /* 时间格式设置。*/ define('DT_DATETIME1', 'Y-m-d H:i:s'); diff --git a/module/common/view/chosen.html.php b/module/common/view/chosen.html.php index 50dd848a7b..75b17c8f1c 100755 --- a/module/common/view/chosen.html.php +++ b/module/common/view/chosen.html.php @@ -10,9 +10,11 @@ if($config->debug) #colorbox, #cboxOverlay, #cboxWrapper{z-index:9999;} diff --git a/module/story/view/review.html.php b/module/story/view/review.html.php index e910380e00..77ce75b98d 100644 --- a/module/story/view/review.html.php +++ b/module/story/view/review.html.php @@ -49,7 +49,7 @@ var assignedTo = 'lastEditedBy ? print($story->lastEditedBy) : pri - + diff --git a/module/task/js/create.js b/module/task/js/create.js index a13773d0ac..5c24b339e2 100644 --- a/module/task/js/create.js +++ b/module/task/js/create.js @@ -87,5 +87,4 @@ $(document).ready(function() setPreview(); $("#story").chosen({no_results_text: noResultsMatch}); $("#mailto").chosen({no_results_text: noResultsMatch}); - $("#mailto_chzn .chzn-choices li.search-field input").attr('value', mailto); }); diff --git a/module/task/js/edit.js b/module/task/js/edit.js index 931ccf6656..05684c6313 100644 --- a/module/task/js/edit.js +++ b/module/task/js/edit.js @@ -2,7 +2,6 @@ $(function() { $("#story").chosen({no_results_text: noResultsMatch}); $("#mailto").chosen({no_results_text: noResultsMatch}); - $("#mailto_chzn .chzn-choices li.search-field input").attr('value', mailto); $('.iframe').colorbox({width:900, height:500, iframe:true, transition:'none', onCleanup:function(){parent.location.href=parent.location.href;}}); }) diff --git a/module/task/lang/en.php b/module/task/lang/en.php index 69f62abec4..fec1ff5bfd 100644 --- a/module/task/lang/en.php +++ b/module/task/lang/en.php @@ -233,6 +233,3 @@ $lang->task->report->finishedTasksPerDay->graph->rotateNames = '1'; $lang->task->placeholder = new stdclass(); $lang->task->placeholder->estimate = 'The estimated time for this task'; - -$lang->task->chosen = new stdclass(); -$lang->task->chosen->mailto = 'Choose users to mail...'; diff --git a/module/task/lang/zh-cn.php b/module/task/lang/zh-cn.php index 3fc1d06340..6bcaab5804 100644 --- a/module/task/lang/zh-cn.php +++ b/module/task/lang/zh-cn.php @@ -233,6 +233,3 @@ $lang->task->report->finishedTasksPerDay->graph->rotateNames = '1'; $lang->task->placeholder = new stdclass(); $lang->task->placeholder->estimate = '对该任务最初的预计'; - -$lang->task->chosen = new stdclass(); -$lang->task->chosen->mailto = '输入用户名进行选择...'; diff --git a/module/task/view/create.html.php b/module/task/view/create.html.php index 591678ba5d..c2bed3f69e 100644 --- a/module/task/view/create.html.php +++ b/module/task/view/create.html.php @@ -15,7 +15,6 @@ task->placeholder);?> -task->chosen->mailto);?>
story->reviewedBy;?>user->account, "class='text-1' multiple");?>user->account, "class='text-1' multiple data-placeholder='{$lang->story->chosen->reviewedBy}'");?>
story->comment;?>
diff --git a/module/task/view/edit.html.php b/module/task/view/edit.html.php index 4aef81e032..81c59d9881 100644 --- a/module/task/view/edit.html.php +++ b/module/task/view/edit.html.php @@ -17,7 +17,6 @@ story); ?> task->confirmChangeProject); ?> -task->chosen->mailto);?>
TASK #id . $lang->colon . html::input('name', $task->name, 'class="text-1"');?>
diff --git a/module/user/control.php b/module/user/control.php index 128117cc09..70b7f494ba 100644 --- a/module/user/control.php +++ b/module/user/control.php @@ -909,8 +909,8 @@ class user extends control public function ajaxGetContactUsers($contactListID) { $users = $this->user->getPairs('nodeleted,devfirst'); - if(!$contactListID) return print(html::select('mailto[]', $users, '', "class='text-1' multiple")); + if(!$contactListID) return print(html::select('mailto[]', $users, '', "class='text-1' multiple data-placeholder='{$this->lang->chooseUsersToMail}'")); $list = $this->user->getContactListByID($contactListID); - return print(html::select('mailto[]', $users, $list->userList, "class='text-1' multiple")); + return print(html::select('mailto[]', $users, $list->userList, "class='text-1' multiple data-placeholder='{$this->lang->chooseUsersToMail}'")); } }