Jelajahi Sumber

[core] Small UX fixes

Fail silently on JT error
Changed jHueTour modal text
Enrico Berti 12 tahun lalu
induk
melakukan
2e1ef2d

+ 2 - 2
desktop/core/src/desktop/templates/common_footer.mako

@@ -188,13 +188,13 @@ from django.template.defaultfilters import escape, escapejs
         ${_('There is one or more tours available for this page. These tours were created to guide you around.')}
       </p>
       <p>
-        ${_('You can see the list of the tours by clicking on the checkered flag badge on the side of this page.')}
+        ${_('You can see the list of the tours by clicking on the checkered flag icon on top right of this page.')} <span class="badge badge-info"><i class="icon-flag-checkered"></i></span>
       </p>
         </div>
     </div>
     <div class="modal-footer">
       <label class="checkbox" style="float:left"><input id="jHueTourModalChk" type="checkbox" />${_('Do not show this dialog again')}</label>
-      <a href="#" class="btn btn-primary disable-feedback" data-dismiss="modal">${_('Got it, prof!')}</a>
+      <a id="jHueTourModalClose" href="#" class="btn btn-primary disable-feedback">${_('Got it, prof!')}</a>
     </div>
   </div>
 %endif

+ 3 - 1
desktop/core/src/desktop/templates/common_header.mako

@@ -154,7 +154,7 @@ from django.utils.translation import ugettext as _
 
       % if 'jobbrowser' in apps:
       var JB_CHECK_INTERVAL_IN_MILLIS = 30000;
-      window.setTimeout(checkJobBrowserStatus, JB_CHECK_INTERVAL_IN_MILLIS);
+      window.setTimeout(checkJobBrowserStatus, 10);
 
       function checkJobBrowserStatus(){
         $.getJSON("/${apps['jobbrowser'].display_name}/?format=json&state=running&user=${user.username}&rnd="+Math.random(), function(data){
@@ -167,6 +167,8 @@ from django.utils.translation import ugettext as _
             }
           }
           window.setTimeout(checkJobBrowserStatus, JB_CHECK_INTERVAL_IN_MILLIS);
+        }).fail(function () {
+          window.clearTimeout(checkJobBrowserStatus);
         });
       }
       % endif

+ 4 - 0
desktop/core/static/js/jquery.tour.js

@@ -186,6 +186,10 @@
           $("#jHueTourModalChk").on("change", function () {
             $.totalStorage("jHueTourHideModal", $(this).is(":checked"));
           });
+          $("#jHueTourModalClose").on("click", function () {
+            _questionMark.click();
+            $("#jHueTourModal").modal("hide");
+          });
         });
       }
       if (_this.options.showRemote){