diff options
author | Andreas Gohr <gohr@cosmocode.de> | 2009-11-02 14:01:15 +0100 |
---|---|---|
committer | Andreas Gohr <gohr@cosmocode.de> | 2009-11-02 14:01:15 +0100 |
commit | d9e6a3cb751a0715197451f06c12091fec2b0679 (patch) | |
tree | db4990dd3779f9c171a18eaa1600abd41a34b1a3 | |
parent | c21dca26e323e034a1d7d3cffa4802d020a9d23f (diff) | |
download | rpg-d9e6a3cb751a0715197451f06c12091fec2b0679.tar.gz rpg-d9e6a3cb751a0715197451f06c12091fec2b0679.tar.bz2 |
LinkWizard: don't add a title when useheading is used for content FS#1745
Ignore-this: 48f0da3ab0bf0178197b16e63143e1ca
darcs-hash:20091102130115-6e07b-d10e1c076791cdeb08b87ec76d6be8730228c8fb.gz
-rw-r--r-- | lib/exe/js.php | 2 | ||||
-rw-r--r-- | lib/scripts/linkwiz.js | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/exe/js.php b/lib/exe/js.php index 42190eac7..24a2e5a2c 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -85,6 +85,8 @@ function js_out(){ // add some global variables print "var DOKU_BASE = '".DOKU_BASE."';"; print "var DOKU_TPL = '".DOKU_TPL."';"; + print "var DOKU_UHN = ".((int) useHeading('navigation')).";"; + print "var DOKU_UHC = ".((int) useHeading('content')).";"; // load JS specific translations $json = new JSON(); diff --git a/lib/scripts/linkwiz.js b/lib/scripts/linkwiz.js index 2b31e73d1..ea3ee0cbe 100644 --- a/lib/scripts/linkwiz.js +++ b/lib/scripts/linkwiz.js @@ -196,7 +196,7 @@ var linkwiz = { if(!linkwiz.entry.value) return; var sel = getSelection(linkwiz.textArea); var stxt = sel.getText(); - if(!stxt) stxt=title; + if(!stxt && !DOKU_UHC) stxt=title; // prepend colon inside namespaces for non namespace pages if(linkwiz.textArea.form['id'].value.indexOf(':') != -1 && |