Skip to content

Instantly share code, notes, and snippets.

@stoefln
Created July 25, 2011 07:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stoefln/1103686 to your computer and use it in GitHub Desktop.
Save stoefln/1103686 to your computer and use it in GitHub Desktop.
goutte problem
<!DOCTYPE html>
<html xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<title>Veranstaltung erstellen</title>
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
Remove this if you use the .htaccess -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="Eventiply">
<meta name="author" content="Eventiply">
<!-- Mobile viewport optimized: j.mp/bplateviewport -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="/eventiply/web/bundles/ajadoeventhub/images/favicon.png" />
<link rel="apple-touch-icon" href="/eventiply/web/bundles/ajadoeventhub/images/apple-touch-icon.png">
<link rel="stylesheet" type="text/css" href="/eventiply/web/bundles/ajadoeventhub/css/boilerplate.css" media="screen" />
<link rel="stylesheet" type="text/css" href="/eventiply/web/bundles/ajadoeventhub/css/default.css" media="screen" />
<link rel="stylesheet" type="text/css" href="/eventiply/web/bundles/ajadoeventhub/css/backend.css" media="screen" />
<!--[if lt IE 9 ]>
<link rel="stylesheet" type="text/css" href="/eventiply/web/bundles/ajadoeventhub/css/ie8.css" media="screen" />
<![endif]-->
<link rel="stylesheet" type="text/css" href="/eventiply/web/bundles/ajadoeventhub/css/custom-theme/jquery-ui-1.8.11.custom.css" media="screen" />
<!-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects -->
<script type="text/javascript" src="/eventiply/web/bundles/ajadoeventhub/js/modernizr-1.7.min.js"></script>
<script type="text/javascript" src="/eventiply/web/bundles/ajadoeventhub/js/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="/eventiply/web/bundles/ajadoeventhub/js/jquery-ui-1.8.11.custom.min.js"></script>
<script type="text/javascript" src="/eventiply/web/bundles/ajadoeventhub/js/jquery.defaultvalue.js"></script>
<script type="text/javascript" src="/eventiply/web/bundles/ajadoeventhub/js/default.js"></script>
<script type="text/javascript">
var disqus_developer = 1; // this would set it to developer mode
</script>
<link rel="stylesheet" type="text/css" href="/eventiply/web/bundles/ajadoeventhub/js/jquery.tagbox/jquery.tagbox.css" />
<link rel="stylesheet" type="text/css" href="/eventiply/web/bundles/ajadoeventhub/js/jquery.autocomplete/jquery.autocomplete.css" />
<link rel="stylesheet" type="text/css" href="/eventiply/web/bundles/ajadoeventhub/css/event.css" />
<script src="/eventiply/web/bundles/ajadoeventhub/js/jquery.tagbox/jquery.tagbox.js"></script>
<script src="/eventiply/web/bundles/ajadoeventhub/js/jquery.carousel.min.js"></script>
<!-- plupload start -->
<script type="text/javascript" src="http://bp.yahooapis.com/2.4.21/browserplus-min.js"></script>
<script type="text/javascript" src="/eventiply/web/bundles/ajadoeventhub/js/plupload/plupload.js"></script>
<script type="text/javascript" src="/eventiply/web/bundles/ajadoeventhub/js/plupload/plupload.gears.js"></script>
<script type="text/javascript" src="/eventiply/web/bundles/ajadoeventhub/js/plupload/plupload.silverlight.js"></script>
<script type="text/javascript" src="/eventiply/web/bundles/ajadoeventhub/js/plupload/plupload.flash.js"></script>
<script type="text/javascript" src="/eventiply/web/bundles/ajadoeventhub/js/plupload/plupload.browserplus.js"></script>
<script type="text/javascript" src="/eventiply/web/bundles/ajadoeventhub/js/plupload/plupload.html4.js"></script>
<script type="text/javascript" src="/eventiply/web/bundles/ajadoeventhub/js/plupload/plupload.html5.js"></script>
<script type="text/javascript">
// documentation: http://www.plupload.com/plupload/docs/api/index.html
var uploader;
var initEventImageUpload = function(uploadUrl){
uploader = new plupload.Uploader({
runtimes : 'gears,html5,flash,silverlight,browserplus',
browse_button : 'pickfiles',
max_file_size : '10mb',
url : uploadUrl,
flash_swf_url : '/eventiply/web/bundles/ajadoeventhub/js/plupload/plupload.flash.swf',
silverlight_xap_url : '/eventiply/web/bundles/ajadoeventhub/js/pluploadplupload.silverlight.xap',
filters : [
{title : "Image files", extensions : "jpg,gif,png"},
{title : "Zip files", extensions : "zip"}
],
file_data_name: 'documentForm[file]'
});
uploader.bind('Init', function(up, params) {
//$('#filelist').html("<div>Current runtime: " + params.runtime + "</div>");
});
uploader.bind('FilesAdded', function(up, files) {
for (var i in files) {
$('ul.images').prepend('<li class="ready-to-upload" id="' + files[i].id + '"><b>' + files[i].name + '</b> (' + plupload.formatSize(files[i].size) + ')</li>');
};
// why doesn this work:
// up.start();
});
uploader.bind('UploadFile', function(up, file) {
//$('#image-form').append('<input type="hidden" name="file-' + file.id + '" value="' + file.name + '" />');
});
uploader.bind('UploadProgress', function(up, file) {
$('#'+file.id+' b').html('<span>' + file.percent + "%</span>");
});
uploader.bind('UploadComplete', function(up, file){
// var response = eval('(' + data.response + ')');
console.log("uploadcomplete");
$('ul.images').load(document.location.href+' ul.images','',function(){
});
});
$('#uploadfiles').click(function() {
uploader.start();
return false;
});
uploader.init();
}
$(document).ready(function() {
initEventImageUpload('/eventiply/web/app_dev_local.php/users/foo/background-images');
$('a.delete-image').live('click',function(){
jQuery.post($(this).attr('href'),{},function(responseText, textStatus, xhr){
if(xhr.status == 204){ // refresh image list
$('ul.images').load(document.location.href+' ul.images');
}
});
return false;
});
var backgroundSelect = $('#eventForm_backgroundImage');
$('ul.images').selectable({
selected: function(event, ui) {
var imageId = ui.selected.id.split('-').pop();
backgroundSelect.find('option').attr('selected','');
backgroundSelect.find('option[value="'+imageId+'"]').attr('selected','selected');
}
});
var imageId = backgroundSelect.find('option[selected="selected"]').attr('value');
$('ul.images li#image-'+imageId).addClass('ui-selected');
//$('.background-image-selector').dialog({height: 400, maxHeight: 400});
//$('.selector').carousel({ dispItems: 3 });
});
</script>
<style>
.startdate input, .enddate input{
width: 139px;
}
div.background-image{
display: none;
}
ul.images .ui-selected { margib:0px; border: 5px solid #6dc2e7; }
ul.images { list-style-type: none; margin: 0; padding: 0; }
ul.images li { position: relative; border: 5px solid #FFF; float: left; width: 120px; height: 90px; }
ul.images li .delete-image{
position: absolute;
right: 5px;
top: 5px;
display: block;
width: 15px;
height: 15px;
background-image: url('/eventiply/web/bundles/ajadoeventhub/images/remove.png');
}
.form-row div.tagbox span.tag{
margin: 0px;
padding: 0px;
background-color: #FFF;
border: 0;
width: 100%;
}
.form-row div.tagbox span.tag a{
float: right;
background-image: url('/eventiply/web/bundles/ajadoeventhub/images/remove.png');
display: block;
width: 15px;
height: 15px;
}
.selector {
}
.selector .carousel-previous{
left:0;
position:absolute;
top:0;
z-index:30;
}
.selector .carousel-next{
right:0;
position:absolute;
top:0;
z-index:30;
}
</style>
<!-- plupload start -->
</head>
<body>
<div id="container">
<header>
<div id="header">
<div id="logo">
<a href="/eventiply/web/app_dev_local.php/" ><img src="/eventiply/web/bundles/ajadoeventhub/images/logo_be.gif" /></a>
</div>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = (function(originalFunc) {
return function() {
if (originalFunc) originalFunc();
FB.init({"appId":"216760401701682","xfbml":true,"session":true,"status":false,"cookie":true,"logging":true});
};
})(window.fbAsyncInit);
(function() {
var e = document.createElement('script');
e.src = document.location.protocol + "\/\/connect.facebook.net\/en_US\/all.js";
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script>
<script type="text/javascript">
window.fbAsyncInit = (function(originalFunc) {
return function() {
if (originalFunc) originalFunc();
//alert("sdgf");
$('.fb-login-button').after('<fb:login-button perms="email" autologoutlink="1"></fb:login-button>');
$('.fb-login-button').remove();
FB.Event.subscribe('auth.login', function(response) {
// alert("auth.login");
// window.location.href = "/eventiply/web/app_dev_local.php/validate/facebook";
});
FB.getLoginStatus(function(response) {
if (response.session) { // logged in and connected user, someone you know
//alert("logged in");
$('a.logout').click(function(){
FB.logout();
return false;
});
} else { // no user session available, someone you dont know
}
});
//alert("tuut");
};
})(window.fbAsyncInit);
</script>
<div id="menu">
<nav>
<a href="/eventiply/web/app_dev_local.php/event/list" class="item">Alle Events</a>
<a href="/eventiply/web/app_dev_local.php/users/foo/events" class="item">Meine Events</a>
<a href="/eventiply/web/app_dev_local.php/contact/list" class="item">Kontakte</a>
<a href="#" class="item user-options">foo</a>
<ul class="user-option-entries" style="display: none;">
<li>
<div class="date"></div>
<a href="/eventiply/web/app_dev_local.php/logout" class="message">Logout</a>
<hr />
</li>
</ul>
<a href="#" class="unread-log-entry-count">0</a>
<ul class="log-entries" style="display: none;">
<li class="read">
<div class="date">20.2.1999</div>
<a href="#" class="message">Something happened</a>
<hr />
</li>
<li class="unread">
<div class="date">20.2.1999</div>
<a href="#" class="message">Something happened</a>
<hr />
</li>
</ul>
</nav>
</div>
<div class="clearfix"></div>
</div>
</header>
<div id="main" role="main">
<div id="content">
<div id="eventiply-dialog" title="Hinweis"></div>
<div style="clear: both"></div>
<script type="text/javascript">
var startDateInput;
var endDateInput;
function closeDatePopup(dateText,input){
var date1 = startDateInput.datepicker("getDate");
var date2 = endDateInput.datepicker("getDate");
if(date1 > date2 && date2 != null){
date2 = new Date();
date2.setDate(date1.getDate() + 7)
endDateInput.datepicker( "setDate" , date2);
eventiply.alert('Startdatum muss vor dem Enddatum liegen!')
}
}
var dayNamesMin = ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'];
var monthNames = ['J&auml;nner','Februar','M&auml;rz','April','May','Juni','Juli','August','September','Oktober','November','Dezember'];
var config = { dateFormat: "dd.mm.yy", firstDay: 1 , dayNamesMin: dayNamesMin, monthNames: monthNames, onClose: closeDatePopup};
$(document).ready(function(){
startDateInput = $("input#eventForm_startDate_date");
endDateInput = $("input#eventForm_endDate_date");
startDateInput.datepicker(config);
endDateInput.datepicker(config);
});
$(document).ready(function(){
var dialog = new eventiply.AjaxFormDialog({
title: 'Veranstaltungsort hinzufügen',
url: $('a.create-venue').attr('href'),
formId: '#venue-create-form',
successCallback: function(objectHash, dialog){
$('#venue-input').tagBox('setTag',dialog.find('#venue_title').val());
$('#venue-hash').val(objectHash);
dialog.dialog('close');
$('a.create-venue').hide();
}
});
var field = $('#venue-input');
var lastSearchTerm = "";
// bind "add venue" button to some ajax and dialog actions:
$('a.create-venue').click(function() {
dialog.find('#venue_title').val(lastSearchTerm);
dialog.show();
return false;
});
// bind events
field.autocomplete({ // http://jqueryui.com/demos/autocomplete/
//source: '/eventiply/web/app_dev_local.php/venue/search',
minLength: 1,
select: function( event, ui ) {
// if user selected an item in the autocomplete box
if(ui.item){
$('#venue-input').tagBox('setTag',ui.item.value);
$('#venue-hash').val(ui.item.id);;
}
},
source: function( request, response ) {
lastSearchTerm = request.term;
lastXhr = $.getJSON( "/eventiply/web/app_dev_local.php/venue/search", request, function( data, status, xhr ) {
if(data.length < 1){
$('a.create-venue').fadeIn();
}else{
$('a.create-venue').fadeOut();
}
response( data );
});
}
}).data( "autocomplete" )._renderItem = function( ul, item ) { // used to render the items in the autocomplete box
return $( "<li></li>" )
.data( "item.autocomplete", item )
.append( "<a><b>" + item.label + "</b><br>" + item.address + "</a>" )
.appendTo( ul );
};
field.tagBox({
'removeLinkText': ''
});
field.keydown(function(e){ // don't reload the form when user presses return
if(e.keyCode == 13){
return false;
}
});
field.blur(function(e){
$(this).val('');
$('a.create-venue').fadeOut();
});
});
</script>
<h1>Veranstaltung erstellen</h1>
<div class="wrapper">
<div class="box-text">
<form action="/eventiply/web/app_dev_local.php/event/edit/a059c59c" method="post" id="form" enctype="multipart/form-data">
<div class="form-row title">
<label for="eventForm_title">Titel</label>
<input type="text" id="eventForm_title" name="eventForm[title]" value="" />
</div>
<div class="form-row">
<label>Veranstaltungsort</label>
<input type="text" id="venue-input" name="form[venue-text]" value="" />
<a href="/eventiply/web/app_dev_local.php/venue/create" style="display: none;" id="create-venue" class="create-venue button">Veranstaltungsort hinzufügen</a>
<input type="hidden" value="" id="venue-hash" name="form[venue]" />
<div class="clearfix"></div>
</div>
<div class="form-row startdate">
<label>Datum von</label>
<div id="eventForm_startDate"><input type="text" id="eventForm_startDate_date" name="eventForm[startDate][date]" value="" /><input type="text" id="eventForm_startDate_time" name="eventForm[startDate][time]" value="" /></div>
</div>
<div class="form-row enddate">
<label>Datum bis</label>
<div id="eventForm_endDate"><input type="text" id="eventForm_endDate_date" name="eventForm[endDate][date]" value="" /><input type="text" id="eventForm_endDate_time" name="eventForm[endDate][time]" value="" /></div>
</div>
<div class="form-row description">
<label for="eventForm_description">Beschreibung</label>
<textarea id="eventForm_description" name="eventForm[description]"></textarea>
</div>
<div class="form-row background-image">
<label for="eventForm_backgroundImage">Hintergrundbild</label>
<select id="eventForm_backgroundImage" name="eventForm[backgroundImage]"><option value=""></option><option value="8">4e2d141b62938</option><option value="13">4e2d141b6297b</option><option value="1">4e2d141b629a7</option><option value="9">4e2d141b629d5</option><option value="10">4e2d141b629fc</option><option value="7">4e2d141b62a24</option><option value="11">4e2d141b62a4a</option><option value="2">4e2d141b62a85</option><option value="12">4e2d141b62acf</option><option value="14">4e2d141b62b10</option><option value="4">4e2d141b62b50</option><option value="15">4e2d141b62b7c</option></select>
</div>
<div class="background-image-selector">
<div class="selector">
<ul class="images">
<li id="image-1">
<img src="/eventiply/web/app_dev_local.php/imagine/thumbnail/documents//4e299d9dad9f2_hg07_1600x1000.jpg" alt="" width="120" height="90"/>
<a class="delete-image" href=""></a>
</li>
<li id="image-2">
<img src="/eventiply/web/app_dev_local.php/imagine/thumbnail/documents//4e299f92614dd_hg01_1600x1000.jpg" alt="" width="120" height="90"/>
<a class="delete-image" href=""></a>
</li>
<li id="image-4">
<img src="/eventiply/web/app_dev_local.php/imagine/thumbnail/documents//4e29a5518c0e4_hg06_1600x1000.jpg" alt="" width="120" height="90"/>
<a class="delete-image" href=""></a>
</li>
<li id="image-8">
<img src="/eventiply/web/app_dev_local.php/imagine/thumbnail/documents//4e29a68a6ac7c_hg07_1600x1000.jpg" alt="" width="120" height="90"/>
<a class="delete-image" href=""></a>
</li>
<li id="image-9">
<img src="/eventiply/web/app_dev_local.php/imagine/thumbnail/documents//4e2aa57be1383_hg02_1600x1000.jpg" alt="" width="120" height="90"/>
<a class="delete-image" href=""></a>
</li>
<li id="image-10">
<img src="/eventiply/web/app_dev_local.php/imagine/thumbnail/documents//4e2aaa5506d01_hg05_1600x1000.jpg" alt="" width="120" height="90"/>
<a class="delete-image" href=""></a>
</li>
<li id="image-11">
<img src="/eventiply/web/app_dev_local.php/imagine/thumbnail/documents//4e2aaa55c5017_hg04_1600x1000.jpg" alt="" width="120" height="90"/>
<a class="delete-image" href=""></a>
</li>
<li id="image-12">
<img src="/eventiply/web/app_dev_local.php/imagine/thumbnail/documents//4e2aaa56669af_hg03_1600x1000.jpg" alt="" width="120" height="90"/>
<a class="delete-image" href=""></a>
</li>
<li id="image-13">
<img src="/eventiply/web/app_dev_local.php/imagine/thumbnail/documents//4e2aaa57185dc_hg02_1600x1000.jpg" alt="" width="120" height="90"/>
<a class="delete-image" href=""></a>
</li>
<li id="image-14">
<img src="/eventiply/web/app_dev_local.php/imagine/thumbnail/documents//4e2aaa579ca19_hg01_1600x1000.jpg" alt="" width="120" height="90"/>
<a class="delete-image" href=""></a>
</li>
<li id="image-15">
<img src="/eventiply/web/app_dev_local.php/imagine/thumbnail/documents//4e2aaa5815f45_hg06_1600x1000.jpg" alt="" width="120" height="90"/>
<a class="delete-image" href=""></a>
</li>
</ul>
</div>
<div class="clear"></div>
<p>
<a id="pickfiles" href="javascript:;" class="button">anderes Bild verwenden</a>
<a id="uploadfiles" href="javascript:;" class="button">Hochladen</a>
</p>
<div id="filelist"></div>
</div>
<hr />
<div class="form-row image">
<label for="eventForm_image_file">Bild</label>
<input type="file" id="eventForm_image_file" name="eventForm[image][file]" value="" />
</div>
<br />
<input type="submit" id="save-event" name="save-event" value="Veranstaltung speichern"/>
<input type="submit" name="form[view]" value="Vorschau anzeigen"/>
</form>
</div>
&nbsp;
</div>
<div class="clearfix"></div>
</div>
</div>
<footer>
<div class="container">
&copy; 2011 Eventiply//
<a href="#">AGB//</a>
<a href="#">Impressum//</a>
<a href="#">Kontakt//</a>
<a href="#">Blog//</a>
<a href="#">API//</a>
<div class="right">
<a class="twitter" href="http://twitter.com/eventiply"></a>
<a class="facebook" href="http://www.facebook.com/pages/Eventiply/150014001719054"></a><span>find us on </span>
</div>
</div>
</footer>
</div> <!--! end of #container -->
<!-- JavaScript at the bottom for fast page loading -->
<!--[if lt IE 7 ]>
<script src="js/libs/dd_belatedpng.js"></script>
<script>DD_belatedPNG.fix("img, .png_bg"); // Fix any <img> or .png_bg bg-images. Also, please read goo.gl/mZiyb </script>
<![endif]-->
<div id="sfwdt4e2d141c395c5" style="display: none"></div><script type="text/javascript">/*<![CDATA[*/ (function () { var wdt, xhr; wdt = document.getElementById('sfwdt4e2d141c395c5'); if (window.XMLHttpRequest) { xhr = new XMLHttpRequest(); } else { xhr = new ActiveXObject('Microsoft.XMLHTTP'); } xhr.open('GET', '/eventiply/web/app_dev_local.php/_wdt/4e2d141c395c5', true); xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); xhr.onreadystatechange = function(state) { if (4 === xhr.readyState && 200 === xhr.status && -1 !== xhr.responseText.indexOf('sf-toolbarreset')) { wdt.innerHTML = xhr.responseText; wdt.style.display = 'block'; } }; xhr.send(''); })();/*]]>*/</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment