first commit
This commit is contained in:
@@ -0,0 +1 @@
|
||||
document.getElementById('{$photo}').style.display="none";
|
||||
65
_rejestracja/_Admin/template/partial/Image/Form.tpl
Normal file
65
_rejestracja/_Admin/template/partial/Image/Form.tpl
Normal file
@@ -0,0 +1,65 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>''</title>
|
||||
<link rel="stylesheet" type="text/css" href="{$urlStatic}/css/Admin/styleUP.css" />
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Content-Language" content="pl" />
|
||||
|
||||
<script src="{$urlStatic}/script/jQuery/jquery-1.4.2.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="{$urlStatic}/script/ajaxupload.3.5.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
urlStatic = '{$urlStatic}';
|
||||
urlActionUpload = '{url Image=Upload}';
|
||||
{literal}
|
||||
$(function(){
|
||||
var btnUpload=$('#upload');
|
||||
var status=$('#status');
|
||||
new AjaxUpload(btnUpload, {
|
||||
action: urlActionUpload,
|
||||
name: 'uploadfile',
|
||||
onSubmit: function(file, ext){
|
||||
if (! (ext && /^(jpg|png|jpeg|gif|zip)$/.test(ext))){
|
||||
// extension is not allowed
|
||||
status.text('tylko JPG, PNG oraz GIF lub zip');
|
||||
return false;
|
||||
}
|
||||
//alert(urlActionUpload);
|
||||
status.text('Uploading...');
|
||||
},
|
||||
onComplete: function(file, response){
|
||||
//On completion clear the status
|
||||
status.text('');
|
||||
//Add uploaded file to list
|
||||
//alert(response);
|
||||
|
||||
$('#PhotoDisplay', window.parent.document).html(response);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
{/literal}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Upload Button, use any id you wish-->
|
||||
<div id="upload" ><span>Dodaj zdjęcie<span></div><span id="status" ></span>
|
||||
|
||||
<ul id="files" ></ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
1
_rejestracja/_Admin/template/partial/Image/Upload.tpl
Normal file
1
_rejestracja/_Admin/template/partial/Image/Upload.tpl
Normal file
@@ -0,0 +1 @@
|
||||
{foreach from=$arrayPhoto item=file name=photo key=key}<div style="float:left; text-align: center; border:1px solid #000000; margin-right:5px; margin-bottom: 5px"><img src="{$urlStatic}/temp/{$file.th}" alt="test" />{*<textarea name="image_description[{$key}]" rows="1" cols="11"></textarea>*}</div> {/foreach}
|
||||
42
_rejestracja/_Admin/template/partial/Image/UploadImage.tpl
Normal file
42
_rejestracja/_Admin/template/partial/Image/UploadImage.tpl
Normal file
@@ -0,0 +1,42 @@
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
urlStatic = '{$urlStatic}';
|
||||
urlActionUpload = '{url Image=UploadImage}';
|
||||
</script>
|
||||
|
||||
<div class="panelRightTop"></div>
|
||||
|
||||
<div class="panelRightBody">
|
||||
<div class="paddedContent">
|
||||
{dropDownContainer title="Zdjecia"}
|
||||
<!-- Upload Button, use any id you wish-->
|
||||
{*<div id="upload" ><span>Dodaj zdjęcie<span></div><span id="status" ></span>
|
||||
|
||||
<ul id="files" ></ul>*}
|
||||
<form action="{url Image=UploadImage}" method="post" enctype="multipart/form-data" >
|
||||
<input type="file" name="uploadfile" onchange="submit();" />
|
||||
</form>
|
||||
<br />
|
||||
<form action="{url Image=SortImage}" method="post" enctype="multipart/form-data" >
|
||||
<div>
|
||||
{foreach from=$arrayPhoto item=image}
|
||||
<div style="float: left; margin-right: 5px; margin-bottom: 5px;" >
|
||||
<img src="{$urlStatic}/upload/Banner/111/{$image->GetPath()}"/>
|
||||
<div>
|
||||
Kolejność <input name="sort[{$image->GetId()}]" size="3" value="{$image->GetPosition()}" />
|
||||
<a href="{url Image=DeleteImageBanner reload=true photo=$image->GetId()}"><img src="{$urlStatic}/image/Admin/iconDelete.gif" alt="Usuń" title="Usuń" border="0"/></a>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
<div class="clearBoth"></div>
|
||||
{/dropDownContainer}
|
||||
</div>
|
||||
</div>
|
||||
<div class="panelRightBottom">
|
||||
<div class="panelButtons">
|
||||
<input type="submit" class="button buttonZapisz" value="" name="save" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
Reference in New Issue
Block a user