From 484a501ec53318004052ed9eb089ebb881d77558 Mon Sep 17 00:00:00 2001 From: Hubert Borderiou Date: Mon, 11 Jun 2012 17:10:12 +0200 Subject: [PATCH 1/2] Upload media in long URLchamilo site for advanced editor - ref #3933 --- .../fckeditor/editor/dialog/fck_flash/fck_flash.js | 7 +------ .../fckeditor/editor/dialog/fck_image/fck_image.js | 8 +------- .../fckeditor/editor/dialog/fck_link/fck_link.js | 14 ++------------ .../lib/fckeditor/editor/plugins/MP3/fck_mp3.js | 5 ----- .../fckeditor/editor/plugins/audio/fck_audio.js | 7 ------- .../plugins/fckEmbedMovies/fck_embedmovies.js | 4 ---- .../editor/plugins/flvPlayer/flvPlayer.js | 4 ---- 7 files changed, 4 insertions(+), 45 deletions(-) diff --git a/main/inc/lib/fckeditor/editor/dialog/fck_flash/fck_flash.js b/main/inc/lib/fckeditor/editor/dialog/fck_flash/fck_flash.js index 91469e403f..73a6626c91 100644 --- a/main/inc/lib/fckeditor/editor/dialog/fck_flash/fck_flash.js +++ b/main/inc/lib/fckeditor/editor/dialog/fck_flash/fck_flash.js @@ -234,12 +234,7 @@ function BrowseServer() function SetUrl( url, width, height ) { url = FCK.GetSelectedFlashUrl( url ) ; - // search the URLPrefix like it is the configuration.php file - PrefixeUrl = self.location.href.replace(/\/main\/inc\/lib\/fckeditor\/editor\/dialog\/fck_flash.\html/, ""); - PrefixeUrl = PrefixeUrl.replace(/http:\/\/[^\/]+/, ""); - url = PrefixeUrl + url ; - // - + GetE('txtUrl').value = url ; if ( width ) diff --git a/main/inc/lib/fckeditor/editor/dialog/fck_image/fck_image.js b/main/inc/lib/fckeditor/editor/dialog/fck_image/fck_image.js index fd416f3eac..3a79dca87a 100644 --- a/main/inc/lib/fckeditor/editor/dialog/fck_image/fck_image.js +++ b/main/inc/lib/fckeditor/editor/dialog/fck_image/fck_image.js @@ -437,13 +437,7 @@ var sActualBrowser ; function SetUrl( url, width, height, alt ) { url = FCK.GetSelectedUrl ( url ) ; - - // search the URLPrefix like it is the configuration.php file - /* - PrefixeUrl = self.location.href.replace(/\/main\/inc\/lib\/fckeditor\/editor\/dialog\/fck_image.\html/, ""); - PrefixeUrl = PrefixeUrl.replace(/http:\/\/[^\/]+/, ""); - url = PrefixeUrl + url ; - */ + if ( sActualBrowser == 'Link' ) { GetE('txtLnkUrl').value = url ; UpdatePreview() ; diff --git a/main/inc/lib/fckeditor/editor/dialog/fck_link/fck_link.js b/main/inc/lib/fckeditor/editor/dialog/fck_link/fck_link.js index 59a5388441..cfb3ccec84 100644 --- a/main/inc/lib/fckeditor/editor/dialog/fck_link/fck_link.js +++ b/main/inc/lib/fckeditor/editor/dialog/fck_link/fck_link.js @@ -812,18 +812,8 @@ function BrowseServer() function SetUrl( url ) { -// url = FCK.GetSelectedUrl ( url ) ; - url = FCK.GetUrl( url, FCK.SEMI_ABSOLUTE_URL ) ; - PrefixeUrl = self.location.href.replace(/\/main\/inc\/lib\/fckeditor\/editor\/dialog\/fck_link\.html/, ""); - PrefixeUrl = PrefixeUrl.replace(/http:\/\/[^\/]+/, "") - // if url_append in configuration file != "" (see ticket ref #3933) - if (PrefixeUrl != "") { - url = PrefixeUrl + url; - } - else { - url = FCK.GetSelectedUrl ( url ) ; - } - + url = FCK.GetSelectedUrl ( url ) ; + GetE('cmbLinkProtocol').value = '' ; GetE('txtUrl').value = url ; diff --git a/main/inc/lib/fckeditor/editor/plugins/MP3/fck_mp3.js b/main/inc/lib/fckeditor/editor/plugins/MP3/fck_mp3.js index 6c9028759c..4b9e13cb9a 100644 --- a/main/inc/lib/fckeditor/editor/plugins/MP3/fck_mp3.js +++ b/main/inc/lib/fckeditor/editor/plugins/MP3/fck_mp3.js @@ -238,11 +238,6 @@ function BrowseServer() function SetUrl( url ) { - PrefixeUrl = self.location.href.replace(/\/main\/inc\/lib\/fckeditor\/editor\/plugins\/MP3\/fck_mp3.\html/, ""); - PrefixeUrl = PrefixeUrl.replace(/http:\/\/[^\/]+/, ""); - url = PrefixeUrl + url; - // - document.getElementById('mpUrl').value = url ; //updatePreview(); Ok(); diff --git a/main/inc/lib/fckeditor/editor/plugins/audio/fck_audio.js b/main/inc/lib/fckeditor/editor/plugins/audio/fck_audio.js index 915c869afa..359f2e7eba 100644 --- a/main/inc/lib/fckeditor/editor/plugins/audio/fck_audio.js +++ b/main/inc/lib/fckeditor/editor/plugins/audio/fck_audio.js @@ -230,15 +230,8 @@ function BrowseServer() function SetUrl( url ) { - //url = FCK.GetSelectedUrl( url ) ; url = FCK.GetUrl( url, FCK.SEMI_ABSOLUTE_URL ) ; - PrefixeUrl = self.location.href.replace(/\/main\/inc\/lib\/fckeditor\/editor\/plugins\/audio\/fck_audio.\html/, ""); - PrefixeUrl = PrefixeUrl.replace(/http:\/\/[^\/]+/, ""); - url = PrefixeUrl + url; - // - - GetE('txtUrl').value = url ; UpdatePreview() ; diff --git a/main/inc/lib/fckeditor/editor/plugins/fckEmbedMovies/fck_embedmovies.js b/main/inc/lib/fckeditor/editor/plugins/fckEmbedMovies/fck_embedmovies.js index 00f8a64889..6230249900 100644 --- a/main/inc/lib/fckeditor/editor/plugins/fckEmbedMovies/fck_embedmovies.js +++ b/main/inc/lib/fckeditor/editor/plugins/fckEmbedMovies/fck_embedmovies.js @@ -280,10 +280,6 @@ function BrowseServer() function SetUrl( url ) { url = FCK.GetSelectedUrl( url ) ; - PrefixeUrl = self.location.href.replace(/\/main\/inc\/lib\/fckeditor\/editor\/plugins\/fckEmbedMovies\/fck_embedmovies.\html/, ""); - PrefixeUrl = PrefixeUrl.replace(/http:\/\/[^\/]+/, ""); - url = PrefixeUrl + url; - // GetE( 'txtUrl' ).value = url ; diff --git a/main/inc/lib/fckeditor/editor/plugins/flvPlayer/flvPlayer.js b/main/inc/lib/fckeditor/editor/plugins/flvPlayer/flvPlayer.js index 36de4027ea..89e31ff942 100644 --- a/main/inc/lib/fckeditor/editor/plugins/flvPlayer/flvPlayer.js +++ b/main/inc/lib/fckeditor/editor/plugins/flvPlayer/flvPlayer.js @@ -365,10 +365,6 @@ var sActualBrowser ; function SetUrl( url ) { url = FCK.GetUrl( url, FCK.SEMI_ABSOLUTE_URL ) ; - PrefixeUrl = self.location.href.replace(/\/main\/inc\/lib\/fckeditor\/editor\/plugins\/flvPlayer\/flvPlayer\.html/, ""); - PrefixeUrl = PrefixeUrl.replace(/http:\/\/[^\/]+/, ""); - url = PrefixeUrl + url; - // if ( sActualBrowser == 'flv' ) { From 3e401ea435fb74a60bbed632d011f5d4e4305210 Mon Sep 17 00:00:00 2001 From: Laurent Opprecht Date: Mon, 11 Jun 2012 17:10:22 +0200 Subject: [PATCH 2/2] see #4874 tool announcement: sent to all message is not updated --- main/announcements/announcements.php | 4 ++-- main/announcements/resources/js/main.js | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/main/announcements/announcements.php b/main/announcements/announcements.php index ba7ead6090..89e0e65de6 100644 --- a/main/announcements/announcements.php +++ b/main/announcements/announcements.php @@ -613,7 +613,7 @@ if ($display_form) {
'; if (isset($_GET['id']) && is_array($to)) { - echo ' '; + echo ' '; } elseif (isset($_GET['remind_inactive'])) { $email_ann = '1'; $_SESSION['select_groupusers']="show"; @@ -753,7 +753,7 @@ if ($display_form) { echo '
'; if ((isset($_GET['action']) && isset($_GET['id']) && is_array($to))||isset($_GET['remindallinactives'])||isset($_GET['remind_inactive'])) { - echo ''; + echo ''; } } // displayform diff --git a/main/announcements/resources/js/main.js b/main/announcements/resources/js/main.js index b09449bdd2..6b289486d3 100644 --- a/main/announcements/resources/js/main.js +++ b/main/announcements/resources/js/main.js @@ -9,8 +9,15 @@ function toggle_sendto() { var list = $('#recipient_list'); var overview = $('#recipient_overview'); - list.toggle(); - overview.toggle(); + if(list.css('display') == 'none'){ + list.show(); + overview.hide(); + } + else + { + list.hide(); + overview.show(); + } var selected = $('#selectedform'); var content = list_box_content(selected[0])