Skip to content

Commit

Permalink
* added language support to the chosen control.
Browse files Browse the repository at this point in the history
 * added some icons definitions.
  • Loading branch information
catouse committed Mar 25, 2014
1 parent a1c3b85 commit 4fb25db
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 25 deletions.
49 changes: 27 additions & 22 deletions module/common/lang/zh-cn.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,10 @@

$lang->suhosinInfo = "警告:数据太多,请在php.ini中修改<font color=red>sohusin.post.max_vars</font>和<font color=red>sohusin.request.max_vars</font>(设置更大的数)。 保存并重新启动apache,否则会造成部分数据无法保存。";

$lang->noResultsMatch = "没有匹配结果";
$lang->chooseUsersToMail = "选择要发信通知的用户...";
$lang->noResultsMatch = "没有匹配结果";
$lang->selectAnOption = "选择一个选项";
$lang->selectSoomeOptions = "选择一些选项";
$lang->chooseUsersToMail = "选择要发信通知的用户...";

/* 时间格式设置。*/
define('DT_DATETIME1', 'Y-m-d H:i:s');
Expand Down Expand Up @@ -404,7 +406,8 @@
$lang->icons['todo'] = 'checked';
$lang->icons['product'] = 'cube';
$lang->icons['bug'] = 'bug';
$lang->icons['task'] = 'tasks';
$lang->icons['task'] = 'check-sign';
$lang->icons['tasks'] = 'tasks';
$lang->icons['project'] = 'folder-close-alt';
$lang->icons['doc'] = 'file-text';
$lang->icons['story'] = 'lightbulb';
Expand All @@ -416,24 +419,26 @@
$lang->icons['test'] = 'check';
$lang->icons['team'] = 'group';

$lang->icons['create'] = 'plus';
$lang->icons['batchCreate'] = 'plus-sign';
$lang->icons['edit'] = 'pencil';
$lang->icons['delete'] = 'remove';
$lang->icons['copy'] = 'copy';
$lang->icons['report'] = 'bar-chart';
$lang->icons['export'] = 'download-alt';
$lang->icons['finish'] = 'ok-sign';
$lang->icons['resolve'] = 'ok-sign';
$lang->icons['start'] = 'play';
$lang->icons['assign'] = 'hand-right';
$lang->icons['assignTo'] = 'hand-right';
$lang->icons['change'] = 'random';
$lang->icons['link'] = 'link';
$lang->icons['close'] = 'off';
$lang->icons['activate'] = 'off';
$lang->icons['review'] = 'search';
$lang->icons['putoff'] = 'calendar';
$lang->icons['suspend'] = 'pause';
$lang->icons['create'] = 'plus';
$lang->icons['batchCreate'] = 'plus-sign';
$lang->icons['edit'] = 'pencil';
$lang->icons['delete'] = 'remove';
$lang->icons['copy'] = 'copy';
$lang->icons['report'] = 'bar-chart';
$lang->icons['export'] = 'download-alt';
$lang->icons['finish'] = 'ok-sign';
$lang->icons['resolve'] = 'ok-sign';
$lang->icons['start'] = 'play';
$lang->icons['assign'] = 'hand-right';
$lang->icons['assignTo'] = 'hand-right';
$lang->icons['change'] = 'random';
$lang->icons['link'] = 'link';
$lang->icons['close'] = 'off';
$lang->icons['activate'] = 'off';
$lang->icons['review'] = 'search';
$lang->icons['putoff'] = 'calendar';
$lang->icons['suspend'] = 'pause';
$lang->icons['cancel'] = 'ban-circle';
$lang->icons['recordEstimate'] = 'time';

include (dirname(__FILE__) . '/menuOrder.php');
8 changes: 5 additions & 3 deletions module/common/view/chosen.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@
#colorbox, #cboxOverlay, #cboxWrapper{z-index:9999;}
</style>
<script>
noResultsMatch = '<?php echo $lang->noResultsMatch;?>';
chooseUsersToMail = '<?php echo $lang->chooseUsersToMail;?>';
noResultsMatch = '<?php echo $lang->noResultsMatch;?>';
chooseUsersToMail = '<?php echo $lang->chooseUsersToMail;?>';
selectAnOption = '<?php echo $lang->selectAnOption;?>';
selectSoomeOptions = '<?php echo $lang->selectSoomeOptions;?>';
$(document).ready(function()
{
$("#mailto").attr('data-placeholder', chooseUsersToMail);
$("#productID").chosen({no_results_text: noResultsMatch, width: '100%'});
$("#projectID").chosen({no_results_text: noResultsMatch, width: '100%'});
$(".chosen").chosen({no_results_text: noResultsMatch, allow_single_deselect: true, disable_search_threshold: 10, width: '100%'});
$(".chosen").chosen({no_results_text: noResultsMatch, allow_single_deselect: true, disable_search_threshold: 10, width: '100%', placeholder_text_single: selectAnOption, placeholder_text_multiple: selectSoomeOptions});
});
</script>

0 comments on commit 4fb25db

Please sign in to comment.