{* $Id$ *} {if !empty($filegals_manager) and !isset($smarty.request.simpleMode)} {assign var=simpleMode value='y'} {else} {assign var=simpleMode value='n'} {/if} {title help="File Galleries" admpage="fgal"}{if $editFileId}{tr}Edit File:{/tr} {$fileInfo.filename}{else}{tr}Upload File{/tr}{/if}{/title} {if !empty($galleryId) or (isset($galleries) and count($galleries) > 0 and $tiki_p_list_file_galleries eq 'y') or (isset($uploads) and count($uploads) > 0)}
{/if} {if isset($errors) and count($errors) > 0}|
|
{if !empty($filegals_manager) && $prefs.javascript_enabled === 'y'} {$uploads[ix].name} ({$uploads[ix].size|kbsize}) {else} {$uploads[ix].name} ({$uploads[ix].size|kbsize}) {/if} {if $prefs.javascript_enabled === 'y'} {button href="#" _flip_id="uploadinfos"|cat:$uploads[ix].fileId _text="{tr}Additional Info{/tr}"} {/if} |
{tr}Uploading file...{/tr}");
$( document ).ajaxError(function(event, jqxhr, ajaxSettings, thrownError ) {
$progress.hide();
show('form');
$("#form").showError(tr("File upload error:") + " " + thrownError)
});
$(this).submit();
this.reset();
} else {
$('#progress_'+n).html("{tr}No File to Upload...{/tr} ");
}
});
hide('form');
}
{/jq}
{/if}
{if not $editFileId and $prefs.fgal_upload_from_source eq 'y' and $tiki_p_upload_files eq 'y'}
{jq}
$('.remote-upload').submit(function () {
var form = this;
// use the current value of the galleryId selector
$('input[name=galleryId]', form).val($('#galleryId').val());
$.ajax({
method: 'POST',
url: $(form).attr('action'),
data: $(form).serialize(),
dataType: 'html',
success: function (data) {
$('.result', form).html(data);
$(form.url).val('');
},
complete: function () {
$('input', form).prop('disabled', false);
},
error: function (e) {
alert(tr("A remote file upload error occurred:") + "\n\"" + e.statusText + "\" (" + e.status + ")");
}
});
$('input', this).prop('disabled', true);
return false;
});
{/jq}
{if $prefs.vimeo_upload eq 'y'}
{jq}
var handleVimeoFile = function (link, data) {
if (data != undefined) {
$("#form").hide();
$("#progress").append(
$("{tr}Video file uploaded:{/tr} " + data.file + "
") .prepend($("