Browse Source

[shell] Mute non available shells

Romain Rigaux 12 năm trước cách đây
mục cha
commit
6909f61684

+ 6 - 1
apps/shell/src/shell/templates/index.mako

@@ -28,7 +28,7 @@ ${ commonheader(_('Hue Shell'), "shell", user, "100px") | n,unicode }
                 % if shell["exists"]:
                 % if shell["exists"]:
                     <li><a href="${url('shell.views.create')}?keyName=${shell["keyName"]}" class="${shell["keyName"]}">${shell["niceName"]}</a></li>
                     <li><a href="${url('shell.views.create')}?keyName=${shell["keyName"]}" class="${shell["keyName"]}">${shell["niceName"]}</a></li>
                 % else:
                 % else:
-                    <li><a href="#" class="disabled">${shell["niceName"]}</a></li>
+                    <li class="disabled"><a>${shell["niceName"]}</a></li>
                 % endif
                 % endif
             % endfor
             % endfor
         </ul>
         </ul>
@@ -93,6 +93,11 @@ ${ commonheader(_('Hue Shell'), "shell", user, "100px") | n,unicode }
 
 
 <script type="text/javascript" charset="utf-8">
 <script type="text/javascript" charset="utf-8">
     $(document).ready(function(){
     $(document).ready(function(){
+        $(".disabled").tooltip({
+          title: '${_("The shell is not present on the Hue host.")}',
+          placement: 'bottom'
+        });
+
         var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
         var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
         for (var i=0;i<hashes.length;i++){
         for (var i=0;i<hashes.length;i++){
             if (hashes[i].indexOf("keyName")>-1){
             if (hashes[i].indexOf("keyName")>-1){