1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-22 13:34:04 +03:00

* Fixed time picker not working on chrome

* Added warn on service being replaced by new publication
This commit is contained in:
Adolfo Gómez García 2016-05-20 09:37:12 +02:00
parent ba4eeffc77
commit 2d14884454
6 changed files with 31 additions and 27 deletions

View File

@ -61,7 +61,7 @@ from datetime import datetime, timedelta
import logging
import pickle
__updated__ = '2016-05-19'
__updated__ = '2016-05-20'
logger = logging.getLogger(__name__)
@ -195,8 +195,8 @@ class DeployedService(UUIDModel, TaggingMixin):
def toBeReplaced(self):
# return datetime.now()
activePub = self.activePublication()
if activePub is None or activePub.revision == self.current_pub_revision - 1:
return None
# if activePub is None or activePub.revision == self.current_pub_revision - 1:
# return None
# Return the date
ret = self.recoverValue('toBeReplacedIn')

View File

@ -1,7 +1,7 @@
/*!
* Timepicker Component for Twitter Bootstrap
*
* Copyright 2013 Joris de Wit
* Copyright 2013 Joris de Wit and bootstrap-timepicker contributors
*
* Contributors https://github.com/jdewit/bootstrap-timepicker/graphs/contributors
*
@ -174,10 +174,12 @@
case 9: //tab
if (e.shiftKey) {
if (this.highlightedUnit === 'hour') {
this.hideWidget();
break;
}
this.highlightPrevUnit();
} else if ((this.showMeridian && this.highlightedUnit === 'meridian') || (this.showSeconds && this.highlightedUnit === 'second') || (!this.showMeridian && !this.showSeconds && this.highlightedUnit ==='minute')) {
this.hideWidget();
break;
} else {
this.highlightNextUnit();
@ -887,7 +889,7 @@
} else {
if (hour >= this.maxHours) {
hour = this.maxHours - 1;
} else if (hour < 0) {
} else if ((hour < 0) || (hour === 12 && timeMode === 1)){
hour = 0;
}
}

View File

@ -89,12 +89,14 @@
$tspn.parent().datepicker options
# timepicker
$.each $(selector + " input[type=time]:not([readonly])"), (index, tspn) ->
$.each $(selector + " input[type=udstime]:not([readonly])"), (index, tspn) ->
$tspn = $(tspn)
opts =
showMeridian: false
defaultTime: false
$tspn.attr("type", "text")
$tspn.timepicker opts
# Activate "cool" selects

View File

@ -24,7 +24,7 @@
<label for="id-rule-start-time" class="col-sm-3 control-label" data-toggle="tooltip" data-title="{% trans 'Starting hour'%}">{% trans 'Starting hour' %}</label>
<div class="col-sm-9">
<div class="input-group bootstrap-timepicker timepicker">
<input type="time" value="00:00" id="id-rule-start-time" name="rule_start_time" class="form-control input-small">
<input type="udstime" value="00:00" id="id-rule-start-time" name="rule_start_time" class="form-control input-small">
<span class="input-group-addon"><i class="glyphicon glyphicon-time"></i></span>
</div>
</div>

View File

@ -44,7 +44,7 @@ from uds.services.OVirt.OVirtProvider import Provider as oVirtProvider
import logging
import os
__updated__ = '2016-04-18'
__updated__ = '2016-05-19'
logger = logging.getLogger(__name__)

View File

@ -52,7 +52,7 @@ import logging
logger = logging.getLogger(__name__)
__updated__ = '2016-05-19'
__updated__ = '2016-05-20'
def about(request):
@ -174,7 +174,7 @@ def index(request):
tbr = svr.toBeReplaced()
if tbr is not None:
tbr = formats.date_format(tbr, "SHORT_DATETIME_FORMAT")
tbrt = ugettext('This service is about to be replaced by a new version. Please, close the session & save all your work to avoid loosing it.<br>This action will be executed at {}').format(tbr)
tbrt = ugettext('This service is about to be replaced by a new version. Please, close the session before {} and save all your work to avoid loosing it.').format(tbr)
else:
tbrt = ''