Pokus o editaci textu
This commit is contained in:
Vendored
+42
-39
@@ -1,49 +1,52 @@
|
||||
var schemacolor = "#fa8072";
|
||||
|
||||
$(document).ready(function(){
|
||||
$("a").hover(function(){
|
||||
$(this).css("color", schemacolor);
|
||||
}, function(){
|
||||
$(this).css("color", "black");
|
||||
});
|
||||
document.getElementById("jmeno").style.color = schemacolor;
|
||||
$(document).on('change', '.btn-file :file', function() {
|
||||
$("a").hover(function(){
|
||||
$(this).css("color", schemacolor);
|
||||
}, function(){
|
||||
$(this).css("color", "black");
|
||||
});
|
||||
document.getElementById("jmeno").style.color = schemacolor;
|
||||
$(document).on('change', '.btn-file :file', function() {
|
||||
var input = $(this),
|
||||
label = input.val().replace(/\\/g, '/').replace(/.*\//, '');
|
||||
label = input.val().replace(/\\/g, '/').replace(/.*\//, '');
|
||||
input.trigger('fileselect', [label]);
|
||||
});
|
||||
});
|
||||
|
||||
$('.btn-file :file').on('fileselect', function(event, label) {
|
||||
|
||||
var input = $(this).parents('.input-group').find(':text'),
|
||||
log = label;
|
||||
|
||||
if( input.length ) {
|
||||
input.val(log);
|
||||
} else {
|
||||
if( log ) alert(log);
|
||||
}
|
||||
|
||||
});
|
||||
$('.btn-file :file').on('fileselect', function(event, label) {
|
||||
|
||||
});
|
||||
function readURL(input) {
|
||||
if (input.files && input.files[0]) {
|
||||
var reader = new FileReader();
|
||||
|
||||
reader.onload = function (e) {
|
||||
$('#uvodni').attr('src', e.target.result);
|
||||
console.log("Nahrano");
|
||||
}
|
||||
|
||||
reader.readAsDataURL(input.files[0]);
|
||||
}
|
||||
var input = $(this).parents('.input-group').find(':text'),
|
||||
log = label;
|
||||
|
||||
if( input.length ) {
|
||||
input.val(log);
|
||||
} else {
|
||||
if( log ) alert(log);
|
||||
}
|
||||
|
||||
function changeImage(){
|
||||
$("#imgInp").change(function(){
|
||||
readURL(this);
|
||||
});
|
||||
});
|
||||
$("#demo-editor-bootstrap").wysihtml5();
|
||||
});
|
||||
function readURL(input) {
|
||||
if (input.files && input.files[0]) {
|
||||
var reader = new FileReader();
|
||||
|
||||
reader.onload = function (e) {
|
||||
$('#uvodni').attr('src', e.target.result);
|
||||
console.log("Nahrano");
|
||||
}
|
||||
|
||||
reader.readAsDataURL(input.files[0]);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function changeImage(){
|
||||
$("#imgInp").change(function(){
|
||||
readURL(this);
|
||||
});
|
||||
}
|
||||
|
||||
function changeText(){
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user