summaryrefslogtreecommitdiff
path: root/lib/scripts/media.js
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2012-11-08 23:15:08 +0100
committerAndreas Gohr <andi@splitbrain.org>2012-11-08 23:15:08 +0100
commit04924b7a9d090c0814cfff3e6706263e4d5a46e8 (patch)
treed83fc6b5683fbc9c639bfd1832f96dca2f3c8646 /lib/scripts/media.js
parent1ea7a6bada66fc9b7a45f61b4892e4ea23196d89 (diff)
parenta731ed1d6736ca405b3559adfd9500affcc59412 (diff)
downloadrpg-04924b7a9d090c0814cfff3e6706263e4d5a46e8.tar.gz
rpg-04924b7a9d090c0814cfff3e6706263e4d5a46e8.tar.bz2
Merge branch 'master' into proxyconnect
* master: (169 commits) added PCRE UTF-8 checks to do=check FS#2636 avoid multiple paralell update checks fix regression bug in HTTPClient FS#2621 changed PAGEUTILS_ID_HIDEPAGE to has BEFORE/AFTER TarLib code cleanup TarLib: fixed appending in non-dynamic mode fixed third method of adding files in TarLib fix lone zero block in TarLib created archives fix use of constructor in TarLib Slovak language update Korean language update Latvian language update added event PAGEUTILS_ID_HIDEPAGE added test for isHiddenPage() removed redundant variables in tpl_include_page() (because of 3ff8773b) added cut off points for mobile devices as parameters to style.ini Corrected typo: ruke -> rule Persian language update Spanish language update russian language update ...
Diffstat (limited to 'lib/scripts/media.js')
-rw-r--r--lib/scripts/media.js15
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