manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kish...@apache.org
Subject svn commit: r1793422 - /manifoldcf/branches/CONNECTORS-1403/connectors/webcrawler/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/webcrawler/editConfiguration_Access.html.vm
Date Mon, 01 May 2017 23:13:13 GMT
Author: kishore
Date: Mon May  1 23:13:13 2017
New Revision: 1793422

URL: http://svn.apache.org/viewvc?rev=1793422&view=rev
Log:
Save Access credentials session collapseible state on post back

Modified:
    manifoldcf/branches/CONNECTORS-1403/connectors/webcrawler/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/webcrawler/editConfiguration_Access.html.vm

Modified: manifoldcf/branches/CONNECTORS-1403/connectors/webcrawler/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/webcrawler/editConfiguration_Access.html.vm
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1403/connectors/webcrawler/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/webcrawler/editConfiguration_Access.html.vm?rev=1793422&r1=1793421&r2=1793422&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1403/connectors/webcrawler/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/webcrawler/editConfiguration_Access.html.vm
(original)
+++ manifoldcf/branches/CONNECTORS-1403/connectors/webcrawler/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/webcrawler/editConfiguration_Access.html.vm
Mon May  1 23:13:13 2017
@@ -19,10 +19,30 @@
 <script type="text/javascript">
   $(function(){
       $('#accordion-session-access .btn-danger').hover(function(){
-          $(this).closest('.panel').removeClass('panel-default').addClass('panel-danger');
+        $(this).closest('.panel').removeClass('panel-default').addClass('panel-danger');
       },function(){
-          $(this).closest('.panel').removeClass('panel-danger').addClass('panel-default');
+        $(this).closest('.panel').removeClass('panel-danger').addClass('panel-default');
       });
+
+      $('.collapse').on('shown.bs.collapse', function () {
+        var collapseId = $(this).attr("id");
+        if(window.sessionStorage){
+          sessionStorage.setItem("webcrawler_session_collapse",collapseId)
+        }
+      })
+
+      //if post-back, open the same collapse
+      if(window.sessionStorage){
+        if(sessionStorage.getItem("mcf_webcrawler_session_collapse")){
+          var collapseId = sessionStorage.getItem("webcrawler_session_collapse");
+          if(collapseId) {
+              //Remove the previous selected Pane.
+            $("#accordion-session-access .in").removeClass("in");
+
+            $('#' + collapseId).collapse("show");
+          }
+        }
+      }
   });
 </script>
 <style type="text/css">



Mime
View raw message