summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2006-05-25 16:40:00 +0200
committerAndreas Gohr <andi@splitbrain.org>2006-05-25 16:40:00 +0200
commitcf6894df38261b3b92c75d441bbe0a0ba58d963e (patch)
tree8ea05553b2d36f0e8aa65f5778a7f71ed721fa6a /lib
parentfb53bfe26d4ed0fd3e63d17c7b02d9c8d0e98fb4 (diff)
downloadrpg-cf6894df38261b3b92c75d441bbe0a0ba58d963e.tar.gz
rpg-cf6894df38261b3b92c75d441bbe0a0ba58d963e.tar.bz2
more mediamanager fixes
This fixes some styling issues, the cookie handling and a bug in the JavaScript caching mechanism. darcs-hash:20060525144000-7ad00-2f0b673d4f747c979f460e4e927a50eeeae81ec1.gz
Diffstat (limited to 'lib')
-rw-r--r--lib/exe/css.php1
-rw-r--r--lib/exe/js.php3
-rw-r--r--lib/exe/mediamanager.php2
-rw-r--r--lib/images/magnifier.pngbin0 -> 615 bytes
-rw-r--r--lib/scripts/media.js4
-rw-r--r--lib/tpl/default/media.css53
-rw-r--r--lib/tpl/default/mediamanager.php4
7 files changed, 55 insertions, 12 deletions
diff --git a/lib/exe/css.php b/lib/exe/css.php
index b63841a03..cb85d1a35 100644
--- a/lib/exe/css.php
+++ b/lib/exe/css.php
@@ -72,6 +72,7 @@ function css_out(){
header('Pragma: public');
if(css_cacheok($cache,array_keys($files))){
http_conditionalRequest(filemtime($cache));
+ if($conf['allowdebug']) header("X-CacheUsed: $cache");
readfile($cache);
return;
} else {
diff --git a/lib/exe/js.php b/lib/exe/js.php
index 583faa5ad..7ff60710c 100644
--- a/lib/exe/js.php
+++ b/lib/exe/js.php
@@ -35,7 +35,7 @@ function js_out(){
$write = (bool) $_REQUEST['write']; // writable?
// The generated script depends on some dynamic options
- $cache = getCacheName('scripts'.$edit.$write,'.js');
+ $cache = getCacheName('scripts'.$edit.'x'.$write,'.js');
// Array of needed files
$files = array(
@@ -66,6 +66,7 @@ function js_out(){
header('Pragma: public');
if(js_cacheok($cache,array_merge($files,$plugins))){
http_conditionalRequest(filemtime($cache));
+ if($conf['allowdebug']) header("X-CacheUsed: $cache");
readfile($cache);
return;
} else {
diff --git a/lib/exe/mediamanager.php b/lib/exe/mediamanager.php
index 23140ee3c..b381fabf6 100644
--- a/lib/exe/mediamanager.php
+++ b/lib/exe/mediamanager.php
@@ -1,4 +1,4 @@
-<?
+<?php
if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/');
define('DOKU_MEDIAMANAGER',1);
require_once(DOKU_INC.'inc/init.php');
diff --git a/lib/images/magnifier.png b/lib/images/magnifier.png
new file mode 100644
index 000000000..cf3d97f75
--- /dev/null
+++ b/lib/images/magnifier.png
Binary files differ
diff --git a/lib/scripts/media.js b/lib/scripts/media.js
index 876b84f9f..da030be28 100644
--- a/lib/scripts/media.js
+++ b/lib/scripts/media.js
@@ -73,7 +73,8 @@ media = {
kobox.type = 'checkbox';
kobox.id = 'media__keepopen';
if(DokuCookie.getValue('keepopen')){
- kobox.checked = true;
+ kobox.checked = true;
+ media.keepopen = true;
}
addEvent(kobox,'change',function(event){ return media.togglekeepopen(event,this); });
@@ -94,6 +95,7 @@ media = {
hdbox.id = 'media__hide';
if(DokuCookie.getValue('hide')){
hdbox.checked = true;
+ media.hide = true;
}
addEvent(hdbox,'change',function(event){ return media.togglehide(event,this); });
diff --git a/lib/tpl/default/media.css b/lib/tpl/default/media.css
index 805abc467..4606cae45 100644
--- a/lib/tpl/default/media.css
+++ b/lib/tpl/default/media.css
@@ -4,7 +4,7 @@
#media__manager {
height: 100%;
- overflow: hide;
+ overflow: hidden;
}
#media__left {
@@ -18,7 +18,7 @@
}
#media__right {
- width: 69.9%;
+ width: 69.8%;
height: 100%;
overflow: auto;
@@ -26,6 +26,14 @@
right: 0;
}
+#media__manager h1 {
+ margin: 0;
+ padding: 0;
+ margin-bottom: 0.5em;
+}
+
+/* --- Tree formatting --- */
+
#media__tree img {
float:left;
padding: 0.5em 0.3em 0 0;
@@ -42,6 +50,28 @@
list-style-image: none;
}
+/* --- options --- */
+
+#media__opts {
+ padding-left: 1em;
+ margin-bottom: 0.5em;
+}
+
+#media__opts input {
+ float: left;
+ position: absolute;
+}
+
+#media__opts label {
+ display: block;
+ float: left;
+ margin-left: 30px;
+}
+
+#media__opts br {
+ clear: left;
+}
+
/* --- file list --- */
#media__content img.load {
@@ -89,6 +119,11 @@
/* --- upload form --- */
+#media__content div.upload {
+ font-size: 80%;
+ padding: 0.5em 0 0.5em 0.5em;
+}
+
#media__content form.upload {
display: block;
border-bottom: solid 1px __dark__;
@@ -104,20 +139,24 @@
#media__content form.meta label {
display: block;
- width: 20%;
+ width: 25%;
float: left;
- text-align: right;
font-weight: bold;
- padding-right: 1em;
+ margin-left: 1em;
+ clear: left;
}
#media__content form.meta .edit {
+ font: 100% "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif;
float: left;
- width: 75%;
+ width: 70%;
+ padding-right: 0;
+ padding-left: 0.2em;
+ margin: 2px;
}
#media__content form.meta textarea.edit {
- height: 6em;
+ height: 8em;
}
#media__content form.meta div.metafield {
diff --git a/lib/tpl/default/mediamanager.php b/lib/tpl/default/mediamanager.php
index 0ae4f7c66..2b032ac46 100644
--- a/lib/tpl/default/mediamanager.php
+++ b/lib/tpl/default/mediamanager.php
@@ -27,10 +27,10 @@
<?html_msgarea()?>
<h1><?php echo hsc($lang['mediaselect'])?></h1>
- <?php tpl_mediaTree() ?>
-
<?php /* keep the id! additional elements are inserted via JS here */?>
<div id="media__opts"></div>
+
+ <?php tpl_mediaTree() ?>
</div>
<div id="media__right">