Skip to content

Commit ca805ad

Browse files
committed
Merge pull request #3 from TinderApp/master
Fixes to changehost functionality
2 parents 533663a + 4c88536 commit ca805ad

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

_site/js/app.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ $(document).ready(function () {
4242
context.loadIndices();
4343
context.jq_pauseButton();
4444
context.jq_refreshInterval();
45-
context.jq_changeHostButton();
46-
$("#host").val(global.host);
45+
context.jq_changeHostButton();
46+
$("#host").val(global.host);
4747
global.loaded = true;
4848
}
4949
},
@@ -61,12 +61,15 @@ $(document).ready(function () {
6161
});
6262
},
6363

64-
jq_changeHostButton: function() {
65-
$("#changeHost").click(function(e) {
66-
global.host = $("#host").val().replace(/http:\/\//g,"");
64+
jq_changeHostButton: function() {
65+
var context = this;
66+
$("#changeHost").click(function(e) {
67+
global.host = $("#host").val().replace(/http:\/\//g,"");
68+
global.host = global.host.replace(/\/$/g, "");
6769

68-
});
69-
},
70+
context.loadIndices();
71+
});
72+
},
7073

7174
jq_refreshInterval: function() {
7275
$("#changeRefresh").click(function(e) {
@@ -263,4 +266,4 @@ $(document).ready(function () {
263266
app.run('#/');
264267

265268
})(jQuery);
266-
});
269+
});

_site/js/lib/bootstrap/bootstrap.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,10 @@
726726
selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
727727
}
728728

729+
if(selector == '#') {
730+
selector = '#-';
731+
}
732+
729733
$parent = $(selector)
730734
$parent.length || ($parent = $this.parent())
731735

@@ -2156,4 +2160,4 @@
21562160
})
21572161

21582162

2159-
}(window.jQuery);
2163+
}(window.jQuery);

0 commit comments

Comments
 (0)