Revision 70eab221 ui/static/synnefo.js
b/ui/static/synnefo.js | ||
---|---|---|
51 | 51 |
}); |
52 | 52 |
|
53 | 53 |
|
54 |
// jquery hide event
|
|
54 |
// jquery show/hide events
|
|
55 | 55 |
var _oldshow = $.fn.show; |
56 | 56 |
$.fn.show = function(speed, callback) { |
57 | 57 |
$(this).trigger('show'); |
58 | 58 |
return _oldshow.apply(this,arguments); |
59 | 59 |
} |
60 |
var _oldhide = $.fn.hide; |
|
61 |
$.fn.hide = function(speed, callback) { |
|
62 |
$(this).trigger('hide'); |
|
63 |
return _oldhide.apply(this,arguments); |
|
64 |
} |
|
60 | 65 |
|
61 | 66 |
function ISODateString(d){ |
62 | 67 |
//return a date in an ISO 8601 format using UTC. |
... | ... | |
1600 | 1605 |
// action indicators |
1601 | 1606 |
function init_action_indicator_handlers(machines_view) |
1602 | 1607 |
{ |
1608 |
// init once for each view |
|
1609 |
if (window.ACTION_ICON_HANDLERS == undefined) |
|
1610 |
{ |
|
1611 |
window.ACTION_ICON_HANDLERS = {}; |
|
1612 |
} |
|
1613 |
|
|
1614 |
if (machines_view in window.ACTION_ICON_HANDLERS) |
|
1615 |
{ |
|
1616 |
return; |
|
1617 |
} |
|
1618 |
window.ACTION_ICON_HANDLERS[machines_view] = 1; |
|
1619 |
|
|
1603 | 1620 |
if (machines_view == "list") |
1604 | 1621 |
{ |
1605 | 1622 |
// totally different logic for list view |
... | ... | |
1675 | 1692 |
// action indicators |
1676 | 1693 |
$(".action-container").live('mouseover', function(evn) { |
1677 | 1694 |
force_action = {'el': $(evn.currentTarget).parent().parent()[0], 'action':$(evn.currentTarget).attr("class").replace("action-container","")}; |
1678 |
// single view |
|
1695 |
// single view case
|
|
1679 | 1696 |
if ($(force_action.el).attr("class") == "upper") |
1680 | 1697 |
{ |
1681 | 1698 |
force_action.el = $(evn.currentTarget).parent().parent().parent()[0] |
... | ... | |
1683 | 1700 |
update_action_icon_indicators(force_action); |
1684 | 1701 |
}); |
1685 | 1702 |
|
1703 |
$("img.spinner, img.wave").live('hide', function(){ |
|
1704 |
update_action_icon_indicators(); |
|
1705 |
}); |
|
1686 | 1706 |
// register events where icons should get updated |
1687 | 1707 |
|
1688 | 1708 |
// hide action indicator image on mouse out, spinner appear, wave appear |
Also available in: Unified diff