Merge remote-tracking branch 'origin/v2.0'

This commit is contained in:
Adolfo Gómez García 2016-07-11 22:06:23 +02:00
commit cd859ca0cb
3 changed files with 52 additions and 14 deletions

View File

@ -98,7 +98,7 @@ class ServicesPoolGroups(ModelHandler):
'priority': item.priority,
'name': item.name,
'comments': item.comments,
'image_id': item.image.uuid,
'image_id': item.image.uuid if item.image is not None else None,
}
def item_as_dict_overview(self, item):
@ -107,5 +107,5 @@ class ServicesPoolGroups(ModelHandler):
'priority': item.priority,
'name': item.name,
'comments': item.comments,
'thumb': item.image.thumb64,
'thumb': item.thumb64,
}

View File

@ -242,6 +242,16 @@ gui.servicesPools.link = (event) ->
# Cached items table
prevCacheLogTbl = null
clearCacheLog = (doHide) ->
if prevCacheLogTbl
$tbl = $(prevCacheLogTbl).dataTable()
$tbl.fnClearTable()
$tbl.fnDestroy()
prevCacheLogTbl = null
if doHide
$('#cache-placeholder_log').empty()
cachedItemsTable = cachedItems.table(
icon: 'cached'
container: "cache-placeholder_tbl"
@ -256,12 +266,16 @@ gui.servicesPools.link = (event) ->
fillState data
return
onRefresh: () ->
clearCacheLog(true)
return
onRowDeselect: (deselected, dtable) ->
clearCacheLog(true)
onRowSelect: (selected) ->
cached = selected[0]
if prevCacheLogTbl
$tbl = $(prevCacheLogTbl).dataTable()
$tbl.fnClearTable()
$tbl.fnDestroy()
clearCacheLog(false)
prevCacheLogTbl = cachedItems.logTable(cached.id,
container: "cache-placeholder_log"
)
@ -289,7 +303,6 @@ gui.servicesPools.link = (event) ->
icon: 'groups'
container: "groups-placeholder"
rowSelect: "multi"
doNotLoadData: true
buttons: [
"new"
"delete"
@ -361,6 +374,16 @@ gui.servicesPools.link = (event) ->
# * Assigned services part
#
prevAssignedLogTbl = null
clearAssignedLog = (doHide) ->
if prevAssignedLogTbl
$tbl = $(prevAssignedLogTbl).dataTable()
$tbl.fnClearTable()
$tbl.fnDestroy()
prevAssignedLogTbl = null
if doHide
$("#assigned-services-placeholder_log").empty()
assignedServices = new GuiElement(api.servicesPools.detail(servPool.id, "services", { permission: servPool.permission }), "services")
assignedServicesTable = assignedServices.table(
doNotLoadData: true
@ -387,17 +410,22 @@ gui.servicesPools.link = (event) ->
return
onRefresh: () ->
clearAssignedLog(true)
return
onRowDeselect: (deselected, dtable) ->
clearAssignedLog(true)
onRowSelect: (selected) ->
svr = selected[0]
if prevAssignedLogTbl
$tbl = $(prevAssignedLogTbl).dataTable()
$tbl.fnClearTable()
$tbl.fnDestroy()
clearAssignedLog(false)
prevAssignedLogTbl = assignedServices.logTable(svr.id,
container: "assigned-services-placeholder_log"
)
return
onDelete: gui.methods.del(assignedServices, gettext("Remove Assigned service"), gettext("Deletion error"))
)

View File

@ -13,7 +13,7 @@ body {
height: auto !important;
height: 100%;
margin: 0 auto -40px; /* Change height. Can use px, ems or % */
@media (min-width: 768px) {
margin: 0 auto -24px; /* Change height. Can use px, ems or % */
}
@ -22,7 +22,7 @@ body {
.st-sticky-push,
footer {
height: 40px; /* Change height. Can use px, ems or % */
@media (min-width: 768px) {
height: 40px; /* Change height. Can use px, ems or % */
}
@ -185,8 +185,18 @@ footer {
background: #0055dd;
}
# For Image rendering on Chrome
img {
image-rendering: optimizeSpeed; /* */
image-rendering: -moz-crisp-edges; /* Firefox */
image-rendering: -o-crisp-edges; /* Opera */
image-rendering: -webkit-optimize-contrast; /* Chrome (and Safari) */
image-rendering: optimize-contrast; /* CSS3 Proposed */
-ms-interpolation-mode: nearest-neighbor; /* IE8+ */
}
@media (max-width: 768px) {
#cookie-bar {
height: 60px;
}
}
}