From: samhenri <samuel.guimaraes(a)eldorado.org.br>
Signed-off-by: samhenri <samuel.guimaraes(a)eldorado.org.br>
---
ui/js/src/kimchi.network.js | 7 +++++--
ui/pages/tabs/network.html.tmpl | 14 +++++++++++---
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/ui/js/src/kimchi.network.js b/ui/js/src/kimchi.network.js
index dc5773c..923aeb9 100644
--- a/ui/js/src/kimchi.network.js
+++ b/ui/js/src/kimchi.network.js
@@ -28,6 +28,7 @@ kimchi.initNetwork = function() {
};
kimchi.initNetworkListView = function() {
+ $('.wok-mask').removeClass('hidden');
kimchi.listNetworks(function(data) {
for (var i = 0; i < data.length; i++) {
var network = {
@@ -46,6 +47,8 @@ kimchi.initNetworkListView = function() {
kimchi.addNetworkItem(network);
}
$('#networkGrid').dataGrid({enableSorting: false});
+ $('#networkGrid').removeClass('hidden');
+ $('.wok-mask').fadeOut(300, function() {});
$('input', $('.grid-control',
'#network-content-container')).on('keyup', function(){
$('#networkGrid').dataGrid('filter', $(this).val());
});
@@ -151,7 +154,7 @@ kimchi.addNetworkActions = function(network) {
};
wok.confirm(settings, function() {
kimchi.stopNetwork(network, menu);
- $('#networkGrid').dataGrid('deleteRow',
$(evt.currentTarget).parents(".row"));
+ $('#networkGrid').dataGrid('deleteRow',
$(evt.currentTarget).parents(".wok-datagrid-row"));
}, null);
}
else {
@@ -169,7 +172,7 @@ kimchi.addNetworkActions = function(network) {
cancel : i18n['KCHAPI6003M']
}, function() {
kimchi.deleteNetwork(network.name, function() {
- $('#networkGrid').dataGrid('deleteRow',
$(evt.currentTarget).parents(".row"));
+ $('#networkGrid').dataGrid('deleteRow',
$(evt.currentTarget).parents(".wok-datagrid-row"));
});
}, null);
}
diff --git a/ui/pages/tabs/network.html.tmpl b/ui/pages/tabs/network.html.tmpl
index c6654de..74041fe 100644
--- a/ui/pages/tabs/network.html.tmpl
+++ b/ui/pages/tabs/network.html.tmpl
@@ -34,7 +34,7 @@
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle
collapsed" data-toggle="collapse" data-target="#toolbar"
aria-expanded="false">
- <span class="sr-only">Toggle navigation</span>
+ <span class="sr-only">$_("Toggle
navigation")</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
@@ -43,7 +43,7 @@
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse"
id="toolbar">
<ul class="nav navbar-nav navbar-right tools"
display="none">
- <li><a id="networkAdd" class="btn-tool"
href="javascript:void(0);"><i class="fa
fa-plus-circle"></i><span>Add a
Network</span></a></li>
+ <li><a id="networkAdd" class="btn-tool"
href="javascript:void(0);"><i class="fa
fa-plus-circle"></i><span>$_("Add a
Network")</span></a></li>
</ul>
</div>
</div>
@@ -57,7 +57,7 @@
</div>
</div>
<div id="alert-container"></div>
- <div id="networkGrid">
+ <div id="networkGrid" class="hidden">
<div>
<span class="column-state"><span
class="sr-only">$_("State")</span></span><!--
--><span class="column-name">$_("Network
Name")</span><!--
@@ -73,6 +73,14 @@
</div>
</div>
+ <div class="wok-mask">
+ <div class="wok-mask-loader-container">
+ <div class="wok-mask-loading">
+ <div class="wok-mask-loading-icon"></div>
+ <div
class="wok-mask-loading-text">$_("Loading...")</div>
+ </div>
+ </div>
+ </div>
</div>
<div id="modalWindow" class="modal fade network-modal"
tabindex="-1" role="dialog"
aria-labelledby="networkModalLabel" aria-hidden="true">
</div>
<script id="networkItem" type="text/html">
--
1.9.3