From 63e967bdfd6d3bd52960647f8490dfd9678353f9 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 5 Aug 2012 13:04:35 +0100 Subject: html validity fixes (removed name and align in some plugins) --- lib/scripts/media.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/scripts/media.js') diff --git a/lib/scripts/media.js b/lib/scripts/media.js index 841baa93f..1872f2c61 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -497,7 +497,7 @@ var dw_mediamanager = { var maxWidth = widthFull - (widthOtherResizable + minWidthNonResizable); $resizables.resizable( "option", "maxWidth", maxWidth ); - // width of file panel in % = 100% - width of resizables in % + // width of file panel in % = 100% - width of resizables in % // this calculates with 99.99 and not 100 to overcome rounding errors var relWidthNonResizable = 99.99 - (100 * widthResizables / widthFull); // set width of file panel @@ -699,7 +699,7 @@ var dw_mediamanager = { event.preventDefault(); $link = jQuery(this); - id = $link.attr('name').substr(2); + id = $link.attr('id').substr(2); if(!opener){ // if we don't run in popup display example -- cgit v1.2.3 From 5b838199e985590c6d716cd6add1973fcfd0d54c Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 26 Aug 2012 16:20:57 +0200 Subject: do not intialize media manager JS if not needed FS#2578 --- lib/scripts/media.js | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/scripts/media.js') diff --git a/lib/scripts/media.js b/lib/scripts/media.js index 1872f2c61..074c7b95f 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -31,6 +31,7 @@ var dw_mediamanager = { var $content, $tree; $content = jQuery('#media__content'); $tree = jQuery('#media__tree'); + if(!$tree.length) return; dw_mediamanager.prepare_content($content); -- cgit v1.2.3 From 10295f78866be6074f00369aa219c67d867ad610 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sat, 8 Sep 2012 10:50:41 +0200 Subject: Replace language-dependent selector in the mediamanager js FS#2573 --- lib/scripts/media.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/scripts/media.js') diff --git a/lib/scripts/media.js b/lib/scripts/media.js index 074c7b95f..a85b2ed0f 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -435,7 +435,7 @@ var dw_mediamanager = { dw_mediamanager.$resizables().resizable('destroy'); if (update_list) { - dw_mediamanager.list.call(jQuery('input[value="Apply"]')[0]); + dw_mediamanager.list.call(jQuery('#mediamanager__page form.options input[type="submit"]')[0]); } $content.html(data); -- cgit v1.2.3 From e9e762792aaa754e29c2ecbbd088b60f75b7d674 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sun, 9 Sep 2012 00:39:37 +0200 Subject: Add more tolerance in js resize of the media manager FS#2369 This adds more tolerance to the width calculations of the media manager panes which avoids that the right pane is displayed below the other panes. --- lib/scripts/media.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/scripts/media.js') diff --git a/lib/scripts/media.js b/lib/scripts/media.js index a85b2ed0f..8f3c00c88 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -495,12 +495,12 @@ var dw_mediamanager = { // set max width of resizable column var widthOtherResizable = widthResizables - jQuery(this).width(); var minWidthNonResizable = parseFloat($filePanel.css("min-width")); - var maxWidth = widthFull - (widthOtherResizable + minWidthNonResizable); + var maxWidth = widthFull - (widthOtherResizable + minWidthNonResizable) - 1; $resizables.resizable( "option", "maxWidth", maxWidth ); // width of file panel in % = 100% - width of resizables in % - // this calculates with 99.99 and not 100 to overcome rounding errors - var relWidthNonResizable = 99.99 - (100 * widthResizables / widthFull); + // this calculates with 99.9 and not 100 to overcome rounding errors + var relWidthNonResizable = 99.9 - (100 * widthResizables / widthFull); // set width of file panel $filePanel.width(relWidthNonResizable+'%'); -- cgit v1.2.3 From 30c1351e814dcc13497a61f65fa05a0901d5436a Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Mon, 10 Sep 2012 00:25:36 +0200 Subject: Fix media manager height handling after resize FS#2369 The height handling code was triggered before the width handling code and thus the right pane was below the other panes during the height calculations which caused strange effects. Now the height handling code is called again after adjusting the width of the right pane. --- lib/scripts/media.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/scripts/media.js') diff --git a/lib/scripts/media.js b/lib/scripts/media.js index 8f3c00c88..182d5fefe 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -514,6 +514,8 @@ var dw_mediamanager = { }); } + dw_mediamanager.resize(); + dw_mediamanager.opacity_slider(); dw_mediamanager.portions_slider(); } -- cgit v1.2.3