admin_owngallery.phtml
3.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<div class="anc-image-owngallery">
<?php Mage::getSingleton('core/session', array('name'=>'adminhtml'));
if(Mage::getSingleton('admin/session')->isLoggedIn()): ?>
<div class="col2-set">
<div class="col-1">
<div class="anc-image-owngallery-main">neues Bild hochladen</div>
<div class="anc-image-owngallery-content">
<?php $dropzone_id = 'ancimage-dropzone-id'.$DropzoneIndex; ?>
<?php $ancnote_id = 'ancnote-id'; ?>
<div id="<?php echo $ancnote_id; ?>"></div>
<div id="<?php echo $dropzone_id; ?>" class="dropzone ancimage-dropzone" title="Bitte ziehen Sie aus Ihrer Galerie oder Ihrem Dateiexplorer einfach ein Bild in diesen Bereich!">
<div class="preview-database-image">
Lassen Sie hier Ihr Bild fallen!<br />
</div>
</div>
<?php
$params=$this->getRequest()->getParams();
// D::s($params,'$params',5,1,1);
$urlUploadImage= $this->getUrl('image/adminhtml_administrator/uploadImage', array('album_id'=>$params['id']));
$formkey= Mage::getSingleton('core/session')->getFormKey();
?>
<script type="text/javascript">
jQuery(document).ready(function($) {
Anc_Image_Typeadmin.droppableFile(
jQuery(" #<?php echo $dropzone_id; ?>"),
null,
"<?php echo $urlUploadImage; ?>",
jQuery(" #<?php echo $ancnote_id; ?>"),
"<?php echo $this->getUrl('image/adminhtml_administrator/simpleowngallery', array()) ?> ul.gallery",
"<?php echo $formkey?>"
);
});
</script>
</div>
<div class="anc-image-owngallery-main">Meine Bilder (alpha)</div>
<div class="anc-image-owngallery-content">
<div class="anc-image-owngallery-content-view">
<?php echo $this->getChildHtml('simpleadmingallery') ?>
</div>
</div>
</div>
<div class="col-2">
<div class="anc-image-owngallery-form">
<div class="anc-image-owngallery-main">Bilddaten</div>
<div class="anc-image-owngallery-content" id="anc-image-owngallery-form-content"></div>
</div>
</div>
</div>
<script type="text/javascript">
jQuery(document).ready(function($) {
// jQuery("a[rel^='prettyPhoto']").prettyPhoto({});
jQuery('a.ancimage-showNcImageForm').unbind("click").click(function(e){
e.preventDefault();
jQuery(".anc-image-owngallery * #anc-image-owngallery-form-content").load(jQuery(this).data('site'), function() {
jQuery('#ancimage-customer_showNcImageFormDelete').submit(function() { // catch the form's submit event
jQuery.ajax({ // create an AJAX call...
data: jQuery(this).serialize(), // get the form data
type: jQuery(this).attr('method'), // GET or POST
url: jQuery(this).attr('action'), // the file to call
success: function(response) { // on success..
jQuery('.anc-image-owngallery * #anc-image-owngallery-form-content').html(response); // update the DIV
}
});
return false; // cancel original event to prevent form submitting
});
jQuery('#ancimage-customer_showNcImageForm').submit(function() { // catch the form's submit event
jQuery.ajax({ // create an AJAX call...
data: jQuery(this).serialize(), // get the form data
type: jQuery(this).attr('method'), // GET or POST
url: jQuery(this).attr('action'), // the file to call
success: function(response) { // on success..
jQuery('.anc-image-owngallery * #anc-image-owngallery-form-content').html(response); // update the DIV
}
});
return false; // cancel original event to prevent form submitting
});
});
});
});
</script>
<?php else: ?>
<h1>Bitte loggen Sie sich ein!</h1>
<?php endif; ?>
</div>