summaryrefslogtreecommitdiff
path: root/lib/scripts
diff options
context:
space:
mode:
authorKate Arzamastseva <pshns@ukr.net>2011-07-10 16:38:04 +0300
committerKate Arzamastseva <pshns@ukr.net>2011-07-10 16:38:04 +0300
commit4928b6eb7137cb1e8727ca7a7fc99db614b0df88 (patch)
tree17cfa3d313fd87c1fac61ced9b10d621cfa279df /lib/scripts
parente1dc10a4aab705171d34c7bde642ed77032c95c7 (diff)
downloadrpg-4928b6eb7137cb1e8727ca7a7fc99db614b0df88.tar.gz
rpg-4928b6eb7137cb1e8727ca7a7fc99db614b0df88.tar.bz2
mediamanager resizable
Diffstat (limited to 'lib/scripts')
-rw-r--r--lib/scripts/media.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/scripts/media.js b/lib/scripts/media.js
index 36c06a3aa..af5346cbe 100644
--- a/lib/scripts/media.js
+++ b/lib/scripts/media.js
@@ -354,14 +354,43 @@ var dw_mediamanager = {
DOKU_BASE + 'lib/exe/ajax.php',
params,
function (data) {
+ jQuery('.ui-resizable').each(function(){
+ jQuery(this).resizable('destroy');
+ });
+
$content.html(data);
dw_mediamanager.prepare_content($content);
dw_mediamanager.updatehide();
+ dw_mediamanager.update_resizable(0);
},
'html'
);
},
+ update_resizable: function (count_width) {
+ jQuery(".layout").resizable({ handles: 'e' });
+ jQuery(".layout").bind("resize", function(event, ui) {
+ var w = 0;
+ jQuery(".layout").each(function() {
+ w += jQuery(this).width();
+ });
+ jQuery('#id-mediamanager-layout').width(w+30);
+ });
+
+ var w = 0;
+ jQuery(".layout").each(function() {
+ if (count_width) jQuery(this).width(jQuery(this).width());
+ w += jQuery(this).width();
+ });
+ jQuery('#id-mediamanager-layout').width(w+30);
+
+ var windowHeight = jQuery(window).height();
+ var height = windowHeight - 300;
+ jQuery('.scroll-container').each(function (i) {
+ jQuery(this).height(height);
+ });
+ },
+
prepare_content: function ($content) {
// hide syntax example
$content.find('div.example:visible').hide();
@@ -642,4 +671,8 @@ function hasFlash(version){
return ver >= version;
}
+jQuery(document).ready(function() {
+ dw_mediamanager.update_resizable(1);
+});
+
jQuery(dw_mediamanager.init);