summaryrefslogtreecommitdiff
path: root/lib/scripts
diff options
context:
space:
mode:
authorChristopher Smith <chris@jalakai.co.uk>2013-02-25 14:50:59 +0000
committerChristopher Smith <chris@jalakai.co.uk>2013-02-25 14:50:59 +0000
commit1fe0882c56ea31e738540e942b743966927415fd (patch)
treec3324566ada64f09775b35bc989592c7701c32d4 /lib/scripts
parent177daee5492e8c3cdfdb950cdf61a6798f7a9586 (diff)
parent058fd09655df42c72f3c447e3b9561e4909e978d (diff)
downloadrpg-1fe0882c56ea31e738540e942b743966927415fd.tar.gz
rpg-1fe0882c56ea31e738540e942b743966927415fd.tar.bz2
Merge branch 'master' into FS#2415
Diffstat (limited to 'lib/scripts')
-rw-r--r--lib/scripts/qsearch.js9
-rw-r--r--lib/scripts/toolbar.js2
2 files changed, 9 insertions, 2 deletions
diff --git a/lib/scripts/qsearch.js b/lib/scripts/qsearch.js
index 0c3609ada..e5cc73b49 100644
--- a/lib/scripts/qsearch.js
+++ b/lib/scripts/qsearch.js
@@ -12,6 +12,7 @@ var dw_qsearch = {
$inObj: null,
$outObj: null,
timer: null,
+ curRequest: null,
/**
* initialize the quick search
@@ -35,12 +36,16 @@ var dw_qsearch = {
// attach eventhandler to search field
do_qsearch = function () {
+ // abort any previous request
+ if (dw_qsearch.curRequest != null) {
+ dw_qsearch.curRequest.abort();
+ }
var value = dw_qsearch.$inObj.val();
if (value === '') {
dw_qsearch.clear_results();
return;
}
- jQuery.post(
+ dw_qsearch.curRequest = jQuery.post(
DOKU_BASE + 'lib/exe/ajax.php',
{
call: 'qsearch',
@@ -84,6 +89,8 @@ var dw_qsearch = {
onCompletion: function(data) {
var max, $links, too_big;
+ dw_qsearch.curRequest = null;
+
if (data === '') {
dw_qsearch.clear_results();
return;
diff --git a/lib/scripts/toolbar.js b/lib/scripts/toolbar.js
index 059a4ba5c..6d75215e0 100644
--- a/lib/scripts/toolbar.js
+++ b/lib/scripts/toolbar.js
@@ -72,7 +72,7 @@ function initToolbar(tbid,edid,tb, allowblock){
* @author Andreas Gohr <andi@splitbrain.org>
*/
function tb_format(btn, props, edid) {
- var sample = props.title || props.sample;
+ var sample = props.sample || props.title;
insertTags(edid,
fixtxt(props.open),
fixtxt(props.close),