[ADD] Plugged datetimepicker on datetime widget
bzr revid: fme@openerp.com-20110405095549-b5k2xrnveod93ioi
This commit is contained in:
parent
c08686a3b8
commit
bf9eb36d07
|
@ -10,6 +10,7 @@
|
|||
<script type="text/javascript" src="/base/static/lib/qweb/qweb.js"></script>
|
||||
<script type="text/javascript" src="/base/static/lib/jquery/jquery-1.5.1.js"></script>
|
||||
<script type="text/javascript" src="/base/static/lib/jquery.ui/js/jquery-ui-1.8.9.custom.min.js"></script>
|
||||
<script type="text/javascript" src="/base/static/lib/jquery.ui/js/jquery-ui-timepicker-addon.js"></script>
|
||||
<script type="text/javascript" src="/base/static/lib/jquery.jqGrid/jquery.jqGrid.js"></script>
|
||||
<script type="text/javascript" src="/base/static/lib/jquery.superfish/js/hoverIntent.js"></script>
|
||||
<script type="text/javascript" src="/base/static/lib/jquery.superfish/js/superfish.js"></script>
|
||||
|
|
|
@ -422,7 +422,7 @@ body.openerp {
|
|||
border-radius: 3px;
|
||||
background: white;
|
||||
}
|
||||
.openerp input.field_date {
|
||||
.openerp input.field_date, .openerp input.field_datetime {
|
||||
background: url('../img/ui/field_calendar.png') no-repeat right center;
|
||||
background-origin: content-box;
|
||||
-moz-background-origin: content;
|
||||
|
|
|
@ -492,7 +492,16 @@ openerp.base.form.FieldDate = openerp.base.form.FieldChar.extend({
|
|||
},
|
||||
start: function() {
|
||||
this._super.apply(this, arguments);
|
||||
this.$element.find('input').datepicker();
|
||||
this.$element.find('input').datepicker({
|
||||
dateFormat: 'yy-mm-dd'
|
||||
});
|
||||
},
|
||||
set_value: function(value) {
|
||||
this._super.apply(this, arguments);
|
||||
var show_value = (value != null && value !== false) ? value : '';
|
||||
this.$element.find('input').val(show_value);
|
||||
},
|
||||
get_value: function() {
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -500,6 +509,20 @@ openerp.base.form.FieldDatetime = openerp.base.form.FieldChar.extend({
|
|||
init: function(view, node) {
|
||||
this._super(view, node);
|
||||
this.template = "FieldDatetime";
|
||||
},
|
||||
start: function() {
|
||||
this._super.apply(this, arguments);
|
||||
this.$element.find('input').datetimepicker({
|
||||
dateFormat: 'yy-mm-dd',
|
||||
timeFormat: 'hh:mm:ss'
|
||||
});
|
||||
},
|
||||
set_value: function(value) {
|
||||
this._super.apply(this, arguments);
|
||||
var show_value = (value != null && value !== false) ? value : '';
|
||||
this.$element.find('input').val(show_value);
|
||||
},
|
||||
get_value: function() {
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue