Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
wyd621
2014-05-02 09:49:16 +00:00
6 changed files with 70 additions and 32 deletions
+1 -1
View File
@@ -114,7 +114,7 @@ js::set('refresh', $lang->refresh);
echo html::select('mailto[]', $users, str_replace(' ', '', $mailto), "class='form-control chosen' multiple");
?>
</td>
<td>
<td class='text-top'>
<?php
if($contactLists) echo html::select('', $contactLists, '', "class='form-control' onchange=\"setMailto('mailto', this.value)\"");
?>
+55 -26
View File
@@ -8,9 +8,58 @@ if($config->debug)
}
?>
<script language='javascript'>
/**
* Format date to a string
*
* @param string format
* @return string
*/
Date.prototype.format = function(format)
{
var date =
{
"M+": this.getMonth() + 1,
"d+": this.getDate(),
"h+": this.getHours(),
"m+": this.getMinutes(),
"s+": this.getSeconds(),
"q+": Math.floor((this.getMonth() + 3) / 3),
"S+": this.getMilliseconds()
};
if (/(y+)/i.test(format))
{
format = format.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length));
}
for (var k in date)
{
if (new RegExp("(" + k + ")").test(format))
{
format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? date[k] : ("00" + date[k]).substr(("" + date[k]).length));
}
}
return format;
}
$(function()
{
$('.form-datetime').datetimepicker(
$.fn.fixedDate = function()
{
return $(this).each(function()
{
var $this = $(this);
if($this.val() != '' && !$this.hasClass('form-time'))
{
var date = new Date($this.val());
if(!date.valueOf()) date = new Date();
if($this.hasClass('form-datetime')) $this.val(date.format('yyyy-MM-dd hh:mm'));
else $this.val(date.format('yyyy-MM-dd'));
}
return $this;
});
};
var options =
{
language: '<?php echo $clientLang; ?>',
weekStart: 1,
@@ -21,31 +70,11 @@ $(function()
forceParse: 0,
showMeridian: 1,
format: 'yyyy-mm-dd hh:ii'
});
$('.form-date').datetimepicker(
{
language: '<?php echo $clientLang; ?>',
weekStart: 1,
todayBtn: 1,
autoclose: 1,
todayHighlight: 1,
startView: 2,
minView: 2,
forceParse: 0,
format: 'yyyy-mm-dd'
});
$('.form-time').datetimepicker({
language: '<?php echo $clientLang; ?>',
weekStart: 1,
todayBtn: 1,
autoclose: 1,
todayHighlight: 1,
startView: 1,
minView: 0,
maxView: 1,
forceParse: 0,
format: 'hh:ii'
});
}
$('.form-datetime').fixedDate().datetimepicker(options);
$('.form-date').fixedDate().datetimepicker($.extend(options, {minView: 2, format: 'yyyy-mm-dd'}));
$('.form-time').fixedDate().datetimepicker($.extend(options, {startView: 1, minView: 0, maxView: 1, format: 'hh:ii'}));
$('.datepicker-wrapper').click(function()
{
+8 -3
View File
@@ -85,17 +85,22 @@
</tr>
<tr>
<th><?php echo $lang->task->mailto;?></th>
<td colspan='3'>
<td colspan='2'>
<?php
echo html::select('mailto[]', $users, str_replace(' ', '', $task->mailto), "multiple class='form-control'");
if($contactLists) echo html::select('', $contactLists, '', "class='form-control' onchange=\"setMailto('mailto', this.value)\"");
?>
</td>
<td class='text-top'>
<?php
if($contactLists) echo html::select('', $contactLists, '', "class='form-control' onchange=\"setMailto('mailto', this.value)\"");
?>
</td>
</tr>
<tr>
<th><?php echo $lang->files;?></th>
<td colspan='3'><?php echo $this->fetch('file', 'buildform');?></td>
</tr>
<td colspan='2'><?php echo $this->fetch('file', 'buildform');?></td>
</tr>
<tr>
<th><?php echo $lang->task->afterSubmit;?></th>
<td colspan='3'><?php echo html::radio('after', $lang->task->afterChoices, 'continueAdding');?></td>
+4
View File
@@ -1 +1,5 @@
.group-item {display:block; width:100px; float:left}
.panel.with-list {border: none}
.panel.with-list .panel-heading {border: 1px solid #ddd; border-bottom: none}
.panel.with-list .list-group {margin: 0}
.list-group-item.active {color: #1A4F85}
+1 -1
View File
@@ -22,7 +22,7 @@
</div>
<div class='row'>
<div class='col-md-3 col-lg-2'>
<div class='panel panel-sm'>
<div class='panel panel-sm with-list'>
<div class='panel-heading'>
<i class='icon-list-ul'></i> <strong><?php echo $lang->user->contacts->contactsList;?></strong>
</div>
+1 -1
View File
@@ -40,7 +40,7 @@
tr.text-center > td, tr.text-center > th {text-align: center;}
tr.text-center > td.text-left, tr.text-center > th.text-left {text-align: left;}
tr.text-center > td.text-right, tr.text-center > th.text-right {text-align: right;}
tr.text-top td, tr.text-top th {vertical-align: top!important;}
.text-top, tr.text-top td, tr.text-top th {vertical-align: top!important;}
/* columns */
.row-table {display: table; width: 100%}