~ubuntu-branches/ubuntu/vivid/horizon/vivid

« back to all changes in this revision

Viewing changes to horizon/static/horizon/js/horizon.tabs.js

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2015-03-30 11:12:29 UTC
  • mfrom: (0.14.1) (0.12.2) (76.1.7 vivid-proposed)
  • Revision ID: package-import@ubuntu.com-20150330111229-08du2zlqf9khi4k5
Tags: 1:2015.1~b3-0ubuntu1
* New upstream milestone release:
  - d/control: All version requirements with upstream, drop dependency
    on lockfile.
  - Refresh xstatic assets.
  - d/p/*: Refresh.
* d/pydist-overrides: Add overrides for oslo packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
    $(el).find(".js-tab-pane").addClass("tab-pane");
45
45
  });
46
46
 
47
 
  $(document).on("show.bs.tab", ".ajax-tabs a[data-loaded='false']", horizon.tabs.load_tab);
48
 
 
49
 
  $(document).on("shown.bs.tab", ".nav-tabs a[data-toggle='tab']", function (evt) {
 
47
 
 
48
  var $document = $(document);
 
49
 
 
50
  $document.on("show.bs.tab", ".ajax-tabs a[data-loaded='false']", horizon.tabs.load_tab);
 
51
 
 
52
  $document.on("shown.bs.tab", ".nav-tabs a[data-toggle='tab']", function (evt) {
50
53
    var $tab = $(evt.target),
51
54
      $content = $($(evt.target).attr('data-target'));
52
55
    $content.find("table.datatable").each(function () {
68
71
  });
69
72
 
70
73
  // Enable keyboard navigation between tabs in a form.
71
 
  $(document).on("keydown", ".tab-pane :input:visible:last", function (evt) {
 
74
  $(".tab-content").on("keydown", ".tab-pane :input:visible:last", function (evt) {
72
75
    var $this = $(this),
73
76
      next_pane = $this.closest(".tab-pane").next(".tab-pane");
74
77
    // Capture the forward-tab keypress if we have a next tab to go to.
77
80
      $(".nav-tabs a[data-target='#" + next_pane.attr("id") + "']").tab('show');
78
81
    }
79
82
  });
80
 
  $(document).on("keydown", ".tab-pane :input:visible:first", function (evt) {
 
83
  $(".tab-content").on("keydown", ".tab-pane :input:visible:first", function (evt) {
81
84
    var $this = $(this),
82
85
      prev_pane = $this.closest(".tab-pane").prev(".tab-pane");
83
86
    // Capture the forward-tab keypress if we have a next tab to go to.
88
91
    }
89
92
  });
90
93
 
91
 
  $(document).on("focus", ".tab-content :input", function () {
 
94
  $document.on("focus", ".tab-content :input", function () {
92
95
    var $this = $(this),
93
96
      tab_pane = $this.closest(".tab-pane"),
94
97
      tab_id = tab_pane.attr('id');