blabla
This commit is contained in:
parent
d26773dfd9
commit
fe111c9661
29
SRC/public/css/image-picker.css
Normal file
29
SRC/public/css/image-picker.css
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
ul.thumbnails.image_picker_selector {
|
||||||
|
overflow: auto;
|
||||||
|
list-style-image: none;
|
||||||
|
list-style-position: outside;
|
||||||
|
list-style-type: none;
|
||||||
|
padding: 0px;
|
||||||
|
margin: 0px; }
|
||||||
|
ul.thumbnails.image_picker_selector ul {
|
||||||
|
overflow: auto;
|
||||||
|
list-style-image: none;
|
||||||
|
list-style-position: outside;
|
||||||
|
list-style-type: none;
|
||||||
|
padding: 0px;
|
||||||
|
margin: 0px; }
|
||||||
|
ul.thumbnails.image_picker_selector li.group_title {
|
||||||
|
float: none; }
|
||||||
|
ul.thumbnails.image_picker_selector li {
|
||||||
|
margin: 0px 12px 12px 0px;
|
||||||
|
float: left; }
|
||||||
|
ul.thumbnails.image_picker_selector li .thumbnail {
|
||||||
|
padding: 6px;
|
||||||
|
border: 1px solid #dddddd;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none; }
|
||||||
|
ul.thumbnails.image_picker_selector li .thumbnail img {
|
||||||
|
-webkit-user-drag: none; }
|
||||||
|
ul.thumbnails.image_picker_selector li .thumbnail.selected {
|
||||||
|
background: #0088cc; }
|
@ -250,3 +250,9 @@ background: linear-gradient(to bottom, #a7cfdf 0%,#23538a 100%); /* W3C */
|
|||||||
|
|
||||||
/* Override width of the whole thing */
|
/* Override width of the whole thing */
|
||||||
.chosen-container { width:220px !important; }
|
.chosen-container { width:220px !important; }
|
||||||
|
|
||||||
|
|
||||||
|
/*For image picker rezise*/
|
||||||
|
.thumbnails li img{
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
@ -6,7 +6,6 @@ $('.listeoeuvre').click(function(event) {
|
|||||||
$('#oeuvrePic').empty();
|
$('#oeuvrePic').empty();
|
||||||
url = "/showListOeuvres/" + $(this).children('.idListeOeuvre').val();
|
url = "/showListOeuvres/" + $(this).children('.idListeOeuvre').val();
|
||||||
|
|
||||||
|
|
||||||
var r = new XMLHttpRequest();
|
var r = new XMLHttpRequest();
|
||||||
r.open("GET", url, true);
|
r.open("GET", url, true);
|
||||||
r.onreadystatechange = function () {
|
r.onreadystatechange = function () {
|
||||||
@ -15,12 +14,13 @@ $('.listeoeuvre').click(function(event) {
|
|||||||
var data = JSON.parse(r.response);
|
var data = JSON.parse(r.response);
|
||||||
if (data.length == 0 )
|
if (data.length == 0 )
|
||||||
$("#oeuvrePic").append("Aucune Oeuvre");
|
$("#oeuvrePic").append("Aucune Oeuvre");
|
||||||
|
else {
|
||||||
|
$("#oeuvrePic").append('<select multiple="multiple" id="my_selection" class="image-picker show-html">');
|
||||||
for (el in data)
|
for (el in data)
|
||||||
{
|
{
|
||||||
$("#oeuvrePic").append('<div class="col-xs-4 col-md-3">'
|
$('#my_selection').append('<option data-img-src="http://www.augustins.org/documents/10180/156407/' + data[el].urlPhoto + '" value="'+ data[el].id + '"></option>');
|
||||||
+'<a href="#" class="thumbnail">'
|
$("select").imagepicker();
|
||||||
+'<img src="http://www.augustins.org/documents/10180/156407/' + data[el].urlPhoto + '"/>'
|
}
|
||||||
+'</a></div>');
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
r.send();
|
r.send();
|
||||||
@ -62,18 +62,19 @@ $('#enregistrer').click(function() {
|
|||||||
// Afficher résultat de recherche d'oeuvre
|
// Afficher résultat de recherche d'oeuvre
|
||||||
$('#search_button, #previous, #next').click(function(event) {
|
$('#search_button, #previous, #next').click(function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
if(this.id == $('#next').attr('id') && $("#next").parent().hasClass('disabled') || this.id == $('#previous').attr('id') && $("#previous").parent().hasClass('disabled'))
|
if(this.id == $('#next').attr('id') && $("#next").parent().hasClass('disabled') || this.id == $('#previous').attr('id') && $("#previous").parent().hasClass('disabled'))
|
||||||
return 0;
|
return 0;
|
||||||
if (this.id == $('#next').attr('id')) {
|
if (this.id == $('#next').attr('id')) {
|
||||||
str = $("#next").attr('href');
|
str = $("#next").attr('href');
|
||||||
url = "/search?page="+/([0-9]+)/.exec(/page=([0-9]+)/.exec(str)[0])[0];
|
url = "/search?page="+/([0-9]+)/.exec(/page=([0-9]+)/.exec(str)[0])[0];
|
||||||
}else
|
}else if (this.id == $('#previous').attr('id')) {
|
||||||
if (this.id == $('#previous').attr('id')) {
|
|
||||||
str = $("#previous").attr('href');
|
str = $("#previous").attr('href');
|
||||||
url = "/search?page="+/([0-9]+)/.exec(/page=([0-9]+)/.exec(str)[0])[0];
|
url = "/search?page="+/([0-9]+)/.exec(/page=([0-9]+)/.exec(str)[0])[0];
|
||||||
}else {
|
}else {
|
||||||
url = "/search";
|
url = "/search";
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#oeuvreRes').empty();
|
$('#oeuvreRes').empty();
|
||||||
dataSend = {
|
dataSend = {
|
||||||
_token : $('#_tokenRes').val(),
|
_token : $('#_tokenRes').val(),
|
||||||
@ -85,17 +86,19 @@ dataSend = {
|
|||||||
debut: $('#debut').val(),
|
debut: $('#debut').val(),
|
||||||
fin: $('#fin').val()
|
fin: $('#fin').val()
|
||||||
};
|
};
|
||||||
|
|
||||||
$.post(url,
|
$.post(url,
|
||||||
dataSend,
|
dataSend,
|
||||||
function( data ) {
|
function( data ) {
|
||||||
if (data.length == 0 )
|
if (data.data.length == 0 )
|
||||||
$("#oeuvreRes").append("Aucune Oeuvre Trouvé..");
|
$("#oeuvreRes").append("Aucune Oeuvre Trouvé..");
|
||||||
|
else {
|
||||||
|
$("#oeuvreRes").append('<select multiple="multiple" id="my_researches" class="image-picker show-html">');
|
||||||
data.data.forEach( function(el) {
|
data.data.forEach( function(el) {
|
||||||
$("#oeuvreRes").append('<div class="col-xs-4 col-md-3">'
|
$('#my_researches').append('<option data-img-src="http://www.augustins.org/documents/10180/156407/' + el.urlPhoto + '" value="'+ el.id + '"></option>');
|
||||||
+'<a href="#" class="thumbnail">'
|
$("select").imagepicker();
|
||||||
+'<img src="http://www.augustins.org/documents/10180/156407/' + el.urlPhoto + '"/>'
|
|
||||||
+'</a></div>');
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
if(data.prev_page_url == null) {
|
if(data.prev_page_url == null) {
|
||||||
$("#previous").parent().addClass('disabled');
|
$("#previous").parent().addClass('disabled');
|
||||||
}else {
|
}else {
|
||||||
|
7
SRC/public/js/image-picker.min.js
vendored
Normal file
7
SRC/public/js/image-picker.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -9,6 +9,8 @@
|
|||||||
<link href="/css/app.css" rel="stylesheet">
|
<link href="/css/app.css" rel="stylesheet">
|
||||||
<link href="/css/chosen.min.css" rel="stylesheet">
|
<link href="/css/chosen.min.css" rel="stylesheet">
|
||||||
<link href="/css/game.css" rel="stylesheet" type="text/css"/>
|
<link href="/css/game.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<link href="/css/image-picker.css" rel="stylesheet" type="text/css"/>
|
||||||
|
|
||||||
<!-- Fonts -->
|
<!-- Fonts -->
|
||||||
<link href='//fonts.googleapis.com/css?family=Roboto:400,300' rel='stylesheet' type='text/css'>
|
<link href='//fonts.googleapis.com/css?family=Roboto:400,300' rel='stylesheet' type='text/css'>
|
||||||
|
|
||||||
@ -34,6 +36,10 @@
|
|||||||
|
|
||||||
<!-- Choosen -->
|
<!-- Choosen -->
|
||||||
<script src="/js/chosen.jquery.js" type="text/javascript"></script>
|
<script src="/js/chosen.jquery.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<!-- Scripts Image Picker -->
|
||||||
|
<script type="text/javascript" src="/js/image-picker.min.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var config = {
|
var config = {
|
||||||
'.chosen-select' : {},
|
'.chosen-select' : {},
|
||||||
@ -45,6 +51,7 @@
|
|||||||
for (var selector in config) {
|
for (var selector in config) {
|
||||||
$(selector).chosen(config[selector]);
|
$(selector).chosen(config[selector]);
|
||||||
}
|
}
|
||||||
|
$("select").imagepicker()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,11 +65,14 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
|
||||||
<!-- TAKE ALL THAT'S INSIDE THIS DIV FOR "MY SELECTION" -->
|
<!-- TAKE ALL THAT'S INSIDE THIS DIV FOR "MY SELECTION" -->
|
||||||
<div id="selection">
|
<div id="selection">
|
||||||
<span style="float: right"><a href="">Sélectionner tout</a> -- <a href="">Annuler sélection</a></span><br>
|
<span style="float: right"><a href="">Sélectionner tout</a> -- <a href="">Annuler sélection</a></span><br>
|
||||||
<div class="panel-body" id="oeuvrePic">
|
<div class="panel-body" id="oeuvrePic">
|
||||||
<!-- // TODO -->
|
|
||||||
|
<!-- TODO -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<button style="float: right" class="btn btn-primary" id="enregistrer">Enregistrer</button>
|
<button style="float: right" class="btn btn-primary" id="enregistrer">Enregistrer</button>
|
||||||
<br><br>
|
<br><br>
|
||||||
|
Reference in New Issue
Block a user