customer_galleriesown.phtml 4.39 KB
<!--/** 
	 * wird geladen wenn der eingabetyp @see @anc_text_eingabetyp genutzt wird
	 * @package	anc_text 
	 * @since	20140425
	 * @author	netz.coop eG* 
	 */ /html/body/div/div/div[2]/div/div[1]/div/div/div[2]/div/div[2]/div/div/div[1]/div[2]/div
html body.anc-text-customer-galleriesmanager div.wrapper div.page div.main-container.col2-right-layout div.main div.col-main div.anctext-customer_galleriesmanager div.col2-set div.col-2 div.anctext-customer_galleries.anc-menu-box div#accordion.anc-menu-box-content.ui-accordion.ui-widget.ui-helper-reset div#ui-id-2.anc-menu-box-content-subcontent.ui-accordion-content.ui-helper-reset.ui-widget-content.ui-corner-bottom.ui-accordion-content-active div.anctext-customer_galleriesown div.anctext-gallerie-subheader div div#createtext
html body.anc-text-customer-galleriesmanager div.wrapper div.page div.main-container.col2-right-layout div.main div.col-main div.anctext-customer_galleriesmanager div.col2-set div.col-2 div.anctext-customer_galleries.anc-menu-box div#accordion.anc-menu-box-content.ui-accordion.ui-widget.ui-helper-reset div#ui-id-2.anc-menu-box-content-subcontent.ui-accordion-content.ui-helper-reset.ui-widget-content.ui-corner-bottom.ui-accordion-content-active  div#createtext
html body.anc-text-customer-galleriesmanager div.wrapper div.page div.main-container.col2-right-layout div.main div.col-main div.anctext-customer_galleriesmanager div.col2-set div.col-2 div.anctext-customer_galleries.anc-menu-box div#accordion.anc-menu-box-content.ui-accordion.ui-widget.ui-helper-reset div#ui-id-2.anc-menu-box-content-subcontent.ui-accordion-content.ui-helper-reset.ui-widget-content.ui-corner-bottom.ui-accordion-content-active div.anctext-customer_galleriesown div.anctext-gallerie-subheader.createtext
-->
<script  type="text/javascript">
	function ajax_createtexts(ncinput_id) {
			var ajax_edittext_data = {
				url: "<?php echo Mage::getUrl('anctext/customer/savecustomertext'); ?>",
				method: 'Post',
				//			dataType:"json",
				data: {ncinput_id: 0,new:'new'},
				success: function(data, textStatus, jqXhr) {
					console.log(data);
					var parseddata = jQuery.parseJSON(data);
					console.log(parseddata);
					jQuery("#<?php echo $input_id; ?>").attr('value', parseddata.id);
//					if (ifredirectAfterSubmit) {
//						ajax_gettextinfo(parseddata.id)
//						
////											redirectAfterSubmit(data, url, backurl);
//					}
					
				}
			};
			jQuery.ajax(ajax_edittext_data);

		}
	
	
	
				var gallery_ajaxData = {
							url: "<?php echo $this->getUrl('anctext/customer/gallerysimple', array()) ?>  ul.gallery",
							context: jQuery(".anctext-customer_galleriesown > .anctext-gallerie-content > .anctext-gallerie-content-view"),
							success: function(reponse) {
								// damit die gallerie auch klickbar ist
								loadNcTextIntoFormThumbnailButton();
								// damit hochgeladenes Bild auch im Formular gleich angezeigt wird

										loadNcTextIntoForm('<?php echo $this->getUrl('anctext/customer/showNcTextForm', array()) ?>id/'+reponse.id+'/');
							},
						};
</script>
		<!--<div  id="createtext" onclick="ajax_createtexts(0)">><span>Text erstellen</span></div>-->
		<!--jQuery('.anctext-gallerie-subheader').append('<div id="createtext" ><span>Text erstellen</span></div>');-->
<div class="anctext-customer_galleriesown">
	<div  class="anctext-gallerie-subheader">

			
		<?php if($this->getSelectorIdDropzoneOwn()): ?>
			<div id="<?php echo $this->getSelectorIdDropzoneOwn(); ?>"  class="dropzone anctext-dropzone" title="Bitte ziehen Sie aus Ihrer Galerie oder Ihrem Dateiexplorer einfach ein Bild in diesen Bereich!"></div>
		<?php else: ?> 
			<div>&nbsp;</div>			
		<?php endif; ?>		
		<div class="anctext-gallerie-subheader-category"></div>
	</div>
	<div class="anctext-gallerie-content">
		<?php if(Mage::getSingleton('customer/session')->isLoggedIn()): ?>
			<!-- Anzeige der Daten -->
			<div class="anctext-gallerie-content-view">
				<?php $customer = Mage::getSingleton('customer/session')->getCustomer(); ?>
				<?php $ncalbum_id = Mage::getModel('anc_album/ncalbum')->load($customer->getId(), 'customer_id')->getId(); ?>
				<?php  echo $this->setTemplate('anc/text/customer_gallerysimple.phtml')->setNcalbumId($ncalbum_id)->toHtml(); ?>
			</div> 
		<?php else: ?> 
			<div id="ancnote" class="anc-error">Sie sind nicht angemeldet!<br/>Nutzen Sie die Vorzüge eines eigenen Textmoduls in der Sie Ihre Texte verwalten können!</div>
		<?php endif; ?>				
	</div>
</div>