[Pkg-nagios-changes] [SCM] UNNAMED PROJECT branch, debian/master, updated. 810edbdd3feedbfe37f4a65bee50b57b2f60fa2a
Naparuba
naparuba at gmail.com
Tue Feb 28 22:06:00 UTC 2012
The following commit has been merged in the debian/master branch:
commit 49b4e77b1c9396f83fb6bd8a5fac655c906e3cd5
Author: Naparuba <naparuba at gmail.com>
Date: Wed Nov 16 16:08:47 2011 +0100
Add : fadein effect when we arrive in the detail page. So the user will focus on what is important, and will make appears clicking elements with a mousemouve. should be ok for tablet, it should not apply on them.
diff --git a/shinken/webui/plugins/eltdetail/htdocs/css/hide.css b/shinken/webui/plugins/eltdetail/htdocs/css/hide.css
index 9cae278..17b2836 100644
--- a/shinken/webui/plugins/eltdetail/htdocs/css/hide.css
+++ b/shinken/webui/plugins/eltdetail/htdocs/css/hide.css
@@ -4,4 +4,16 @@
.hidden_impacts_services {opacity: 0; display:none;}
-.hidden_infos {opacity: 0; display:none;}
\ No newline at end of file
+.hidden_infos {opacity: 0; display:none;}
+
+
+
+
+
+ at media all {
+ .fadein { visibility:hidden; opacity: 0;}
+}
+
+ at media handheld {
+ .fadein { visibility:visible; }
+}
\ No newline at end of file
diff --git a/shinken/webui/plugins/eltdetail/htdocs/js/hide.js b/shinken/webui/plugins/eltdetail/htdocs/js/hide.js
index ff22c80..bf39507 100644
--- a/shinken/webui/plugins/eltdetail/htdocs/js/hide.js
+++ b/shinken/webui/plugins/eltdetail/htdocs/js/hide.js
@@ -115,3 +115,33 @@ function show_hidden_info() {
var button = $('hidden_info_button');
button.style.display = 'none';
}
+
+
+
+
+/* Make a lot of elements not show by default, and make them visible
+ when the user move the mouse */
+window.addEvent('domready', function(){
+ /* via @appden, Scott Kyle, http://appden.com/javascript/fun-with-custom-events-on-elements-in-mootools/ */
+ // We make the event show up only once, because when it pop up, we
+ // unregister it
+ Native.implement([Element, Window, Document, Events], {
+ oneEvent: function(type, fn) {
+ return this.addEvent(type, function() {
+ this.removeEvent(type, arguments.callee);
+ return fn.apply(this, arguments);
+ });
+ }
+ });
+
+ /* make it happen! */
+ var fades = $$('.fadein');
+
+ var doFadeIn = function(e) {
+ if(!e.key || e.key == 'tab') {
+ fades.fade('in');
+ }
+ };
+ $(document.body).oneEvent('mousemove',doFadeIn);
+
+});
\ No newline at end of file
diff --git a/shinken/webui/plugins/eltdetail/views/eltdetail.tpl b/shinken/webui/plugins/eltdetail/views/eltdetail.tpl
index bd611d4..a130789 100644
--- a/shinken/webui/plugins/eltdetail/views/eltdetail.tpl
+++ b/shinken/webui/plugins/eltdetail/views/eltdetail.tpl
@@ -29,7 +29,7 @@ Invalid element name
<script type="text/javascript">var elt_name = '{{elt.get_full_name()}}';</script>
-<div id="left_container" class="grid_3">
+<div id="left_container" class="grid_3 fadein">
<div id="dummy_box" class="box_gradient_horizontal">
</div>
<div id="nav_left">
@@ -206,7 +206,7 @@ Invalid element name
</tr>
<tr id="hidden_info_button" class="opacity_hover">
<th></th>
- <td>
+ <td class="fadein">
<div style="float:left;" id="hidden_info_button"><a href="javascript:show_hidden_info()"> {{!helper.get_button('More', img='/static/images/expand.png')}}</a>
</div>
<div class="clear"></div>
@@ -215,7 +215,7 @@ Invalid element name
</tbody>
<tbody class="switches">
- <tr class="odd">
+ <tr class="odd fadein">
<th scope="row" class="column1">Active/passive Checks</th>
%if elt_type=='host':
%title = 'This will also enable/disable this host services'
@@ -224,15 +224,15 @@ Invalid element name
%end
<td title="{{title}}" onclick="toggle_checks('{{elt.get_full_name()}}' , '{{elt.active_checks_enabled|elt.passive_checks_enabled}}')"> {{!helper.get_input_bool(elt.active_checks_enabled|elt.passive_checks_enabled)}}</td>
</tr>
- <tr>
+ <tr class="fadein">
<th scope="row" class="column1">Notifications</th>
<td onclick="toggle_notifications('{{elt.get_full_name()}}' , '{{elt.notifications_enabled}}')"> {{!helper.get_input_bool(elt.notifications_enabled)}}</td>
</tr>
- <tr>
+ <tr class="fadein">
<th scope="row" class="column1">Event Handler</th>
<td onclick="toggle_event_handlers('{{elt.get_full_name()}}' , '{{elt.event_handler_enabled}}')" > {{!helper.get_input_bool(elt.event_handler_enabled)}}</td>
</tr>
- <tr>
+ <tr class="fadein">
<th scope="row" class="column1">Flap Detection</th>
<td onclick="toggle_flap_detection('{{elt.get_full_name()}}' , '{{elt.flap_detection_enabled}}')" > {{!helper.get_input_bool(elt.flap_detection_enabled)}}</td>
</tr>
@@ -244,7 +244,7 @@ Invalid element name
<dl class="grid_10 box_shadow">
- <div id="box_commannd">
+ <div id="box_commannd" class="fadein">
<a href="#" onclick="try_to_fix('{{elt.get_full_name()}}')">{{!helper.get_button('Try to fix it!', img='/static/images/enabled.png')}}</a>
<a href="#" onclick="acknowledge('{{elt.get_full_name()}}')">{{!helper.get_button('Acknowledge it', img='/static/images/wrench.png')}}</a>
<a href="#" onclick="recheck_now('{{elt.get_full_name()}}')">{{!helper.get_button('Recheck now', img='/static/images/delay.gif')}}</a>
@@ -343,7 +343,7 @@ Invalid element name
document.write('/s'+'tyle>');
</script>
- <div class="domtab">
+ <div class="domtab fadein">
<ul class="domtabs">
<li class="box_gradient_vertical"><a href="#graph">Graphs</a></li>
<li class="box_gradient_vertical"><a href="#comment">Comments</a></li>
--
UNNAMED PROJECT
More information about the Pkg-nagios-changes
mailing list