diff options
Diffstat (limited to 'lib/scripts/media.js')
-rw-r--r-- | lib/scripts/media.js | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/lib/scripts/media.js b/lib/scripts/media.js index f616f8741..ebfd01322 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -265,12 +265,31 @@ media = { text = text.substr(text.lastIndexOf('/')+1); text = text.substr(text.lastIndexOf('\\')+1); name.value = text; - } + }, + + initFlashUpload: function(){ + if(!hasFlash(8)) return; + var oform = $('dw__upload'); + var oflash = $('dw__flashupload'); + if(!oform || !oflash) return; + + var clicky = document.createElement('img'); + clicky.src = DOKU_BASE+'lib/images/multiupload.png'; + clicky.title = LANG['mu_btn']; + clicky.alt = LANG['mu_btn']; + clicky.style.cursor = 'pointer'; + clicky.onclick = function(){ + oform.style.display = 'none'; + oflash.style.display = ''; + }; + oform.appendChild(clicky); + } }; addInitEvent(function(){ media.treeattach($('media__tree')); media.selectorattach($('media__content')); media.attachoptions($('media__opts')); + media.initFlashUpload(); }); |