Jelajahi Sumber

HUE-6240 [core] Replace jHueTour with Bootstrap tour

Enrico Berti 8 tahun lalu
induk
melakukan
0137d7c
25 mengubah file dengan 55 tambahan dan 1525 penghapusan
  1. 0 13
      apps/about/src/about/templates/admin_wizard.mako
  2. 6 6
      apps/about/src/about/tests.py
  3. 0 5
      apps/about/src/about/views.py
  4. 0 0
      desktop/core/src/desktop/static/desktop/css/hue.css
  5. 0 0
      desktop/core/src/desktop/static/desktop/css/hue3-extra.css
  6. 0 9
      desktop/core/src/desktop/static/desktop/css/hue3.css
  7. 22 0
      desktop/core/src/desktop/static/desktop/ext/css/bootstrap-tour.min.css
  8. 21 0
      desktop/core/src/desktop/static/desktop/ext/js/bootstrap-tour.min.js
  9. 0 532
      desktop/core/src/desktop/static/desktop/js/jquery.tour.js
  10. 0 85
      desktop/core/src/desktop/static/desktop/less/components/hue-tour.less
  11. 0 1
      desktop/core/src/desktop/static/desktop/less/hue-cross-version.less
  12. 0 4
      desktop/core/src/desktop/templates/common_footer.mako
  13. 2 6
      desktop/core/src/desktop/templates/common_header.mako
  14. 0 24
      desktop/core/src/desktop/templates/common_header_footer_components.mako
  15. 2 9
      desktop/core/src/desktop/templates/common_header_m.mako
  16. 0 76
      desktop/core/src/desktop/templates/common_home.mako
  17. 0 114
      desktop/core/src/desktop/templates/home.mako
  18. 0 1
      desktop/core/src/desktop/templates/home2.mako
  19. 2 1
      desktop/core/src/desktop/templates/hue.mako
  20. 0 124
      desktop/core/src/desktop/templates/tours.mako
  21. 0 6
      desktop/core/src/desktop/views.py
  22. 0 5
      desktop/libs/liboauth/src/liboauth/templates/oauth-login.mako
  23. 0 5
      desktop/libs/libopenid/src/libopenid/templates/openid-login.html
  24. 0 24
      tools/followme/jHueTourBuilder.html
  25. 0 475
      tools/followme/jHueTourBuilder.js

+ 0 - 13
apps/about/src/about/templates/admin_wizard.mako

@@ -154,19 +154,6 @@ ${ layout.menubar(section='quick_start') }
               </div>
             </div>
 
-            <div class="card card-home card-tab card-tab-bordertop card-listcontent margin-top-30">
-              <h2 class="card-heading simple">${ _('Tours and tutorials') }</h2>
-
-              <div class="card-body" style="margin-top: 10px">
-                <label class="checkbox">
-                  <input class="updatePreferences" type="checkbox" name="tours_and_tutorials"
-                         style="margin-right: 10px"
-                         title="${ _('Check to enable the tours and tutorials') }" ${ tours_and_tutorials and 'checked' or '' }/>
-                  ${ _('Display the "Available Tours" question mark when tours are available for a specific page.') }
-                </label>
-              </div>
-            </div>
-
             <div class="card card-home card-tab card-tab-bordertop card-listcontent margin-top-30">
               <h2 class="card-heading simple">${ _('Anonymous usage analytics') }</h2>
 

+ 6 - 6
apps/about/src/about/tests.py

@@ -55,19 +55,19 @@ class TestAboutWithNoCluster(TestAboutBase):
     self.client_admin.get(reverse('about:index'), HTTP_ACCEPT_LANGUAGE='fr-fr')
 
   def test_collect_usage(self):
-    tours_and_tutorials = Settings.get_settings().tours_and_tutorials
+    collect_usage = Settings.get_settings().collect_usage
 
     try:
-      response = self.client.post(reverse('about:update_preferences'), {'tours_and_tutorials': False})
+      response = self.client.post(reverse('about:update_preferences'), {'collect_usage': False})
       data = json.loads(response.content)
       assert_equal(data['status'], 0)
-      assert_false(data['tours_and_tutorials'] == True) # Weird but works
+      assert_false(data['collect_usage'] == True) # Weird but works
 
-      response = self.client.post(reverse('about:update_preferences'), {'tours_and_tutorials': True})
+      response = self.client.post(reverse('about:update_preferences'), {'collect_usage': True})
       data = json.loads(response.content)
       assert_equal(data['status'], 0)
-      assert_true(data['tours_and_tutorials'])
+      assert_true(data['collect_usage'])
     finally:
       settings = Settings.get_settings()
-      settings.tours_and_tutorials = tours_and_tutorials
+      settings.collect_usage = collect_usage
       settings.save()

+ 0 - 5
apps/about/src/about/views.py

@@ -36,13 +36,10 @@ def admin_wizard(request):
     apps = []
   app_names = [app.name for app in sorted(apps, key=lambda app: app.menu_index)]
 
-  tours_and_tutorials = Settings.get_settings().tours_and_tutorials
-
   return render('admin_wizard.mako', request, {
       'version': hue_version(),
       'apps': dict([(app.name, app) for app in apps]),
       'app_names': app_names,
-      'tours_and_tutorials': tours_and_tutorials,
       'is_embeddable': request.GET.get('is_embeddable', False),
       'collect_usage': collect_usage(),
   })
@@ -54,11 +51,9 @@ def update_preferences(request):
   if request.method == 'POST':
     try:
       settings = Settings.get_settings()
-      settings.tours_and_tutorials = request.POST.get('tours_and_tutorials', False)
       settings.collect_usage = request.POST.get('collect_usage', False)
       settings.save()
       response['status'] = 0
-      response['tours_and_tutorials'] = settings.tours_and_tutorials
       response['collect_usage'] = settings.collect_usage
     except Exception, e:
       response['data'] = str(e)

File diff ditekan karena terlalu besar
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue.css


File diff ditekan karena terlalu besar
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue3-extra.css


+ 0 - 9
desktop/core/src/desktop/static/desktop/css/hue3.css

@@ -322,11 +322,6 @@ a#advanced-btn:hover {
     line-height: 28px;
 }
 
-#jHueTourVideoPlayer {
-  margin-left: -320px!important;
-  width: 640px;
-}
-
 .navigator {
   position: fixed;
   top: 0;
@@ -452,10 +447,6 @@ a, a:hover, a:active, a:focus {
   outline: 0;
 }
 
-#jHueTourVideoPlayer .modal-body {
-  max-height: 460px;
-}
-
 .hueOverlay {
   top: 28px;
   left: 0;

+ 22 - 0
desktop/core/src/desktop/static/desktop/ext/css/bootstrap-tour.min.css

@@ -0,0 +1,22 @@
+/* ========================================================================
+ * bootstrap-tour - v0.10.3
+ * http://bootstraptour.com
+ * ========================================================================
+ * Copyright 2012-2015 Ulrich Sossou
+ *
+ * ========================================================================
+ * Licensed under the MIT License (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://opensource.org/licenses/MIT
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================================
+ */
+
+.tour-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1100;background-color:#000;opacity:.8;filter:alpha(opacity=80)}.tour-step-backdrop{position:relative;z-index:1101}.tour-step-backdrop>td{position:relative;z-index:1101}.tour-step-background{position:absolute!important;z-index:1100;background:inherit;border-radius:6px}.popover[class*=tour-]{z-index:1102}.popover[class*=tour-] .popover-navigation{padding:9px 14px;overflow:hidden}.popover[class*=tour-] .popover-navigation [data-role=end]{float:right}.popover[class*=tour-] .popover-navigation [data-role=prev],.popover[class*=tour-] .popover-navigation [data-role=next],.popover[class*=tour-] .popover-navigation [data-role=end]{cursor:pointer}.popover[class*=tour-] .popover-navigation [data-role=prev].disabled,.popover[class*=tour-] .popover-navigation [data-role=next].disabled,.popover[class*=tour-] .popover-navigation [data-role=end].disabled{cursor:default}.popover[class*=tour-].orphan{position:fixed;margin-top:0}.popover[class*=tour-].orphan .arrow{display:none}

File diff ditekan karena terlalu besar
+ 21 - 0
desktop/core/src/desktop/static/desktop/ext/js/bootstrap-tour.min.js


+ 0 - 532
desktop/core/src/desktop/static/desktop/js/jquery.tour.js

@@ -1,532 +0,0 @@
-// Licensed to Cloudera, Inc. under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  Cloudera, Inc. licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-/*
- * jHue tour plugin
- * Optionally depends on $.totalstorage for progress checking and $.jHueNotify for error notification
- * Can be instantiated with
- $.jHueTour({
-        tours: [  <-- array, the tours available for this page
-          {
-            name: "xxxx", <-- unique tour name  (location.pathname scope)
-            desc: "Desc yyyy", <-- the label shown on the question mark
-            path: "beeswax/*", <-- string for the path to show this tour on
-            steps: [ <-- array, steps of the tour
-              {
-                arrowOn: "a[href='/beeswax']", <-- the element relative to the popover is positioned
-                expose: ".navbar-fixed-top", <-- optional, the exposed object. if not present, arrowOn will be exposed
-                title: "Welcome to Beeswax!", <-- popover title
-                content: "This is a tour of the Beeswax app. <br/><b>HTML</b> is supported <em>too!</em>", <-- popover content, html enable
-                placement: "bottom", <-- popover placement
-                left: "100px", <-- popover absolute position (css string)
-                top: -20 <-- popover relative position (it adds that amount of pixels to the popover calculated position)
-                visitUrl: "blabla?tour=hello" <-- overrides everything, redirects to specific url
-              },
-              {
-                arrowOn: ".subnav-fixed",
-                title: "Beeswax sections",
-                content: "There are several sections in the Beeswax app",
-                placement: "bottom",
-                left: "100px"
-              }, ...
-            ],
-            video: "http://player.vimeo.com/xxxxx", <-- instead of the steps you can specify a video and it will be displayed in a modal
-            blog: "http://gethue.com/yyyyy" <-- if specified, a link to this with a "Read more about it..." label will be placed under the video in the modal. if video is empty, the link will be automagically opened
-          }, ...
-        ]
-      });
-
-  Calling $.jHueTour({tours: [...]}) more than once will merge the tour data, so you can keep adding tours dynamically to the same page
-
-  You can interact with:
-  - $.jHueTour("start") / $.jHueTour("show") / $.jHueTour("play") : starts the first available tour
-  - $.jHueTour("stop") / $.jHueTour("close") / $.jHueTour("hide") / $.jHueTour("stop") : starts the first available tour
-  - $.jHueTour("reset") : removes stored tours and history
-  - $.jHueTour("clear") : removes current tours
-  - $.jHueTour("http://remote/hue/tour.hue") : loads a remote tour
-  - $.jHueTour("tourName", 1) : loads tour name and start at step 1
-  - $.jHueTour() : returns the available tours
- */
-
-(function ($, window, document, undefined) {
-  var pluginName = "jHueTour",
-    defaults = {
-      labels: {
-        AVAILABLE_TOURS: "Available tours",
-        NO_AVAILABLE_TOURS: "None for this page",
-        MORE_INFO: "Read more about it...",
-        TOOLTIP_TITLE: "Demo tutorials"
-      },
-      tours: [],
-      showRemote: false,
-      hideIfNoneAvailable: true
-    };
-
-  function Plugin(element, options) {
-    this.element = element;
-    if (typeof jHueTourGlobals !== undefined) {
-      var extendedDefaults = $.extend({}, defaults, jHueTourGlobals);
-      extendedDefaults.labels = $.extend({}, defaults.labels, jHueTourGlobals.labels);
-      this.options = $.extend({}, extendedDefaults, options);
-      this.options = $.extend({}, defaults, this.options);
-    }
-    else {
-      this.options = $.extend({}, defaults, options);
-    }
-    this._defaults = defaults;
-    this._name = pluginName;
-    this.currentTour = {
-      name: "",
-      path: "",
-      desc: "",
-      remote: false,
-      steps: [],
-      shownStep: 0,
-      video: "",
-      blog: ""
-    };
-    this.init();
-  }
-
-  Plugin.prototype.init = function () {
-    var _this = this;
-    _this.initQuestionMark();
-    var _tourMask = $("<div>").attr("id", "jHueTourMask");
-    _tourMask.width($(document).width()).height($(document).height())
-    _tourMask.click(function () {
-      _this.closeCurtains();
-    });
-    _tourMask.appendTo($("body"));
-
-    $(document).on("keyup", function (e) {
-      var _code = (e.keyCode ? e.keyCode : e.which);
-      if ($("#jHueTourMask").is(":visible") && _code == 27) {
-        _this.performOperation("close");
-      }
-    });
-  };
-
-  Plugin.prototype.initQuestionMark = function () {
-    var _this = this;
-    $("#jHueTourFlag").remove();
-    var _questionMark = $("<a>").attr("id", "jHueTourFlag").addClass("pointer").html('<i class="fa fa-flag-checkered" style=""></i>');
-    _questionMark.tooltip({
-      placement: "bottom",
-      title: _this.options.labels.TOOLTIP_TITLE
-    });
-    if ($.totalStorage("jHueTourExtras") != null) {
-      var _newTours = [];
-      $.each(_this.options.tours, function (cnt, tour) {
-        if (tour.remote == undefined || !tour.remote) {
-          _newTours.push(tour);
-        }
-      });
-      _this.options.tours = _newTours.concat($.totalStorage("jHueTourExtras"));
-    }
-
-    var _toursHtml = '<ul class="nav nav-pills nav-stacked" style="margin-bottom: 0">'
-      var _added = 0;
-      $.each(_this.options.tours, function (ctn, tour) {
-        if (tour.path === undefined || RegExp(tour.path).test(location.pathname)) {
-          var _tourDone = '';
-          var _removeTour = '';
-          var _extraIcon = '<i class="fa fa-flag"></i> ';
-          if ($.totalStorage !== undefined) {
-            var _key = location.pathname;
-            if (tour.path !== undefined && tour.path != "") {
-              _key = tour.path;
-            }
-            _key += "_" + tour.name;
-            if ($.totalStorage("jHueTourHistory") != null && $.totalStorage("jHueTourHistory")[_key] == true) {
-              _tourDone = '<div style="color:green;float:right;margin:4px"><i class="fa fa-check-circle"></i></div>';
-            }
-          }
-          if (tour.remote) {
-            _removeTour = '<div style="color:red;float:right;margin:4px;cursor: pointer" onclick="javascript:$.jHueTour(\'remove_' + tour.name + '\')"><i class="fa fa-times-circle"></i></div>';
-          }
-
-          var _link = '<a href="javascript:$.jHueTour(\'' + tour.name + '\', 1)" style="padding:2px">';
-
-          if (typeof tour.video != "undefined" && tour.video != null && tour.video != ""){
-            _extraIcon = '<i class="fa fa-youtube-play"></i> ';
-          }
-          else if (typeof tour.blog != "undefined" && tour.blog != null && tour.blog != ""){
-            _extraIcon = '<i class="fa fa-external-link"></i> ';
-            _link = '<a href="' + tour.blog + '" target="_blank" style="padding:2px">';
-          }
-          _toursHtml += '<li>' + _removeTour + _tourDone + _link + _extraIcon + tour.desc + '</a></li>';
-          _added++;
-        }
-      });
-
-      if (_added == 0) {
-        if (_this.options.hideIfNoneAvailable){
-          _questionMark.css("display", "none");
-        }
-        else {
-          _toursHtml += '<li>' + _this.options.labels.NO_AVAILABLE_TOURS + '</li>';
-        }
-      }
-
-      if (_this.options.showRemote){
-        _toursHtml += '<li>' +
-          ' <div class="input-append" style="margin-top: 10px">' +
-          '  <input id="jHueTourRemoteTutorial" style="width:70%" type="text" placeholder="URL">' +
-          '  <button id="jHueTourRemoteTutorialBtn" class="btn" type="button" onclick="javascript:$.jHueTour($(\'#jHueTourRemoteTutorial\').val())">' +
-          '  <i class="fa fa-cloud-download"></i></button>' +
-          ' </div>' +
-          '</li>';
-      }
-    _toursHtml += '</ul>';
-
-    _questionMark.click(function () {
-
-      var _closeBtn = $("<a>");
-      _closeBtn.html('<i class="fa fa-times"></i>').css("cursor", "pointer").css("padding", "5px").css("padding-left", "17px").css("padding-right", "7px").css("float", "right").css("margin-top", "-4px").css("margin-right", "-6px");
-      _closeBtn.click(function () {
-        $(".popover").remove();
-        $(document).off("keyup");
-        $(document).off("click");
-      });
-
-      _questionMark.popover("destroy").popover({
-        title: _this.options.labels.AVAILABLE_TOURS,
-        content: _toursHtml,
-        html: true,
-        trigger: "click",
-        placement: "bottomRight"
-      }).popover("show");
-      if ($(".popover").position().top <= 0) {
-        $(".popover").css("top", "10px");
-      }
-
-      _closeBtn.prependTo($(".popover-title"));
-
-      $(document).on("keyup", function (e) {
-        if (e.keyCode == 27) {
-          _closeBtn.click();
-        }
-      });
-      $(document).on("click", function (e) {
-        if ($(e.target).parents('.popover').length == 0 && !($(e.target).hasClass("fa-flag-checkered"))) {
-          _closeBtn.click();
-        }
-      });
-    });
-    _questionMark.appendTo($("#jHueTourFlagPlaceholder"));
-  };
-
-  Plugin.prototype.addTours = function (options) {
-    var _this = this;
-    var _addableTours = [];
-    if (options.tours != null) {
-      $.each(options.tours, function (cnt, tour) {
-        var _add = true;
-        if (_this.options.tours != null) {
-          $.each(_this.options.tours, function (icnt, itour) {
-            if (itour.name == tour.name) {
-              _add = false;
-            }
-          });
-        }
-        if (_add) {
-          _addableTours.push(tour);
-        }
-      });
-    }
-    _this.options.tours = _this.options.tours.concat(_addableTours);
-  };
-
-  Plugin.prototype.availableTours = function () {
-    return this.options.tours;
-  };
-
-  Plugin.prototype.performOperation = function (operation) {
-    var _this = this;
-    var _op = operation.toLowerCase();
-    if (_op.indexOf("http:") == 0 || _op.indexOf("https:") == 0) {
-      $("#jHueTourRemoteTutorial").attr("disabled", "disabled");
-      $("#jHueTourRemoteTutorialBtn").attr("disabled", "disabled");
-      $.ajax({
-        type: "GET",
-        url: operation + "?callback=?",
-        async: false,
-        jsonpCallback: "jHueRemoteTour",
-        contentType: "application/json",
-        dataType: "jsonp",
-        success: function (json) {
-          if ($.totalStorage !== undefined) {
-            if ($.totalStorage("jHueTourExtras") == null) {
-              $.totalStorage("jHueTourExtras", []);
-            }
-            var _newStoredArray = [];
-            if (json.tours != null) {
-              _newStoredArray = json.tours;
-              $.each($.totalStorage("jHueTourExtras"), function (cnt, tour) {
-                var _found = false;
-                $.each(json.tours, function (icnt, itour) {
-                  if (itour.name == tour.name) {
-                    _found = true;
-                  }
-                });
-                if (!_found) {
-                  _newStoredArray.push(tour);
-                }
-              });
-            }
-            $.totalStorage("jHueTourExtras", _newStoredArray);
-          }
-          $("#jHueTourFlag").popover("destroy");
-          _this.initQuestionMark();
-          $("#jHueTourFlag").click();
-        },
-        error: function (e) {
-          $(document).trigger("error", e.message);
-          $("#jHueTourRemoteTutorial").removeAttr("disabled");
-          $("#jHueTourRemoteTutorialBtn").removeAttr("disabled");
-        }
-      });
-    }
-
-    if (_op.indexOf("remove_") == 0) {
-      var _tourName = _op.substr(7);
-      if ($.totalStorage !== undefined) {
-        var _newStoredArray = [];
-        $.each($.totalStorage("jHueTourExtras"), function (cnt, tour) {
-          if (tour.name != _tourName) {
-            _newStoredArray.push(tour);
-          }
-        });
-        $.totalStorage("jHueTourExtras", _newStoredArray);
-        $("#jHueTourFlag").popover("destroy");
-        _this.initQuestionMark();
-        $("#jHueTourFlag").click();
-      }
-    }
-
-    if (_op == "start" || _op == "show" || _op == "play") {
-      if (_this.options.tours.length > 0 && _this.currentTour.name == "") {
-        _this.currentTour.name = _this.options.tours[0].name;
-        _this.currentTour.path = _this.options.tours[0].path;
-        _this.currentTour.steps = _this.options.tours[0].steps;
-        _this.currentTour.desc = _this.options.tours[0].desc;
-        _this.currentTour.video = _this.options.tours[0].video;
-        _this.currentTour.blog = _this.options.tours[0].blog;
-      }
-      this.showStep(1);
-    }
-
-    if (_op == "reset") {
-      if ($.totalStorage !== undefined) {
-        $.totalStorage("jHueTourHistory", null);
-        $.totalStorage("jHueTourExtras", null);
-      }
-    }
-
-    if (_op == "clear") {
-      _this.options.tours = [];
-    }
-
-    if (_op == "end" || _op == "hide" || _op == "close" || _op == "stop") {
-      _this.closeCurtains();
-    }
-  };
-
-  Plugin.prototype.closeCurtains = function () {
-    $(".popover").remove();
-    $(".jHueTourExposed").removeClass("jHueTourExposed");
-    $("#jHueTourMask").hide();
-  };
-
-  Plugin.prototype.showTour = function (tourName, stepNo) {
-    var _this = this;
-    if (_this.options.tours != null) {
-      $.each(_this.options.tours, function (cnt, tour) {
-        if (tour.name == tourName && (tour.path === undefined || RegExp(tour.path).test(location.pathname))) {
-          _this.currentTour.name = tour.name;
-          _this.currentTour.path = tour.path;
-          _this.currentTour.steps = tour.steps;
-          _this.currentTour.desc = tour.desc;
-          _this.currentTour.video = tour.video;
-          _this.currentTour.blog = tour.blog;
-          if (stepNo === undefined) {
-            _this.showStep(1);
-          }
-          else {
-            _this.showStep(stepNo);
-          }
-          return;
-        }
-      });
-    }
-  };
-
-  Plugin.prototype.showStep = function (stepNo) {
-    var _this = this;
-    if (typeof _this.currentTour.video != "undefined" && _this.currentTour.video != null && _this.currentTour.video != "") {
-      if ($("#jHueTourVideoPlayer").length == 0) {
-        var _playerHTML = '<div class="modal-header">' +
-            '<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>' +
-            '<h2 class="modal-title">' + _this.currentTour.desc + '</h2>' +
-            '</div>' +
-            '<div class="modal-body">' +
-            '<iframe id="jHueTourVideoFrame" src="' + _this.currentTour.video + '?autoplay=1" width="700" height="350" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" style="height:360px;width:640px"></iframe><div class="moreInfo">' +
-            (typeof _this.currentTour.blog != "undefined" && _this.currentTour.blog != "" ? '<br/><a href="' + _this.currentTour.blog + '" target="_blank"><i class="fa fa-external-link"></i> ' + _this.options.labels.MORE_INFO + '</a>' : '') +
-            '</div></div>';
-        var _player = $("<div>").attr("id", "jHueTourVideoPlayer").addClass("modal").addClass("hide").addClass("fade");
-        _player.html(_playerHTML);
-        _player.appendTo($("body"));
-      }
-      else {
-        $("#jHueTourVideoPlayer").find("h3").html(_this.currentTour.desc);
-        $("#jHueTourVideoPlayer").find(".moreInfo").html(typeof _this.currentTour.blog != "undefined" && _this.currentTour.blog != "" ? '<a href="' + _this.currentTour.blog + '" target="_blank"><i class="fa fa-external-link"></i> ' + _this.options.labels.MORE_INFO + '</a>' : '');
-        $("#jHueTourVideoFrame").attr("src", _this.currentTour.video + "?autoplay=1");
-      }
-      $("#jHueTourVideoPlayer").modal().modal("show");
-      $("#jHueTourVideoPlayer").on("hidden", function () {
-        $("#jHueTourVideoFrame").attr("src", "about:blank");
-      });
-    }
-    else {
-      if (_this.currentTour.steps[stepNo - 1] != null) {
-        var _step = _this.currentTour.steps[stepNo - 1];
-        _this.currentTour.shownStep = stepNo;
-        var _navigation = "";
-
-        if (_step.visitUrl != undefined) {
-          location.href = _step.visitUrl;
-        }
-
-        if (_step.onShown != undefined) {
-          window.setTimeout(_step.onShown, 10);
-        }
-
-        $(".popover").remove();
-        $(".jHueTourExposed").removeClass("jHueTourExposed");
-        if ($(".jHueTourExposed").css("position") == "relative") {
-          $(".jHueTourExposed").css("position", "relative");
-        }
-        $("#jHueTourMask").width($(document).width()).height($(document).height()).show();
-
-        var _closeBtn = $("<a>");
-        _closeBtn.addClass("btn").addClass("btn-mini").html('<i class="fa fa-times"></i>').css("float", "right").css("margin-top", "-4px").css("margin-right", "-6px");
-        _closeBtn.click(function () {
-          _this.performOperation("close");
-        });
-
-        var _nextBtn = $("<a>");
-        _nextBtn.addClass("btn").addClass("btn-mini").html('<i class="fa fa-chevron-circle-right"></i>').css("margin-top", "10px");
-        _nextBtn.click(function () {
-          _this.showStep(_this.currentTour.shownStep + 1);
-        });
-
-        var _prevBtn = $("<a>");
-        _prevBtn.addClass("btn").addClass("btn-mini").html('<i class="fa fa-chevron-circle-left"></i>').css("margin-top", "10px").css("margin-right", "10px");
-        _prevBtn.click(function () {
-          _this.showStep(_this.currentTour.shownStep - 1);
-        });
-
-        var _arrowOn = _step.arrowOn;
-        var _additionalContent = "";
-        if ($(_arrowOn).length == 0 || !($(_arrowOn).is(":visible"))) {
-          _arrowOn = "body";
-          _additionalContent = "<b>MISSING POINTER OF STEP " + _this.currentTour.shownStep + "</b> ";
-        }
-        $(_arrowOn).popover('destroy').popover({
-          title: _step.title,
-          content: _additionalContent + _step.content + "<br/>",
-          html: true,
-          trigger: 'manual',
-          placement: (_step.placement != "" && _step.placement != undefined) ? _step.placement : "left"
-        }).popover('show');
-
-        if (_step.top != undefined) {
-          if ($.isNumeric(_step.top)) {
-            $(".popover").css("top", ($(".popover").position().top + _step.top) + "px");
-          }
-          else {
-            $(".popover").css("top", _step.top);
-          }
-        }
-
-        if (_step.left != undefined) {
-          if ($.isNumeric(_step.left)) {
-            $(".popover").css("left", ($(".popover").position().left + _step.left) + "px");
-          }
-          else {
-            $(".popover").css("left", _step.left);
-          }
-        }
-        $(".popover-title").html(_step.title);
-        _closeBtn.prependTo($(".popover-title"));
-
-        if (_this.currentTour.shownStep > 1) {
-          _prevBtn.appendTo($(".popover-content p"));
-        }
-        if (_this.currentTour.shownStep < _this.currentTour.steps.length && (_step.waitForAction == undefined || _step.waitForAction == false)) {
-          _nextBtn.appendTo($(".popover-content p"));
-        }
-
-        // last step, mark tour/tutorial as done
-        if ($.totalStorage !== undefined && _this.currentTour.shownStep == _this.currentTour.steps.length) {
-          var _key = location.pathname;
-          if (_this.currentTour.path !== undefined && _this.currentTour.path != "") {
-            _key = _this.currentTour.path;
-          }
-          _key += "_" + _this.currentTour.name;
-          var _history = $.totalStorage("jHueTourHistory");
-          if (_history == null) {
-            _history = {}
-          }
-          _history[_key] = true;
-          $.totalStorage("jHueTourHistory", _history);
-        }
-
-        var _exposedElement = $((_step.expose != undefined && _step.expose != "" ? _step.expose : _arrowOn));
-        if (_exposedElement.css("position") === undefined || _exposedElement.css("position") != "fixed") {
-          _exposedElement.css("position", "relative");
-        }
-        _exposedElement.addClass("jHueTourExposed");
-      }
-    }
-  };
-
-  $[pluginName] = function (options, stepNo) {
-    var _el = $("body");
-    if (!$("body").data('plugin_' + pluginName)) {
-      $("body").data('plugin_' + pluginName, new Plugin(_el, options));
-    }
-
-    if (options === undefined) {
-      return $("body").data('plugin_' + pluginName).availableTours();
-    }
-
-    if (typeof options == "string") {
-      if (stepNo === undefined) {
-        $("body").data('plugin_' + pluginName).performOperation(options);
-      }
-      else if ($.isNumeric(stepNo)) {
-        $("body").data('plugin_' + pluginName).showTour(options, stepNo);
-      }
-    }
-    else if ($.isNumeric(options)) {
-      $("body").data('plugin_' + pluginName).showStep(options);
-    }
-    else {
-      $("body").data('plugin_' + pluginName).addTours(options);
-    }
-  };
-
-})(jQuery, window, document);

+ 0 - 85
desktop/core/src/desktop/static/desktop/less/components/hue-tour.less

@@ -1,85 +0,0 @@
-/*
- Licensed to Cloudera, Inc. under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  Cloudera, Inc. licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-
-#jHueTourMask {
-  position: absolute;
-  display: none;
-  top: 0;
-  left: 0;
-  z-index: 9998;
-  background-color: #FFFFFF;
-  opacity: 0.9;
-  filter: alpha(opacity=90);
-}
-
-.jHueTourBadge {
-  background-color: #2c7fb3;
-  background-image: -moz-linear-gradient(bottom, #2c7fb3, #01639c);
-  background-image: -ms-linear-gradient(bottom, #2c7fb3, #01639c);
-  background-image: -webkit-gradient(linear, 0 100%, 0 0, from(#2c7fb3), to(#01639c));
-  background-image: -webkit-linear-gradient(bottom, #2c7fb3, #01639c);
-  background-image: -o-linear-gradient(bottom, #2c7fb3, #01639c);
-  background-image: linear-gradient(bottom, #2c7fb3, #01639c);
-  background-repeat: repeat-x;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#01639c', endColorstr='#2c7fb3', GradientType=0);
-  border: 1px solid #01639C;
-  border-right: none;
-  color: #FFFFFF;
-  padding: 4px;
-  padding-left: 8px;
-  -webkit-border-top-left-radius: 4px;
-  -webkit-border-bottom-left-radius: 4px;
-  -moz-border-radius-topleft: 4px;
-  -moz-border-radius-bottomleft: 4px;
-  border-top-left-radius: 4px;
-  border-bottom-left-radius: 4px;
-  position: fixed;
-  top: 100px;
-  z-index: 10000;
-  right: 0;
-  cursor: pointer;
-}
-
-.jHueTourBadgeLeft {
-  right: auto !important;
-  left: 0;
-  padding-left: 4px;
-  padding-right: 8px;
-  border-left: none;
-  border-right: 1px solid #01639C;
-  -webkit-border-top-left-radius: 0;
-  -webkit-border-bottom-left-radius: 0;
-  -moz-border-radius-topleft: 0;
-  -moz-border-radius-bottomleft: 0;
-  border-top-left-radius: 0;
-  border-bottom-left-radius: 0;
-  -webkit-border-top-right-radius: 4px;
-  -webkit-border-bottom-right-radius: 4px;
-  -moz-border-radius-topright: 4px;
-  -moz-border-radius-bottomright: 4px;
-  border-top-right-radius: 4px;
-  border-bottom-right-radius: 4px;
-}
-
-.jHueTourBadge:hover {
-  background-color: #2C7FB3;
-}
-
-.jHueTourExposed {
-  z-index: 9999;
-}

+ 0 - 1
desktop/core/src/desktop/static/desktop/less/hue-cross-version.less

@@ -28,7 +28,6 @@
 @import "components/hue-selectize.less";
 @import "components/hue-demi-modal.less";
 @import "components/hue-spinner.less";
-@import "components/hue-tour.less";
 @import "components/hue-scrollbar.less";
 @import "components/hue-query-builder.less";
 @import "components/hue-qq-upload.less";

+ 0 - 4
desktop/core/src/desktop/templates/common_footer.mako

@@ -31,9 +31,5 @@ ${ smart_unicode(login_modal(request).content) | n,unicode }
 
 ${ commonHeaderFooterComponents.footer(messages) }
 
-% if tours_and_tutorials:
-  <%include file="tours.mako"/>
-% endif
-
   </body>
 </html>

+ 2 - 6
desktop/core/src/desktop/templates/common_header.mako

@@ -61,6 +61,7 @@ if USE_NEW_EDITOR.get():
   <link href="${ static('desktop/ext/css/cui/cui.css') }" rel="stylesheet">
   <link href="${ static('desktop/ext/css/cui/bootstrap2.css') }" rel="stylesheet">
   <link href="${ static('desktop/ext/css/cui/bootstrap-responsive2.css') }" rel="stylesheet">
+  <link href="${ static('desktop/ext/css/bootstrap-tour.min.css') }" rel="stylesheet">
 
   <link href="${ static('desktop/ext/css/font-awesome.min.css') }" rel="stylesheet">
   <link href="${ static('desktop/css/hue3.css') }" rel="stylesheet">
@@ -131,7 +132,6 @@ if USE_NEW_EDITOR.get():
   <script src="${ static('desktop/js/jquery.tableextender2.js') }"></script>
   <script src="${ static('desktop/js/jquery.scrollleft.js') }"></script>
   <script src="${ static('desktop/js/jquery.scrollup.js') }"></script>
-  <script src="${ static('desktop/js/jquery.tour.js') }"></script>
   <script src="${ static('desktop/ext/js/jquery/plugins/jquery.cookie.js') }"></script>
   <script src="${ static('desktop/ext/js/jquery/plugins/jquery.total-storage.min.js') }"></script>
   <script src="${ static('desktop/ext/js/jquery/plugins/jquery.dataTables.1.8.2.min.js') }"></script>
@@ -142,6 +142,7 @@ if USE_NEW_EDITOR.get():
   <script src="${ static('desktop/ext/js/d3.v3.js') }"></script>
   <script src="${ static('desktop/ext/js/d3.v4.js') }"></script>
   <script src="${ static('desktop/ext/js/bootstrap.min.js') }"></script>
+  <script src="${ static('desktop/ext/js/bootstrap-tour.min.js') }"></script>
   <script src="${ static('desktop/js/bootstrap-tooltip.js') }"></script>
   <script src="${ static('desktop/ext/js/bootstrap-better-typeahead.min.js') }"></script>
   <script src="${ static('desktop/js/hue.colors.js') }"></script>
@@ -289,13 +290,8 @@ ${ hueIcons.symbols() }
     % if 'help' in apps:
     <li><a title="${_('Documentation')}" data-rel="navigator-tooltip" href="/help"><i class="fa fa-question-circle"></i></a></li>
     % endif
-    <li id="jHueTourFlagPlaceholder"></li>
     <li><a title="${_('Sign out')}" data-rel="navigator-tooltip" href="/accounts/logout/"><i class="fa fa-sign-out"></i></a></li>
   </ul>
-  % else:
-  <ul class="nav nav-pills" style="margin-right: 40px">
-    <li id="jHueTourFlagPlaceholder"></li>
-  </ul>
   % endif
 
   </div>

+ 0 - 24
desktop/core/src/desktop/templates/common_header_footer_components.mako

@@ -101,15 +101,6 @@ from metadata.conf import has_optimizer, OPTIMIZER
       }
     };
 
-    jHueTourGlobals = {
-      labels: {
-        AVAILABLE_TOURS: "${_('Available tours')}",
-        NO_AVAILABLE_TOURS: "${_('None for this page.')}",
-        MORE_INFO: "${_('Read more about it...')}",
-        TOOLTIP_TITLE: "${_('Demo tutorials')}"
-      }
-    };
-
     LeafletGlobals = {
       layer: '${ leaflet['layer'] |n,unicode }',
       attribution: '${ leaflet['attribution'] |n,unicode }'
@@ -582,21 +573,6 @@ from metadata.conf import has_optimizer, OPTIMIZER
         }
       }, 200);
     }
-    %if tours_and_tutorials:
-      $.jHueTour({});
-      if ($.totalStorage("jHueTourExtras") != null) {
-        $.jHueTour({tours: $.totalStorage("jHueTourExtras")});
-      }
-      var _qs = location.search;
-      if (_qs !== undefined && _qs.indexOf("tour=") > -1) {
-        $.jHueTour(getParameterByName("tour"), 1);
-      }
-      function getParameterByName(name) {
-        name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
-        var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(_qs);
-        return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
-      }
-    %endif
   });
 
   function resetPrimaryButtonsStatus() {

+ 2 - 9
desktop/core/src/desktop/templates/common_header_m.mako

@@ -53,6 +53,7 @@ if USE_NEW_EDITOR.get():
   <link href="${ static('desktop/ext/css/cui/cui.css') }" rel="stylesheet">
   <link href="${ static('desktop/ext/css/cui/bootstrap2.css') }" rel="stylesheet">
   <link href="${ static('desktop/ext/css/cui/bootstrap-responsive2.css') }" rel="stylesheet">
+  <link href="${ static('desktop/ext/css/bootstrap-tour.min.css') }" rel="stylesheet">
 
   <link href="${ static('desktop/ext/css/font-awesome.min.css') }" rel="stylesheet">
   <link href="${ static('desktop/css/hue-mobile.css') }" rel="stylesheet">
@@ -109,15 +110,6 @@ if USE_NEW_EDITOR.get():
       }
     };
 
-    jHueTourGlobals = {
-      labels: {
-        AVAILABLE_TOURS: "${_('Available tours')}",
-        NO_AVAILABLE_TOURS: "${_('None for this page.')}",
-        MORE_INFO: "${_('Read more about it...')}",
-        TOOLTIP_TITLE: "${_('Demo tutorials')}"
-      }
-    };
-
     LeafletGlobals = {
       layer: '${ leaflet['layer'] |n,unicode }',
       attribution: '${ leaflet['attribution'] |n,unicode }'
@@ -162,6 +154,7 @@ if USE_NEW_EDITOR.get():
   <script src="${ static('desktop/ext/js/jquery/plugins/jquery.total-storage.min.js') }"></script>
   <script src="${ static('desktop/ext/js/jquery/plugins/jquery.touchSwipe.min.js') }"></script>
   <script src="${ static('desktop/ext/js/bootstrap.min.js') }"></script>
+  <script src="${ static('desktop/ext/js/bootstrap-tour.min.js') }"></script>
   <script src="${ static('desktop/ext/js/bootstrap-better-typeahead.min.js') }"></script>
   <script src="${ static('desktop/ext/js/moment-with-locales.min.js') }"></script>
   <script src="${ static('desktop/ext/js/d3.v3.js') }"></script>

+ 0 - 76
desktop/core/src/desktop/templates/common_home.mako

@@ -123,85 +123,9 @@
 
       ko.applyBindings(viewModel, $('#homeComponents')[0]);
 
-      huePubSub.publish('init.tour');
-
     });
   })();
 
-  huePubSub.subscribe('init.tour', function(){
-    if ($.totalStorage("jHueTourHideModal") == null || $.totalStorage("jHueTourHideModal") == false) {
-      $("#jHueTourModal").modal();
-      $.totalStorage("jHueTourHideModal", true);
-      $("#jHueTourModalChk").attr("checked", "checked");
-      $("#jHueTourModalChk").on("change", function () {
-        $.totalStorage("jHueTourHideModal", $(this).is(":checked"));
-      });
-      $("#jHueTourModalClose").on("click", function () {
-        $("#jHueTourFlag").click();
-        $("#jHueTourModal").modal("hide");
-      });
-    }
-  });
 </script>
 </%def>
 
-<%def name="tour()">
-<div id="jHueTourModal" class="modal hide fade" tabindex="-1">
-  <div class="modal-header">
-    <button type="button" class="close" data-dismiss="modal" aria-label="${ _('Close') }"><span aria-hidden="true">&times;</span></button>
-    <h2 class="modal-title">${_('Did you know?')}</h2>
-  </div>
-  <div class="modal-body">
-    <ul class="nav nav-tabs" style="margin-bottom: 0">
-      <li class="active"><a href="#tourStep1" data-toggle="tab">${ _('Step 1:') } ${ _('Add data') }</a></li>
-      <li><a href="#tourStep2" data-toggle="tab">${ _('Step 2:') }  ${ _('Query data') }</a></li>
-      <li><a href="#tourStep3" data-toggle="tab">${ _('Step 3:') } ${_('Do more!') }</a></li>
-    </ul>
-
-    <div class="tab-content">
-      <div id="tourStep1" class="tab-pane active">
-        <div class="pull-left step-icon"><i class="fa fa-download"></i></div>
-        <div style="margin: 40px">
-          <p>
-            ${ _('With') }  <span class="badge badge-info"><i class="fa fa-file"></i> File Browser</span>
-            ${ _('and the apps in the') }  <span class="badge badge-info">Data Browsers <b class="caret"></b></span> ${ _('section, upload, view your data and create tables.') }
-          </p>
-          <p>
-            ${ _('Pre-installed samples are also already there.') }
-          </p>
-        </div>
-      </div>
-
-      <div id="tourStep2" class="tab-pane">
-          <div class="pull-left step-icon"><i class="fa fa-search"></i></div>
-          <div style="margin: 40px">
-            <p>
-              ${ _('Then query and visualize the data with the') } <span class="badge badge-info">Query Editors <b class="caret"></b></span>
-               ${ _('and') }  <span class="badge badge-info">Search <b class="caret"></b></span>
-            </p>
-          </div>
-      </div>
-
-      <div id="tourStep3" class="tab-pane">
-        <div class="pull-left step-icon"><i class="fa fa-flag-checkered"></i></div>
-        <div style="margin: 40px">
-          % if tours_and_tutorials:
-          <p>
-            ${ _('Tours were created to guide you around.') }
-            ${ _('You can see the list of tours by clicking on the checkered flag icon') } <span class="badge badge-info"><i class="fa fa-flag-checkered"></i></span>
-            ${ ('at the top right of this page.') }
-          </p>
-          % endif
-          <p>
-            ${ _('Additional documentation is available at') } <a href="http://learn.gethue.com">learn.gethue.com</a>.
-          </p>
-        </div>
-      </div>
-    </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 id="jHueTourModalClose" href="#" class="btn btn-primary disable-feedback">${_('Got it!')}</a>
-  </div>
-</div>
-</%def>

+ 0 - 114
desktop/core/src/desktop/templates/home.mako

@@ -497,118 +497,4 @@ ${ commonshare() | n,unicode }
 
 </script>
 
-
-<style type="text/css">
-  .tourSteps {
-    min-height: 150px;
-  }
-</style>
-
-<script src="${ static('desktop/ext/js/routie-0.3.0.min.js') }" type="text/javascript" charset="utf-8"></script>
-
-<script type="text/javascript">
-$(document).ready(function(){
-  var currentStep = "tourStep1";
-
-  routie({
-    "tourStep1":function () {
-      showStep("tourStep1");
-    },
-    "tourStep2":function () {
-      showStep("tourStep2");
-    },
-    "tourStep3":function () {
-      showStep("tourStep3");
-    }
-  });
-
-  function showStep(step) {
-    currentStep = step;
-
-    $("a.tourStep").parent().removeClass("active");
-    $("a.tourStep[href=#" + step + "]").parent().addClass("active");
-    if (step == "tourStep3") {
-      $("#tourLastStep").parent().addClass("active");
-    }
-    $(".tourStepDetails").hide();
-    $("#" + step).show();
-  }
-
-  if ($.totalStorage("jHueTourHideModal") == null || $.totalStorage("jHueTourHideModal") == false) {
-    $("#jHueTourModal").modal();
-    $.totalStorage("jHueTourHideModal", true);
-    $("#jHueTourModalChk").attr("checked", "checked");
-    $("#jHueTourModalChk").on("change", function () {
-      $.totalStorage("jHueTourHideModal", $(this).is(":checked"));
-    });
-    $("#jHueTourModalClose").on("click", function () {
-      $("#jHueTourFlag").click();
-      $("#jHueTourModal").modal("hide");
-    });
-  }
-});
-</script>
-
-  <div id="jHueTourModal" class="modal hide fade" tabindex="-1">
-    <div class="modal-header">
-      <button type="button" class="close" data-dismiss="modal" aria-label="${ _('Close') }"><span aria-hidden="true">&times;</span></button>
-      <h2 class="modal-title">${_('Did you know?')}</h2>
-    </div>
-    <div class="modal-body">
-      <div class="row-fluid">
-        <div id="properties" class="section">
-          <ul class="nav nav-tabs" style="margin-bottom: 0">
-            <li class="active"><a href="#tourStep1" class="tourStep">${ _('Step 1:') } ${ _('Add data') }</a></li>
-            <li><a href="#tourStep2" class="tourStep">${ _('Step 2:') }  ${ _('Query data') }</a></li>
-            <li><a id="tourLastStep" href="#tourStep3" class="tourStep">${ _('Step 3:') } ${_('Do more!') }</a></li>
-          </ul>
-        </div>
-
-        <div class="tourSteps">
-        <div id="tourStep1" class="tourStepDetails">
-          <div class="pull-left" style="color: #DDDDDD;font-size: 116px;margin: 10px; margin-right: 20px"><i class="fa fa-download"></i></div>
-          <div style="margin: 40px">
-            <p>
-              ${ _('With') }  <span class="badge badge-info"><i class="fa fa-file"></i> File Browser</span>
-              ${ _('and the apps in the') }  <span class="badge badge-info">Data Browsers <b class="caret"></b></span> ${ _('section, upload, view your data and create tables.') }
-            </p>
-            <p>
-              ${ _('Pre-installed samples are also already there.') }
-            </p>
-          </div>
-        </div>
-
-        <div id="tourStep2" class="tourStepDetails hide">
-          <div class="pull-left" style="color: #DDDDDD;font-size: 116px;margin: 10px; margin-right: 20px"><i class="fa fa-search"></i></div>
-          <div style="margin: 40px">
-            <p>
-              ${ _('Then query and visualize the data with the') } <span class="badge badge-info">Query Editors <b class="caret"></b></span>
-               ${ _('and') }  <span class="badge badge-info">Search <b class="caret"></b></span>
-            </p>
-          </div>
-        </div>
-
-        <div id="tourStep3" class="tourStepDetails hide">
-          <div class="pull-left" style="color: #DDDDDD;font-size: 116px;margin: 10px; margin-right: 20px"><i class="fa fa-flag-checkered"></i></div>
-          <div style="margin: 40px">
-            % if tours_and_tutorials:
-            <p>
-              ${ _('Tours were created to guide you around.') }
-              ${ _('You can see the list of tours by clicking on the checkered flag icon') } <span class="badge badge-info"><i class="fa fa-flag-checkered"></i></span>
-              ${ ('at the top right of this page.') }
-            </p>
-            % endif
-            <p>
-              ${ _('Additional documentation is available at') } <a href="http://learn.gethue.com">learn.gethue.com</a>.
-            </p>
-          </div>
-        </div>
-      </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 id="jHueTourModalClose" href="#" class="btn btn-primary disable-feedback">${_('Got it, prof!')}</a>
-     </div>
-   </div>
-
 ${ commonfooter(request, messages) | n,unicode }

+ 0 - 1
desktop/core/src/desktop/templates/home2.mako

@@ -246,7 +246,6 @@ ${ common_home.navbar() }
 %endif
 
 ${ common_home.vm(is_embeddable) }
-${ common_home.tour() }
 
 %if not is_embeddable:
 ${ commonfooter(request, messages) | n,unicode }

+ 2 - 1
desktop/core/src/desktop/templates/hue.mako

@@ -47,6 +47,7 @@
   <link href="${ static('desktop/ext/css/cui/cui.css') }" rel="stylesheet">
   <link href="${ static('desktop/ext/css/cui/bootstrap2.css') }" rel="stylesheet">
   <link href="${ static('desktop/ext/css/cui/bootstrap-responsive2.css') }" rel="stylesheet">
+  <link href="${ static('desktop/ext/css/bootstrap-tour.min.css') }" rel="stylesheet">
 
   <link href="${ static('desktop/ext/css/font-awesome.min.css') }" rel="stylesheet">
   <link href="${ static('desktop/css/hue.css') }" rel="stylesheet">
@@ -349,6 +350,7 @@ ${ hueIcons.symbols() }
 <script src="${ static('desktop/js/jquery.migration.js') }"></script>
 <script src="${ static('desktop/js/hue.utils.js') }"></script>
 <script src="${ static('desktop/ext/js/bootstrap.min.js') }"></script>
+<script src="${ static('desktop/ext/js/bootstrap-tour.min.js') }"></script>
 <script src="${ static('desktop/js/bootstrap-tooltip.js') }"></script>
 <script src="${ static('desktop/ext/js/bootstrap-better-typeahead.min.js') }"></script>
 <script src="${ static('desktop/ext/js/fileuploader.js') }"></script>
@@ -391,7 +393,6 @@ ${ hueIcons.symbols() }
 <script src="${ static('desktop/js/sqlUtils.js') }"></script>
 <script src="${ static('desktop/js/jquery.scrollleft.js') }"></script>
 <script src="${ static('desktop/js/jquery.scrollup.js') }"></script>
-<script src="${ static('desktop/js/jquery.tour.js') }"></script>
 <script src="${ static('desktop/js/jquery.huedatatable.js') }"></script>
 <script src="${ static('desktop/js/sqlFunctions.js') }"></script>
 <script src="${ static('desktop/ext/js/selectize.min.js') }"></script>

+ 0 - 124
desktop/core/src/desktop/templates/tours.mako

@@ -1,124 +0,0 @@
-## Licensed to Cloudera, Inc. under one
-## or more contributor license agreements.  See the NOTICE file
-## distributed with this work for additional information
-## regarding copyright ownership.  Cloudera, Inc. licenses this file
-## to you under the Apache License, Version 2.0 (the
-## "License"); you may not use this file except in compliance
-## with the License.  You may obtain a copy of the License at
-##
-##     http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-<%!
-from django.utils.translation import ugettext as _
-%>
-
-<script type="text/javascript">
-  $.jHueTour({
-    "tours": [
-      {
-        "name": "genericapp00",
-        "desc": "${_("Read more on the Hue blog")}",
-        "path": "/(home|home2|jobsub|useradmin|help|about)",
-        "video": "",
-        "blog": "http://gethue.com/blog/"
-      },
-      {
-        "name": "beeswaxapp00",
-        "desc": "${_("Hue blog: Hive")}",
-        "path": "/(editor|beeswax|metastore)",
-        "video": "",
-        "blog": "http://gethue.com/category/hive/"
-      },
-      {
-        "name": "impalaapp00",
-        "desc": "${_("Hue blog: Impala")}",
-        "path": "/(editor|impala|metastore)",
-        "video": "",
-        "blog": "http://gethue.com/category/impala/"
-      },
-      {
-        "name": "beeswaxapp00",
-        "desc": "${_("Hue blog: DB Query")}",
-        "path": "/(rdbms)",
-        "video": "",
-        "blog": "http://gethue.com/category/dbquery/"
-      },
-      {
-        "name": "pigapp00",
-        "desc": "${_("Hue blog: Pig")}",
-        "path": "/(pig)",
-        "video": "",
-        "blog": "http://gethue.com/category/pig/"
-      },
-      {
-        "name": "sparkapp00",
-        "desc": "${_("Hue blog: Spark")}",
-        "path": "/(spark)",
-        "video": "",
-        "blog": "http://gethue.com/category/spark/"
-      },
-      {
-        "name": "hbaseapp00",
-        "desc": "${_("Hue blog: HBase")}",
-        "path": "/(hbase)",
-        "video": "",
-        "blog": "http://gethue.com/category/hbase/"
-      },
-      {
-        "name": "sqoopapp00",
-        "desc": "${_("Hue blog: Sqoop")}",
-        "path": "/(sqoop)",
-        "video": "",
-        "blog": "http://gethue.com/category/sqoop/"
-      },
-      {
-        "name": "zookeeperapp00",
-        "desc": "${_("Hue blog: Zookeeper")}",
-        "path": "/(zookeeper)",
-        "video": "",
-        "blog": "http://gethue.com/category/zookeeper/"
-      },
-      {
-        "name": "oozieapp00",
-        "desc": "${_("Hue blog: Oozie")}",
-        "path": "/(oozie)",
-        "video": "",
-        "blog": "http://gethue.com/category/oozie/"
-      },
-      {
-        "name": "oozieapp00",
-        "desc": "${_("Hue blog: Search")}",
-        "path": "/(search)",
-        "video": "",
-        "blog": "http://gethue.com/category/search/"
-      },
-      {
-        "name": "sentryapp00",
-        "desc": "${_("Hue blog: Security")}",
-        "path": "/(security)",
-        "video": "",
-        "blog": "http://gethue.com/category/security/"
-      },
-      {
-        "name": "fbapp00",
-        "desc": "${_("Hue blog: HDFS")}",
-        "path": "/(filebrowser)",
-        "video": "",
-        "blog": "http://gethue.com/category/hdfs/"
-      },
-      {
-        "name": "jbapp00",
-        "desc": "${_("Hue blog: Job Browser")}",
-        "path": "/(jobbrowser)",
-        "video": "",
-        "blog": "http://gethue.com/category/jobbrowser/"
-      }
-    ]
-  });
-
-</script>

+ 0 - 6
desktop/core/src/desktop/views.py

@@ -72,7 +72,6 @@ def hue(request):
 
   return render('hue.mako', request, {
     'apps': apps,
-    'tours_and_tutorials': Settings.get_settings().tours_and_tutorials,
     'interpreters': get_ordered_interpreters(request.user),
     'is_s3_enabled': is_s3_enabled() and has_s3_access(request.user),
     'is_ldap_setup': 'desktop.auth.backend.LdapBackend' in desktop.conf.AUTH.BACKEND.get(),
@@ -90,7 +89,6 @@ def ko_editor(request):
 
   return render('ko_editor.mako', request, {
     'apps': apps,
-    'tours_and_tutorials': Settings.get_settings().tours_and_tutorials
   })
 
 def ko_metastore(request):
@@ -98,7 +96,6 @@ def ko_metastore(request):
 
   return render('ko_metastore.mako', request, {
     'apps': apps,
-    'tours_and_tutorials': Settings.get_settings().tours_and_tutorials
   })
 
 def home(request):
@@ -110,7 +107,6 @@ def home(request):
     'apps': apps,
     'json_documents': json.dumps(massaged_documents_for_json(docs, request.user)),
     'json_tags': json.dumps(massaged_tags_for_json(docs, request.user)),
-    'tours_and_tutorials': Settings.get_settings().tours_and_tutorials
   })
 
 
@@ -119,7 +115,6 @@ def home2(request, is_embeddable=False):
 
   return render('home2.mako', request, {
     'apps': apps,
-    'tours_and_tutorials': Settings.get_settings().tours_and_tutorials,
     'is_embeddable': request.GET.get('is_embeddable', False)
   })
 
@@ -481,7 +476,6 @@ def commonfooter(request, messages=None, is_mobile=False):
     'messages': messages,
     'version': hue_version(),
     'collect_usage': collect_usage(),
-    'tours_and_tutorials': hue_settings.tours_and_tutorials
   })
 
 

+ 0 - 5
desktop/libs/liboauth/src/liboauth/templates/oauth-login.mako

@@ -147,11 +147,6 @@ from django.utils.translation import ugettext as _
 <div class="footer"></div>
 
 <div class="navigator">
-  <div class="pull-right">
-    <ul class="nav nav-pills">
-      <li id="jHueTourFlagPlaceholder"></li>
-    </ul>
-  </div>
   <a class="brand nav-tooltip pull-left" href="#">
     <img src="${ static('desktop/art/hue-logo-mini-white.png') }" alt="${ _('Hue logo') }"
        data-orig="${ static('desktop/art/hue-logo-mini-white.png') }"

+ 0 - 5
desktop/libs/libopenid/src/libopenid/templates/openid-login.html

@@ -98,11 +98,6 @@
 <div class="footer"></div>
 
 <div class="navigator">
-  <div class="pull-right">
-    <ul class="nav nav-pills">
-      <li id="jHueTourFlagPlaceholder"></li>
-    </ul>
-  </div>
   <a class="brand nav-tooltip pull-left" href="#"><img src="/static/desktop/art/hue-logo-mini-white.png"
                                                        data-orig="/static/desktop/art/hue-logo-mini-white.png"
                                                        data-hover="/static/desktop/art/hue-logo-mini-white-hover.png"/></a>

+ 0 - 24
tools/followme/jHueTourBuilder.html

@@ -1,24 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-
-	<title>jHueTour Builder</title>
-	
-</head>
-
-<body>
-	
-	
-
-Drag the bookmarklet to your fav bar: 
-
-<a href="javascript:(function()%7Bfunction%20callback()%7Bif%20(typeof%20console%20!%3D%20%22undefined%22)%20%7B%20console.log(%22Welcome%20to%20jHueTourBuilder!%22)%3B%7Dif%20(typeof%20%24%20%3D%3D%20%22undefined%22%20%7C%7C%20typeof%20%24.jHueTour%20%3D%3D%20%22undefined%22)%20%7B%20alert(%22Sorry%2C%20but%20you%20need%20to%20run%20this%20while%20being%20on%20Hue!%22)%3B%20%7D%7Dvar%20s%3Ddocument.createElement(%22script%22)%3Bs.src%3D%22https%3A%2F%2Fdl.dropboxusercontent.com%2Fu%2F730827%2Fcloudera%2FjHueTourBuilder.js%22%3Bif(s.addEventListener)%7Bs.addEventListener(%22load%22%2Ccallback%2Cfalse)%7Delse%20if(s.readyState)%7Bs.onreadystatechange%3Dcallback%7Ddocument.body.appendChild(s)%3B%7D)()">jHueTour Builder</a>
-
-<br/><br/>
-<em>Thanks to Peter Coles for the amazing <a href="http://mrcoles.com/bookmarklet/">Bookmarklet generator</a></em>
-
-</body>
-</html>

+ 0 - 475
tools/followme/jHueTourBuilder.js

@@ -1,475 +0,0 @@
-$("<style type='text/css'> .tooltip {z-index: 30000} .tourBuilder td { vertical-align: text-top } .tourBuilder span[rel='tooltip'] {cursor: pointer; color: #FFF; font-size: 14px} .tourBuilder { overflow-y: auto; overflow-x: hidden; color: #FFF; font-size: 11px; background-color: #333; padding: 10px; opacity: 0.9; position: fixed; width: 360px; right: 0; top: 0; z-index: 15000 } .tourBuilder select, .tourBuilder textarea  { font-size: 11px; } .tourBuilder input { font-size: 11px; height: 14px } </style>").appendTo($("head"));
-
-     var _tbTour = {
-       name: "",
-       desc: "",
-       path: location.pathname,
-       steps: []
-     };
-
-     var _origTbTour = _tbTour;
-
-     var _tb = $("<div>");
-     _tb.addClass("tourBuilder");
-     _tb.height($(window).height());
-     _tb.appendTo($("body"));
-
-     var _tbCog = $("<div>").attr("id", "tbCog").html('<i class="fa fa-cogs"></i>').addClass("jHueTourBadge").css("top", "64px");
-     _tbCog.on("click", function () {
-       _tb.show();
-     });
-
-     _tbCog.appendTo($("body"));
-
-     var _html = "<h4>General</h4>" +
-             "<table><tr><td>ID:</td><td><input class='input' type='text' id='tbName' /> <span rel='tooltip' title='unique tour name (location.pathname scope)'><i class='fa fa-question-circle'></i></span></td></tr>" +
-             "<tr><td>Name:</td><td><input class='input' type='text' id='tbDesc' /> <span rel='tooltip' title='the label shown on the question mark'><i class='fa fa-question-circle'></i></span></td></tr>" +
-             "<tr><td>Path:</td><td><input class='input' type='text' id='tbPath' value='" + _tbTour.path + "'/> <span rel='tooltip' title='string for the path to show this tour on, regex allowed'><i class='fa fa-question-circle'></i></span></td></tr></table>" +
-             "<h4>New step</h4><table>" +
-             "<tr><td>Visit URL:</td><td><input class='input' type='text' id='tbNewURL' /> <span rel='tooltip' title='overrides everything, redirects to specific url'><i class='fa fa-question-circle'></i></span></td></tr>" +
-             "<tr><td colspan='2'>&nbsp;</td></tr>" +
-             "<tr><td>Arrow on:</td><td><input class='input' type='text' id='tbNewArrow' /> <span rel='tooltip' title='the element relative to the popover is positioned'><i class='fa fa-question-circle'></i></span></td></tr>" +
-             "<tr><td>Expose:</td><td><input class='input' type='text' id='tbNewExpose' /> <span rel='tooltip' title='optional, the exposed object. if not present, arrowOn will be exposed'><i class='fa fa-question-circle'></i></span></td></tr>" +
-             "<tr><td>Title:</td><td><input class='input' type='text' id='tbNewTitle'/> <span rel='tooltip' title='popover title'><i class='fa fa-question-circle'></i></span></td></tr>" +
-             "<tr><td>Content:</td><td><textarea id='tbNewContent'></textarea> <span rel='tooltip' title='popover content, html enabled'><i class='fa fa-question-circle'></i></span></td></tr>" +
-             "<tr><td>Placement:</td><td><select class='input' id='tbNewPlacement'><option value='top' selected='selected'>Top</option><option value='bottom'>Bottom</option><option value='left'>Left</option><option value='right'>Right</option> </select> <span rel='tooltip' title='popover placement'><i class='fa fa-question-circle'></i></span></td></tr>" +
-             "<tr><td>Left:</td><td>Offset <input type='text' class='input-mini' id='tbNewOffsetLeft'/> Abs <input type='text' class='input-mini' id='tbNewAbsLeft'/></td></tr>" +
-             "<tr><td>Top:</td><td>Offset <input type='text' class='input-mini' id='tbNewOffsetTop'/> Abs <input type='text' class='input-mini' id='tbNewAbsTop'/></td></tr>" +
-             "<tr><td>On shown:</td><td><textarea id='tbNewShown'></textarea> <span rel='tooltip' title='javascript run on popover step shown. DANGER!'><i class='fa fa-question-circle'></i></span></td></tr>" +
-             "<tr><td>Wait:</td><td><input type='checkbox' id='tbNewWait'/> <span rel='tooltip' title='does not show the next button and waits for an action to go on with the tour'><i class='fa fa-question-circle'></i></span></td></tr>" +
-             "<tr><td>&nbsp;</td><td style='text-align: right'><a href='javascript:void(0)' id='tbNewShow' class='btn btn-mini'>Show</a> <a id='tbNewAdd' href='javascript:void(0)' class='btn btn-mini'>Add to tour</a> </td></tr>" +
-             "</table><h4>Steps</h4>" +
-             "<div id='tbSteps'></div>" +
-             "<h4>JSON</h4>" +
-             "<textarea id='tbPreview' style='width: 90%'>" + JSON.stringify(_tbTour) + "</textarea><br/><a href='javascript:void(0)' id='tbLoadJson' class='btn btn-mini'>Load from JSON</a><br/><br/>" +
-             "<div style='text-align: right'><a id='tbManageTours' class='btn' href='javascript:void(0)' style='float:left'><i class='fa fa-sitemap'></i></a> <a id='tbAddTour' class='btn' href='javascript:void(0)'><i class='fa fa-plus-circle-alt'></i></a> <a id='tbClearCache' class='btn' href='javascript:void(0)'><i class='fa fa-trash-o'></i></a> <a id='tbTryTour' title='Try tour' class='btn' href='javascript:void(0)'><i class='fa fa-eye'></i></a></div><br/><br/>";
-
-
-     _tb.html(_html);
-
-
-     var _managerHtml = "<div id='tbToursModal' class='modal hide fade'>" +
-             "<div class='modal-header'>" +
-             "<button type='button' class='close' data-dismiss='modal' aria-hidden='true'>&times;</button>" +
-             "<h2 class='modal-title'>Available tours</h2>" +
-             "</div>" +
-             "<div class='modal-body'>" +
-             "<p><span id='tbTourList'></span><br/><h4>Content for tours.mako</h4><textarea id='tbAvailableContent' style='width:90%'></textarea><br/><a href='javascript:void(0)' id='tbLoadToursJson' class='btn btn-mini'>Load from JSON</a></p>" +
-             "</div>" +
-             "<div class='modal-footer'><a href='javascript:void(0)' data-dismiss='modal' class='btn'>Close</a></div></div>";
-
-     $(_managerHtml).appendTo($("body"));
-
-
-     $("span[rel='tooltip']").tooltip({
-       placement: "left"
-     });
-
-     _tb.find("input").on("change", function () {
-       updateTour();
-     });
-
-     $("textarea").on("focus", function () {
-       var $this = $(this);
-       $this.select();
-
-       // Work around Chrome's little problem
-       $this.mouseup(function () {
-         // Prevent further mouseup intervention
-         $this.unbind("mouseup");
-         return false;
-       });
-     });
-
-     var _tbTourIsEditing = -1;
-     var _tbTourIsStepEditing = -1;
-
-
-     function updateTour() {
-       _tbTour.name = $("#tbName").val();
-       _tbTour.desc = $("#tbDesc").val();
-       _tbTour.path = $("#tbPath").val();
-
-       if ($("#tbNewExpose").val() == "") {
-         $("#tbNewExpose").val($("#tbNewArrow").val());
-       }
-       function fillItem(item) {
-         $("#tbNewURL").val(item.visitUrl);
-         $("#tbNewArrow").val(item.arrowOn);
-         $("#tbNewExpose").val(item.expose);
-         $("#tbNewTitle").val(item.title);
-         $("#tbNewContent").val(item.content);
-         $("#tbNewPlacement").val(item.placement);
-         $("#tbNewShown").val(item.onShown);
-         if (item.waitForAction == true){
-           $("#tbNewWait").prop("checked", true);
-         }
-         else {
-           $("#tbNewWait").prop("checked", false);
-         }
-         $("#tbNewOffsetTop").val("");
-         $("#tbNewAbsTop").val("");
-         $("#tbNewOffsetLeft").val("");
-         $("#tbNewAbsLeft").val("");
-         if (item.left != undefined && item.left != "") {
-           if ($.isNumeric(item.left)) {
-             $("#tbNewOffsetLeft").val(item.left);
-           }
-           else {
-             $("#tbNewAbsLeft").val(item.left.substring(0, item.left.length - 2));
-           }
-         }
-         if (item.top != undefined && item.top != "") {
-           if ($.isNumeric(item.top)) {
-             $("#tbNewOffsetTop").val(item.top);
-           }
-           else {
-             $("#tbNewAbsTop").val(item.top.substring(0, item.top.length - 2));
-           }
-         }
-       }
-
-       $("#tbSteps").empty();
-       $(_tbTour.steps).each(function (cnt, item) {
-         var _trow = $("<div>").html("&nbsp;" + (item.visitUrl!="" && item.visitUrl!=undefined?"URL: " + item.visitUrl:"Title: "+item.title));
-
-         var _trowdelete = $("<a>");
-         _trowdelete.addClass("btn").addClass("btn-mini").html("<i class='fa fa-trash-o'></i>").css("margin", "3px").on("click", function () {
-           _tbTour.steps.splice(cnt, 1);
-           updateTour();
-         });
-         _trowdelete.prependTo(_trow);
-
-         var _trowcopy = $("<a>");
-         _trowcopy.addClass("btn").addClass("btn-mini").html("<i class='fa fa-files-o'></i>").css("margin", "3px").on("click", function () {
-           fillItem(item);
-         });
-         _trowcopy.prependTo(_trow);
-
-         var _trowedit = $("<a>");
-         _trowedit.addClass("btn").addClass("btn-mini").html("<i class='fa fa-edit'></i>").css("margin", "3px").on("click", function () {
-           fillItem(item);
-           _tbTourIsStepEditing = cnt;
-           $("#tbNewAdd").text("Update step");
-         });
-         _trowedit.prependTo(_trow);
-
-         var _trowup = $("<a>");
-         _trowup.addClass("btn").addClass("btn-mini").html("<i class='fa fa-arrow-up'></i>").css("margin", "3px").on("click", function () {
-           var _newPos = cnt - 1;
-           if (cnt == 0) {
-             _newPos = _tbTour.steps.length - 1;
-           }
-           _tbTour.steps.move(cnt, _newPos);
-           updateTour();
-         });
-         _trowup.prependTo(_trow);
-
-         var _trowdown = $("<a>");
-         _trowdown.addClass("btn").addClass("btn-mini").html("<i class='fa fa-arrow-down'></i>").css("margin", "3px").on("click", function () {
-           var _newPos = cnt + 1;
-           if (cnt == _tbTour.steps.length - 1) {
-             _newPos = 0;
-           }
-           _tbTour.steps.move(cnt, _newPos);
-           updateTour();
-         });
-         _trowdown.prependTo(_trow);
-
-         _trow.appendTo($("#tbSteps"));
-       });
-
-       $("#tbPreview").val(JSON.stringify(_tbTour));
-
-       $.totalStorage("jHueTourBuilderTemp", _tbTour);
-     }
-
-     $("#tbLoadJson").on("click", function () {
-       _tbTourIsStepEditing = -1;
-       try {
-         _tbTour = JSON.parse($.trim($("#tbPreview").val()));
-         $("#tbName").val(_tbTour.name);
-         $("#tbDesc").val(_tbTour.desc);
-         $("#tbPath").val(_tbTour.path);
-         updateTour();
-       }
-       catch (exception) {
-         alert("It seems you don't eat JSON for breakfast:" + exception)
-       }
-     });
-
-      $("#tbLoadToursJson").on("click", function () {
-        _tbTourIsEditing = -1;
-       _tbTourIsStepEditing = -1;
-       try {
-         var _paste = $.trim($("#tbAvailableContent").val());
-         if (_paste.indexOf("$.jHueTour") > -1){
-           _paste = _paste.substr(11);
-         }
-         if (_paste[_paste.length - 1] == ";"){
-           _paste = _paste.substring(0, _paste.length - 2);
-         }
-         var _trz = JSON.parse(_paste);
-         $.totalStorage("jHueTourBuilderTours", _trz.tours);
-         $("#tbManageTours").click();
-       }
-       catch (exception) {
-         alert("It seems you don't eat JSON for breakfast:" + exception)
-       }
-     });
-
-     $("#tbNewShow").on("click", function () {
-       $(".popover").remove();
-       _tbTourIsEditing = -1;
-       _tbTourIsStepEditing = -1;
-       $(".jHueTourExposed").removeClass("jHueTourExposed").css("position", "");
-       $("#jHueTourMask").width($(document).width()).height($(document).height()).show();
-       var _closeBtn = $("<a>");
-       _closeBtn.addClass("btn").addClass("btn-mini").html('<i class="fa fa-times"></i>').css("float", "right").css("margin-top", "-4px").css("margin-right", "-6px");
-       _closeBtn.click(function () {
-         $(".popover").remove();
-         $(".jHueTourExposed").removeClass("jHueTourExposed");
-         $("#jHueTourMask").hide();
-       });
-
-       if ($($("#tbNewArrow").val()).length > 0) {
-         $($("#tbNewArrow").val()).popover('destroy').popover({
-           title: $("#tbNewTitle").val(),
-           content: $("#tbNewContent").val() + "<br/>",
-           html: true,
-           trigger: 'manual',
-           placement: $("#tbNewPlacement").val()
-         }).popover('show');
-         if ($("#tbNewOffsetTop").val() != "") {
-           $(".popover").css("top", ($(".popover").position().top + ($("#tbNewOffsetTop").val() * 1)) + "px");
-         }
-         if ($("#tbNewAbsTop").val() != "") {
-           $(".popover").css("top", $("#tbNewAbsTop").val() + "px");
-         }
-         if ($("#tbNewOffsetLeft").val() != "") {
-           $(".popover").css("left", ($(".popover").position().left + ($("#tbNewOffsetLeft").val() * 1)) + "px");
-         }
-         if ($("#tbNewAbsLeft").val() != "") {
-           $(".popover").css("left", $("#tbNewAbsLeft").val() + "px");
-         }
-         $(".popover-title").html($("#tbNewTitle").val());
-         _closeBtn.prependTo($(".popover-title"));
-         $("<a class='btn btn-mini' style='margin-top:10px' onclick='alert(\"Nothing else to do? :)\")'><i class='fa fa-smile'></i></a>").appendTo($(".popover-content p"));
-       }
-
-       var _exposedElement = $($("#tbNewExpose").val());
-       if (_exposedElement.css("position") === undefined || _exposedElement.css("position") != "fixed") {
-         _exposedElement.css("position", "relative");
-       }
-       _exposedElement.addClass("jHueTourExposed");
-
-       if ($("#tbNewShown").val() != "") {
-         window.setTimeout($("#tbNewShown").val(), 10);
-       }
-     });
-
-     Array.prototype.move = function (old_index, new_index) {
-       if (new_index >= this.length) {
-         var k = new_index - this.length;
-         while ((k--) + 1) {
-           this.push(undefined);
-         }
-       }
-       this.splice(new_index, 0, this.splice(old_index, 1)[0]);
-       return this;
-     };
-
-     $("#tbNewAdd").on("click", function () {
-       var _newStep = {
-         arrowOn: $("#tbNewArrow").val(),
-         expose: $("#tbNewExpose").val(),
-         title: $("#tbNewTitle").val(),
-         content: $("#tbNewContent").val(),
-         placement: $("#tbNewPlacement").val(),
-         onShown: $("#tbNewShown").val(),
-         waitForAction: $("#tbNewWait").is(":checked")
-       };
-
-       if ($("#tbNewURL").val() != ""){
-         _newStep = {
-           visitUrl: $("#tbNewURL").val()
-         }
-       }
-
-       if ($("#tbNewOffsetTop").val() != "") {
-         _newStep.top = $("#tbNewOffsetTop").val() * 1;
-       }
-       if ($("#tbNewAbsTop").val() != "") {
-         _newStep.top = $("#tbNewAbsTop").val() + "px";
-       }
-       if ($("#tbNewOffsetLeft").val() != "") {
-         _newStep.left = $("#tbNewOffsetLeft").val() * 1;
-       }
-       if ($("#tbNewAbsLeft").val() != "") {
-         _newStep.left = $("#tbNewAbsLeft").val() + "px";
-       }
-       if (_tbTourIsStepEditing > -1) {
-         _tbTour.steps[_tbTourIsStepEditing] = _newStep;
-         _tbTourIsStepEditing = -1;
-         $("#tbNewAdd").text("Add to tour");
-       }
-       else {
-         _tbTour.steps.push(_newStep);
-       }
-       updateTour();
-       $(".popover").remove();
-       $(".jHueTourExposed").removeClass("jHueTourExposed");
-       $("#jHueTourMask").hide();
-
-       $("#tbNewURL").val("");
-       $("#tbNewArrow").val("");
-       $("#tbNewExpose").val("");
-       $("#tbNewTitle").val("");
-       $("#tbNewContent").val("");
-       $("#tbNewShown").val("");
-       $("#tbNewWait").prop("checked", false);
-       $("#tbNewPlacement").val("");
-       $("#tbNewOffsetTop").val("");
-       $("#tbNewAbsTop").val("");
-       $("#tbNewOffsetLeft").val("");
-       $("#tbNewAbsLeft").val("");
-     });
-
-     $("#tbTryTour").on("click", function () {
-       $.jHueTour("clear");
-       $.jHueTour({ tours: [_tbTour]});
-       _tb.hide();
-       $.jHueTour("play");
-     });
-
-     $("#tbClearCache").on("click", function () {
-       $.totalStorage("jHueTourBuilderTemp", null);
-       _tbTour = _origTbTour;
-       $("#tbName").val(_tbTour.name);
-       $("#tbDesc").val(_tbTour.desc);
-       $("#tbPath").val(_tbTour.path);
-       updateTour();
-     });
-
-     $("#tbAddTour").on("click", function () {
-
-       var _tbStoredTours = [];
-       if ($.totalStorage("jHueTourBuilderTours") != null){
-         _tbStoredTours = $.totalStorage("jHueTourBuilderTours");
-       }
-
-       if (_tbTourIsEditing > -1) {
-         _tbStoredTours[_tbTourIsEditing] = _tbTour;
-         _tbTourIsEditing = -1;
-         $("#tbAddTour").html("<i class='fa fa-plus-circle-alt'></i>");
-       }
-       else {
-         _tbStoredTours.push(_tbTour);
-       }
-
-       $.totalStorage("jHueTourBuilderTours", _tbStoredTours);
-       $("#tbClearCache").click();
-     });
-
-     $("#tbManageTours").on("click", function () {
-       $("#tbTourList").empty();
-       $($.totalStorage("jHueTourBuilderTours")).each(function (cnt, item) {
-         var _trow = $("<div>").html("&nbsp;Name: " + item.name + ", Desc: "+ item.desc + ", Path: "+ item.path);
-
-         var _trowdelete = $("<a>");
-         _trowdelete.addClass("btn").addClass("btn-mini").html("<i class='fa fa-trash-o'></i>").css("margin", "3px").on("click", function () {
-           var _tmpTrz = $.totalStorage("jHueTourBuilderTours");
-           _tmpTrz.splice(cnt, 1);
-           $.totalStorage("jHueTourBuilderTours", _tmpTrz);
-           $("#tbManageTours").click();
-         });
-         _trowdelete.prependTo(_trow);
-
-         var _trowcopy = $("<a>");
-         _trowcopy.addClass("btn").addClass("btn-mini").html("<i class='fa-files-oopy'></i>").css("margin", "3px").on("click", function () {
-           $.totalStorage("jHueTourBuilderTemp", null);
-           _tbTour = item;
-           $("#tbName").val(_tbTour.name);
-           $("#tbDesc").val(_tbTour.desc);
-           $("#tbPath").val(_tbTour.path);
-           updateTour();
-           $("#tbToursModal").modal("hide");
-         });
-         _trowcopy.prependTo(_trow);
-
-         var _trowedit = $("<a>");
-         _trowedit.addClass("btn").addClass("btn-mini").html("<i class='fa fa-edit'></i>").css("margin", "3px").on("click", function () {
-           $.totalStorage("jHueTourBuilderTemp", null);
-           _tbTour = item;
-           $("#tbName").val(_tbTour.name);
-           $("#tbDesc").val(_tbTour.desc);
-           $("#tbPath").val(_tbTour.path);
-           updateTour();
-           _tbTourIsEditing = cnt;
-           $("#tbAddTour").html("<i class='fa fa-floppy-o'></i>");
-           $("#tbToursModal").modal("hide");
-         });
-         _trowedit.prependTo(_trow);
-
-         _trow.appendTo($("#tbTourList"));
-       });
-
-       var _trz = {
-         tours: $.totalStorage("jHueTourBuilderTours")
-       };
-       $("#tbAvailableContent").val("$.jHueTour(" + JSON.stringify(_trz) + ");");
-       $("#tbToursModal").modal("show");
-     });
-
-     var _changeSide = $("<a>");
-     _changeSide.addClass("btn").addClass("btn-mini").addClass("pull-right");
-     _changeSide.on("click", function (e) {
-       e.preventDefault();
-       e.stopImmediatePropagation();
-       if (_tb.css("left") != "0px") {
-         _tb.css("left", "0");
-         _tb.css("right", "auto");
-         $(this).html("<i class='fa fa-arrow-right'></i>");
-       }
-       else {
-         _tb.css("right", "0");
-         _tb.css("left", "auto");
-         $(this).html("<i class='fa fa-arrow-left'></i>");
-       }
-     });
-     _changeSide.html("<i class='fa fa-arrow-left'></i>");
-     _changeSide.prependTo(_tb);
-
-     var _hideTb = $("<a>");
-     _hideTb.addClass("btn").addClass("btn-mini").addClass("pull-right").css("margin-left", "4px");
-     _hideTb.on("click", function (e) {
-       e.preventDefault();
-       e.stopImmediatePropagation();
-       _tb.hide();
-     });
-     _hideTb.html("<i class='fa fa-times'></i>");
-     _hideTb.prependTo(_tb);
-
-      // preload
-      if ($.totalStorage("jHueTourBuilderTemp") != null){
-       _tbTour = $.totalStorage("jHueTourBuilderTemp");
-       $("#tbName").val(_tbTour.name);
-       $("#tbDesc").val(_tbTour.desc);
-       $("#tbPath").val(_tbTour.path);
-       updateTour();
-     }
-     if ($.totalStorage("jHueTourBuilderTours") == null){
-       $.totalStorage("jHueTourBuilderTours", []);
-     }
-      else {
-       $($.totalStorage("jHueTourBuilderTours")).each(function (cnt, item) {
-         if (item.name == _tbTour.name && item.path == _tbTour.path){
-            _tbTourIsEditing = cnt;
-           $("#tbAddTour").html("<i class='fa fa-floppy-o'></i>");
-         }
-       });
-     }
-
-     $(window).resize(function () {
-       _tb.height($(window).height());
-     });

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini