diff --git a/server/src/uds/models/ServicesPool.py b/server/src/uds/models/ServicesPool.py index d8e97b7f..b65a5baf 100644 --- a/server/src/uds/models/ServicesPool.py +++ b/server/src/uds/models/ServicesPool.py @@ -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') diff --git a/server/src/uds/static/adm/js/bootstrap-timepicker.js b/server/src/uds/static/adm/js/bootstrap-timepicker.js index f2be1478..bbb923c5 100644 --- a/server/src/uds/static/adm/js/bootstrap-timepicker.js +++ b/server/src/uds/static/adm/js/bootstrap-timepicker.js @@ -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; } } diff --git a/server/src/uds/static/adm/js/gui-tools.coffee b/server/src/uds/static/adm/js/gui-tools.coffee index 35e1ae49..4d4dad69 100644 --- a/server/src/uds/static/adm/js/gui-tools.coffee +++ b/server/src/uds/static/adm/js/gui-tools.coffee @@ -18,11 +18,11 @@ selector = selector or "" selector += " .btn3d" $.each $(selector), (index, value) -> - + # If no events associated, return $this = $(@) clkEvents = [] - + # Store old click events, so we can reconstruct click chain later try $.each $._data(value, "events").click, (index, fnc) -> @@ -32,20 +32,20 @@ return $this.unbind "click" - - # If Mousedown registers a temporal mouseUp event on parent, to lauch button click + + # If Mousedown registers a temporal mouseUp event on parent, to lauch button click $this.mousedown (event) -> $("body").mouseup (e) -> # Remove temporal mouseup handler $(this).unbind "mouseup" - + # If movement of mouse is not too far... (16 px maybe well for 3d buttons?) x = event.pageX - e.pageX y = event.pageY - e.pageY dist_square = x * x + y * y if dist_square < 16 * 16 - + # Register again old event handlers $.each clkEvents, (index, fnc) -> $this.click fnc.handler @@ -62,7 +62,7 @@ return applyCustoms: (selector) -> - + # Activate "custom" styles $.each $(selector + " input:checkbox"), (index, tspn) -> $tspn = $(tspn) @@ -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 = + opts = showMeridian: false defaultTime: false + $tspn.attr("type", "text") + $tspn.timepicker opts # Activate "cool" selects @@ -129,10 +131,10 @@ max: maxVal postfix: postfix decimals: 0 - + # TEST: cooler on mobile devices $(selector + " .selectpicker").selectpicker "mobile" if /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) - + # Activate tooltips $(selector + " [data-toggle=\"tooltip\"]").tooltip delay: @@ -141,12 +143,12 @@ placement: "auto right" - + # Fix 3d buttons gui.tools.fix3dButtons selector return - + # Datetime renderer (with specified format) renderDate: (format) -> (data, type, full) -> @@ -157,7 +159,7 @@ val = api.tools.strftime(format, new Date(data * 1000)) return "" + val + "" - + # Log level rendererer renderLogLovel: -> levels = diff --git a/server/src/uds/templates/uds/admin/tmpl/calendar_rule.html b/server/src/uds/templates/uds/admin/tmpl/calendar_rule.html index 53186797..eb2edeb5 100644 --- a/server/src/uds/templates/uds/admin/tmpl/calendar_rule.html +++ b/server/src/uds/templates/uds/admin/tmpl/calendar_rule.html @@ -24,10 +24,10 @@