From 6f0b0dd1609f2a253b48f1b9347168dd2d5a61d7 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 15 Oct 2011 10:35:25 +0100 Subject: removed remnants of old flash uploader (FS#2335) --- lib/scripts/media.js | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'lib/scripts') diff --git a/lib/scripts/media.js b/lib/scripts/media.js index 76274c868..2d7c8feb2 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -848,33 +848,6 @@ var dw_mediamanager = { } }, - initFlashUpload: function () { - var $oform, $oflash; - if(!hasFlash(8)) { - return; - } - - $oform = jQuery('#dw__upload'); - $oflash = jQuery('#dw__flashupload'); - - if(!$oform.length || !$oflash.length) { - return; - } - - jQuery(document.createElement('img')) - .attr('src', DOKU_BASE+'lib/images/multiupload.png') - .attr('title', LANG.mu_btn) - .attr('alt', LANG.mu_btn) - .css('cursor', 'pointer') - .click( - function () { - $oform.hide(); - $oflash.show(); - } - ) - .appendTo($oform); - }, - /** * Sets the visibility of the image details accordingly to the * chosen hide state -- cgit v1.2.3 From ee7ed651b17756c390ab007be9ba96886e2b146d Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 15 Oct 2011 17:46:19 +0100 Subject: media manager: removed obsolete and broken hiding of parts of the option labels --- lib/scripts/media.js | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/scripts') diff --git a/lib/scripts/media.js b/lib/scripts/media.js index 2d7c8feb2..aa369657d 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -124,7 +124,6 @@ var dw_mediamanager = { $both.find('label').each(function () { var $this = jQuery(this); $this.children('input').appendTo($this.parent()); - $this.find('span span').addClass('a11y'); }); // Init buttonset -- cgit v1.2.3 From e409148d11080ca05d6c93b8fb2f33f96ce74b25 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 23 Oct 2011 06:25:34 +0200 Subject: Fix upload to deeper namespaces with new AJAX uploader Now params_toarray() correctly decodes parameters on parsing query strings --- lib/scripts/media.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/scripts') diff --git a/lib/scripts/media.js b/lib/scripts/media.js index aa369657d..f76fd4065 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -682,12 +682,17 @@ var dw_mediamanager = { }); }, + /** + * Parse a URI query string to an associative array + * + * @author Kate Arzamastseva + */ params_toarray: function (str) { var vars = [], hash; var hashes = str.split('&'); for(var i = 0; i < hashes.length; i++) { hash = hashes[i].split('='); - vars[hash[0]] = hash[1]; + vars[decodeURIComponent(hash[0])] = decodeURIComponent(hash[1]); } return vars; }, -- cgit v1.2.3 From 745094183678a7902aea706c4219dc3a4a4facbe Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Sat, 29 Oct 2011 11:17:16 +0200 Subject: Let mediamanager screen expand on window resize (FS#2351) --- lib/scripts/media.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/scripts') diff --git a/lib/scripts/media.js b/lib/scripts/media.js index f76fd4065..23a1fe5d8 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -549,7 +549,7 @@ var dw_mediamanager = { resize: function () { var $contents = jQuery('#mediamanager__page div.panelContent'), - height = jQuery(window).height() - jQuery(document).height() + + height = jQuery(window).height() - jQuery(document.body).height() + Math.max.apply(null, jQuery.map($contents, function (v) { return jQuery(v).height(); })); -- cgit v1.2.3 From 4ad1b4ca9301f5a3c8421d51956166683d1057e1 Mon Sep 17 00:00:00 2001 From: Hakan Sandell Date: Sat, 29 Oct 2011 22:22:35 +0200 Subject: Full screen media manager, file list is now updated on delete (FS#2346) --- lib/scripts/media.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/scripts') diff --git a/lib/scripts/media.js b/lib/scripts/media.js index 23a1fe5d8..4eefe8d57 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -427,6 +427,10 @@ var dw_mediamanager = { function (data) { dw_mediamanager.$resizables().resizable('destroy'); + if (update_list) { + dw_mediamanager.list.call(jQuery('a.selected')[0]); + } + $content.html(data); dw_mediamanager.prepare_content($content); @@ -442,9 +446,6 @@ var dw_mediamanager = { dw_mediamanager.init_ajax_uploader(); dw_mediamanager.init_options(); - if (update_list) { - dw_mediamanager.list.call(jQuery('a.files')[0]); - } }, 'html' ); -- cgit v1.2.3 From ed993c3be49e5048c5a8582d94415a1e74e9ec00 Mon Sep 17 00:00:00 2001 From: Hakan Sandell Date: Sun, 30 Oct 2011 12:40:19 +0100 Subject: Better solution for updating files list in media manager on delete --- lib/scripts/media.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/scripts') diff --git a/lib/scripts/media.js b/lib/scripts/media.js index 4eefe8d57..48bfdbbe8 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -428,7 +428,7 @@ var dw_mediamanager = { dw_mediamanager.$resizables().resizable('destroy'); if (update_list) { - dw_mediamanager.list.call(jQuery('a.selected')[0]); + dw_mediamanager.list.call(jQuery('input[value="Apply"]')[0]); } $content.html(data); -- cgit v1.2.3 From 48c5eff7672d7e6fcfc3f64194e03253d8e2fd0f Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Thu, 3 Nov 2011 19:22:34 +0000 Subject: fix widths of panels in fullscreen mediamanager to be 100% when resizing (FS#2351) -- please test in different screen sizes, etc --- lib/scripts/media.js | 68 +++++++++++++--------------------------------------- 1 file changed, 16 insertions(+), 52 deletions(-) (limited to 'lib/scripts') diff --git a/lib/scripts/media.js b/lib/scripts/media.js index 48bfdbbe8..253720324 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -457,44 +457,6 @@ var dw_mediamanager = { }, window_resize: function () { - if (jQuery('#mediamanager__page').width() == dw_mediamanager.layout_width) { - return; - } - - dw_mediamanager.layout_width = jQuery('#mediamanager__page').width(); - $r = jQuery("#mediamanager__page div.panel"); - - var w = 0, wSum = 0, mCount = 0, mArray = []; - $r.each(function() { - w = jQuery(this).width(); - if (w == parseFloat(jQuery(this).css("min-width"))) { - wSum += w; - } else { - mArray[mCount] = jQuery(this); - mCount++; - } - }); - - if (mCount > 0) { - var width = (0.95 * jQuery('#mediamanager__page').width() - wSum - 30); - wSum = 0; - for(var i = 0; i < mArray.length; i++) { - wSum += mArray[i].width(); - } - for(var i = 0; i < mArray.length; i++) { - w = mArray[i].width(); - w = 100*w / wSum; - mArray[i].width(width*w/100); - } - } - - $r.each(function() { - w = jQuery(this).width(); - w = (100 * w / jQuery('#mediamanager__page').width()); - w += "%"; - jQuery(this).width(w); - }); - dw_mediamanager.resize(); dw_mediamanager.opacity_slider(); @@ -513,29 +475,31 @@ var dw_mediamanager = { update_resizable: function () { $resizables = dw_mediamanager.$resizables(); - $resizables.resizable({ handles: 'e' , + $resizables.resizable({ + handles: 'e', resize: function(event, ui){ - var w = 0; + var widthFull = jQuery('#mediamanager__page').width(); + var widthResizables = 0; $resizables.each(function() { - w += jQuery(this).width(); + widthResizables += jQuery(this).width(); }); - wSum = w + parseFloat(jQuery('#mediamanager__page div.file').css("min-width")); + var $filePanel = jQuery('#mediamanager__page div.panel.file'); - // max width of resizable column - var maxWidth = 0.95 * jQuery('#mediamanager__page').width() - wSum + jQuery(this).width() - 30; + // set max width of resizable column + var widthOtherResizable = widthResizables - jQuery(this).width(); + var minWidthNonResizable = parseFloat($filePanel.css("min-width")); + var maxWidth = widthFull - (widthOtherResizable + minWidthNonResizable); $resizables.resizable( "option", "maxWidth", maxWidth ); - // percentage width of the first two columns - var wLeft = ( 100*(w+30) / jQuery('#mediamanager__page').width() ); - - // width of the third column - var wRight = 95-wLeft; - wRight += "%"; - jQuery('#mediamanager__page div.file').width(wRight); + // 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 + $filePanel.width(relWidthNonResizable+'%'); $resizables.each(function() { w = jQuery(this).width(); - w = (100 * w / jQuery('#mediamanager__page').width()); + w = (99.99 * w / widthFull); w += "%"; jQuery(this).width(w); }); -- cgit v1.2.3 From c81eb1329d8ce142828486267004f746a785e085 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 5 Nov 2011 01:23:47 +0000 Subject: removed font declarations from jquery-ui theme --- lib/scripts/jquery/jquery-ui-theme/smoothness.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/scripts') diff --git a/lib/scripts/jquery/jquery-ui-theme/smoothness.css b/lib/scripts/jquery/jquery-ui-theme/smoothness.css index 0f1a7e770..44883417d 100644 --- a/lib/scripts/jquery/jquery-ui-theme/smoothness.css +++ b/lib/scripts/jquery/jquery-ui-theme/smoothness.css @@ -56,9 +56,8 @@ /* Component containers ----------------------------------*/ -.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; } .ui-widget .ui-widget { font-size: 1em; } -.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-size: 1em; } .ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; } .ui-widget-content a { color: #222222; } .ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; } -- cgit v1.2.3 From 1811609e717748b047e83bde4d98069b9830aba5 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 5 Nov 2011 10:52:56 +0000 Subject: re-added font-size to .ui-widget of jqueryui theme to make programmatical removing of font-family easier --- lib/scripts/jquery/jquery-ui-theme/smoothness.css | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/scripts') diff --git a/lib/scripts/jquery/jquery-ui-theme/smoothness.css b/lib/scripts/jquery/jquery-ui-theme/smoothness.css index 44883417d..910d24b95 100644 --- a/lib/scripts/jquery/jquery-ui-theme/smoothness.css +++ b/lib/scripts/jquery/jquery-ui-theme/smoothness.css @@ -56,6 +56,7 @@ /* Component containers ----------------------------------*/ +.ui-widget { font-size: 1.1em; } .ui-widget .ui-widget { font-size: 1em; } .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-size: 1em; } .ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; } -- cgit v1.2.3 From 67fd10d7d6376d0033f3bee5b62b5ec2b80b5a9a Mon Sep 17 00:00:00 2001 From: Guy Brand Date: Sat, 5 Nov 2011 12:05:34 +0100 Subject: Remove font family declarations from css in the jquery update script --- lib/scripts/jquery/update.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/scripts') diff --git a/lib/scripts/jquery/update.sh b/lib/scripts/jquery/update.sh index 38f38bece..fde46f4d7 100755 --- a/lib/scripts/jquery/update.sh +++ b/lib/scripts/jquery/update.sh @@ -23,3 +23,6 @@ for img in $images do wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/smoothness/$img -O jquery-ui-theme/$img done + +# remove font family declarations from smoothness CSS +sed -i "s/font-family:[^;]*; \?//" jquery-ui-theme/smoothness.css -- cgit v1.2.3 From 84b1efdd1c75618a7bd713e8d3b0c9eba6bff2d0 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 6 Nov 2011 15:25:38 +0000 Subject: fixed resizing mediamanager panels in Chrome using browser sniffing (FS#2351) - any better solution welcome --- lib/scripts/media.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'lib/scripts') diff --git a/lib/scripts/media.js b/lib/scripts/media.js index 253720324..b1a175c26 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -497,12 +497,15 @@ var dw_mediamanager = { // set width of file panel $filePanel.width(relWidthNonResizable+'%'); - $resizables.each(function() { - w = jQuery(this).width(); - w = (99.99 * w / widthFull); - w += "%"; - jQuery(this).width(w); - }); + // FIXME: please fix without browser sniffing + if (jQuery.browser != 'webkit') { + $resizables.each(function() { + w = jQuery(this).width(); + w = (99.99 * w / widthFull); + w += "%"; + jQuery(this).width(w); + }); + } dw_mediamanager.opacity_slider(); dw_mediamanager.portions_slider(); -- cgit v1.2.3 From 410bfddd85883e6582b3b0ccaa41738b84037169 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 6 Nov 2011 15:31:37 +0000 Subject: improved $.browser usage in media panel fix --- lib/scripts/media.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/scripts') diff --git a/lib/scripts/media.js b/lib/scripts/media.js index b1a175c26..7f5514f56 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -498,7 +498,7 @@ var dw_mediamanager = { $filePanel.width(relWidthNonResizable+'%'); // FIXME: please fix without browser sniffing - if (jQuery.browser != 'webkit') { + if (!jQuery.browser.webkit) { $resizables.each(function() { w = jQuery(this).width(); w = (99.99 * w / widthFull); -- cgit v1.2.3 From 9ebae2ae295f745e1c3f257a52551b65e791f852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Thu, 24 Nov 2011 00:16:01 +0200 Subject: fix jQuery capitalization --- lib/scripts/compatibility.js | 2 +- lib/scripts/page.js | 2 +- lib/scripts/qsearch.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/scripts') diff --git a/lib/scripts/compatibility.js b/lib/scripts/compatibility.js index ea52153c5..385e45854 100644 --- a/lib/scripts/compatibility.js +++ b/lib/scripts/compatibility.js @@ -49,7 +49,7 @@ function DEPRECATED_WRAP(func, context) { * @link http://prototype.conio.net/ */ function $() { - DEPRECATED('Please use the JQuery() function instead.'); + DEPRECATED('Please use the jQuery() function instead.'); var elements = new Array(); diff --git a/lib/scripts/page.js b/lib/scripts/page.js index e4033b76d..55a844f0b 100644 --- a/lib/scripts/page.js +++ b/lib/scripts/page.js @@ -43,7 +43,7 @@ dw_page = { * * @param target - the DOM element at which the popup should be aligned at * @param popup_id - the ID of the (new) DOM popup - * @return the Popup JQuery object + * @return the Popup jQuery object */ insituPopup: function(target, popup_id) { // get or create the popup div diff --git a/lib/scripts/qsearch.js b/lib/scripts/qsearch.js index c7128b9e3..a309f9e29 100644 --- a/lib/scripts/qsearch.js +++ b/lib/scripts/qsearch.js @@ -18,8 +18,8 @@ var dw_qsearch = { * * Attaches the event handlers * - * @param input element (JQuery selector/DOM obj) - * @param output element (JQuery selector/DOM obj) + * @param input element (jQuery selector/DOM obj) + * @param output element (jQuery selector/DOM obj) */ init: function (input, output) { var do_qsearch; -- cgit v1.2.3