diff options
author | Guy Brand <gb@unistra.fr> | 2012-09-10 17:04:45 +0200 |
---|---|---|
committer | Guy Brand <gb@unistra.fr> | 2012-09-10 17:04:45 +0200 |
commit | 0f8ac4e8c5872a6b68b350f96a9ecde0291edefa (patch) | |
tree | ad7938bb4143d5e5a38fd7a8d131e4171aec657d /lib/scripts/media.js | |
parent | 58ec8fa9128e4581749955de87530f432e387588 (diff) | |
parent | b31fcef02fd24b3e746c9618e77152c7b84c2f2a (diff) | |
download | rpg-0f8ac4e8c5872a6b68b350f96a9ecde0291edefa.tar.gz rpg-0f8ac4e8c5872a6b68b350f96a9ecde0291edefa.tar.bz2 |
Merge branch 'master' into stable
Diffstat (limited to 'lib/scripts/media.js')
-rw-r--r-- | lib/scripts/media.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/scripts/media.js b/lib/scripts/media.js index 841baa93f..182d5fefe 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); @@ -434,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); @@ -494,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); + // width of file panel in % = 100% - width of resizables in % + // 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+'%'); @@ -513,6 +514,8 @@ var dw_mediamanager = { }); } + dw_mediamanager.resize(); + dw_mediamanager.opacity_slider(); dw_mediamanager.portions_slider(); } @@ -699,7 +702,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 |