poke: fix poke dialog - js tests now if there is already a questionmark in the url
This commit is contained in:
parent
8609cc1675
commit
9efc6fb823
1 changed files with 12 additions and 1 deletions
13
js/theme.js
13
js/theme.js
|
@ -292,7 +292,9 @@ function loadModalTitle() {
|
||||||
|
|
||||||
|
|
||||||
function addToModal(url) {
|
function addToModal(url) {
|
||||||
var url = url + '?mode=modal';
|
var char = qOrAmp(url);
|
||||||
|
|
||||||
|
var url = url + char + 'mode=modal';
|
||||||
var modal = $('#modal').modal();
|
var modal = $('#modal').modal();
|
||||||
|
|
||||||
modal
|
modal
|
||||||
|
@ -393,6 +395,15 @@ function random_digits(digits) {
|
||||||
return rnd;
|
return rnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Does we need a ? or a & to append values to a url
|
||||||
|
function qOrAmp(url) {
|
||||||
|
if(url.search('\\?') < 0) {
|
||||||
|
return '?';
|
||||||
|
} else {
|
||||||
|
return '&';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function insertFormatting(comment,BBcode,id) {
|
function insertFormatting(comment,BBcode,id) {
|
||||||
|
|
||||||
var tmpStr = $("#comment-edit-text-" + id).val();
|
var tmpStr = $("#comment-edit-text-" + id).val();
|
||||||
|
|
Loading…
Reference in a new issue