--- a/src/ldt/ldt/static/ldt/js/projectscontents.js Wed Jan 02 17:03:20 2013 +0100
+++ b/src/ldt/ldt/static/ldt/js/projectscontents.js Mon Jan 07 15:58:48 2013 +0100
@@ -386,7 +386,6 @@
function resize_modal_window (element, createcontent) {
- var nm = parent.$.nmTop();
var iframe = $("iframe", window.parent.document);
if ( $('#init_ldt_view', element).size() > 0) { // if contains ldt lpayer
var h = 660;
@@ -395,17 +394,9 @@
var h = $(element).innerHeight() + 10;
var w = $(element).innerWidth() + 10;
}
-
- nm.sizes.minH = h + 10;
- nm.sizes.minW = w;
+
iframe.height(h);
iframe.width(w);
-
- if ($.browser.mozilla && createcontent) {
- $(".nyroModalCont", parent.window.document).height(h+10);
- } else {
- nm.resize(true);
- }
}
//
@@ -417,11 +408,7 @@
window.submit_asked = false;
window.remove_temp_file_url = remove_url;
window.ask_duration_url = ask_dur_url;
-
- $("#close_button").click(function (e) {
- e.preventDefault();
- parent.$.nmTop().close();
- });
+
$("#submit_button_write").click(function(e) {
$(".submitcontent-loader-content").show();
resize_modal_window($("#add_content"), true);
@@ -438,29 +425,12 @@
// We disable the default submit
$('#my_form').bind('submit', function() {
window.submit_asked = true;
- if($('#id_content-media_input_type').val()=="upload"){
- if(window.upload_from_local_done==false){
- // The form has sent but the uploading has not ended.
- if($('#upload_progress_info').children().size()>0){
- $('#progress_info').remove();
- }
- $('#upload_progress_info').append('<p id="progress_info"><font color="red"><strong>' + wait_label + '.</strong></font><br/><a href="javascript:cancelSwfUpload()">' + cancel_label + '.</a></p>');
- return false;
- }
- else{
- return true;
- }
- }
- else{
- //alert("2. " + $('#id_content-media_input_type').val());
- return true;
- }
+ return true;
});
- $("#upload_progress_bar").css({ width:"90%", height:"10" });
-
$('#media_fields_div').height(80);
}
+
function displayUploadPath(file) {
try {
$('#id_media-local_file_name').val(file.name);
@@ -469,21 +439,6 @@
//this.debug(ex);
}
}
-function uploadProgress(file, bytesLoaded, bytesTotal) {
- try {
- var percent = Math.ceil((bytesLoaded / bytesTotal) * 100);
- $("#upload_progress_bar").progressbar({ value: percent });
- }
- catch (ex) {
- //this.debug(ex);
- }
-}
-function cancelSwfUpload(){
- swfupload.cancelUpload();
- if($('#media_field_upload').has($('#cancelupload')).length==0){
- $('#cancelupload').remove();
- }
-}
// Test the value of the URL from the form to load a picture in case it is a youtube video
function testUrlValue(e){