-
+
+
+
-
+
+
+
+
+
-
+
@@ -270,7 +315,12 @@
+
+
+
+
+
+
+
diff --git a/js/guimanager.js b/js/guimanager.js
index 8abd3b9..7b23996 100644
--- a/js/guimanager.js
+++ b/js/guimanager.js
@@ -136,6 +136,8 @@ $(document).ready(function() {
var categorieJson = $.extend({}, pronomeJson, aggettivoJson, articoloJson, avverbioJson, preposizioneJson, congiunzioneJson, onomasticacitazioneJson);
+ var categoriaGrammaticaleFiltro='none'
+
$('.tabs__menu-item').on('click', function() {
$(this).addClass('bg-white').addClass('red');
$(this).siblings().removeClass('bg-white').removeClass('red');
@@ -184,11 +186,14 @@ $(document).ready(function() {
sbs.find(".add-details").attr('style', 'display.block')
+ sbs.find(".set-filter").attr('style', 'display.block')
alert(pare.id)
containerid = 'dettaglio_' + pare.id;//$(this).closest('div').attr('id')
sbs.find(".add-details").attr('target', containerid)
+ sbs.find(".set-filter").attr('target', containerid)
//if ($('#types').find(":selected").val()=='verbovolgare'){
+ categoriaGrammaticaleFiltro=$(this).val();
if ($(this).val() == 'verbovolgare') {
var content = jQuery('#categoriaverbo >div'),
@@ -316,7 +321,8 @@ $(document).ready(function() {
if (element === undefined) {
var test = jQuery('#' + containerid)
- sbs.find(".add-details").attr('style', 'display:none')
+ sbs.find(".add-details").attr('style', 'display.none')
+ sbs.find(".set-filter").attr('style', 'display.none')
test.remove()
}
else
@@ -397,6 +403,22 @@ $(document).ready(function() {
return false;
}
});
+ // scrittura del filtro
+ jQuery(document).delegate('a.set-filter', 'click', function(e) {
+ e.preventDefault();
+
+ var content = jQuery('#filtrogrammaticale'),
+ size = jQuery('#filtri >div').length + 1,
+ element = null,
+ element = content.clone();
+ alert(categoriaGrammaticaleFiltro + " "+size)
+ element.attr('id', 'filtro-' + size);
+ element.find('.delete-written-filter').attr('target','filtro-'+size);
+ element.attr('style','display.block');
+ element.appendTo('#filtri');
+
+ })
+
jQuery(document).delegate('a.add-details', 'click', function(e) {
e.preventDefault();