Created
January 19, 2013 13:18
-
-
Save StasKoval/4572668 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.best_in_place { | |
padding: 10px 80px 0 40px; | |
background-color: #FCC; | |
border: solid 2px #C66; | |
&:first-letter { text-transform: uppercase; } | |
} | |
</style> | |
<div class="row"> | |
<div class="twelve columns"> | |
<div class="nine columns"> | |
<div class="seven columns"> | |
<a href="#" class="th" id="product_image"><%= image_tag @product.image_url.to_s %> </a> | |
<div id="file-uploader2"> | |
<noscript> | |
<p>Please enable JavaScript to use file uploader.</p> | |
<!-- or put a simple form for upload here --> | |
</noscript> | |
</div> | |
<div id="form_edit"> | |
</div> | |
<script> | |
var uploader = new qq.FileUploader({ | |
// pass the dom node (ex. $(selector)[0] for jQuery users) | |
debug: true, | |
element: document.getElementById('file-uploader2'), | |
allowedExtensions: ['jpg', 'jpeg', 'png'], | |
//beforeSend: function(xhr) {xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'))}, | |
// path to server-side upload script | |
action: '/products/<%= @product.id %>/l', | |
onComplete: function(id, fileName, responseJSON){ | |
console.log(responseJSON); | |
$('#product_image img').attr('src', responseJSON.src); | |
} | |
}); | |
</script> | |
</div> | |
<!-- Descritions forms --> | |
<div class="seven columns"> | |
<%= best_in_place @product, :description, type: :textarea %> | |
</div> | |
</div> | |
<!-- User information--> | |
<div class="three columns"> | |
<div class="twelve columns"> | |
<div><p>Название</p><%= best_in_place @product, :title, :type => :input %></div> | |
<label>Категории</label> | |
<input type="text" placeholder="Standard Input"/> | |
<label>Цена (грн.)</label> | |
<input type="text" placeholder="<%= @product.price %> ua"/> | |
</p> | |
</div> | |
</div> | |
</div> | |
</div> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment