Fix existing options to disallow adding/deleting tags

This commit is contained in:
Thomas Bruederli 2014-04-01 18:04:44 +02:00
parent 24a6821749
commit c9717b85d6
2 changed files with 11 additions and 4 deletions

View file

@ -136,7 +136,8 @@
html += '<li class="tagedit-listelement tagedit-listelement-old">';
html += '<span dir="'+options.direction+'">' + $(this).val() + '</span>';
html += '<input type="hidden" name="'+baseName+'['+elementId+']" value="'+$(this).val()+'" />';
html += '<a class="tagedit-close" title="'+options.texts.removeLinkTitle+'">x</a>';
if (options.allowDelete)
html += '<a class="tagedit-close" title="'+options.texts.removeLinkTitle+'">x</a>';
html += '</li>';
}
}
@ -158,7 +159,8 @@
// put an input field at the End
// Put an empty element at the end
html = '<li class="tagedit-listelement tagedit-listelement-new">';
html += '<input type="text" name="'+baseName+'[]" value="" id="tagedit-input" disabled="disabled" class="tagedit-input-disabled" dir="'+options.direction+'"/>';
if (options.allowAdd)
html += '<input type="text" name="'+baseName+'[]" value="" id="tagedit-input" disabled="disabled" class="tagedit-input-disabled" dir="'+options.direction+'"/>';
html += '</li>';
html += '</ul>';

View file

@ -49,7 +49,7 @@
/* Item that is put to the List */
.tagedit span.tag-element,
.tagedit-list li.tagedit-listelement-old {
padding: 3px 0 1px 6px;
padding: 3px 6px 1px 6px;
background: #ddeef5;
background: -moz-linear-gradient(top, #edf6fa 0%, #d6e9f3 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#edf6fa), color-stop(100%,#d6e9f3));
@ -85,11 +85,16 @@
top: -1px;
width: 16px;
height: 16px;
margin: 0 2px 0 6px;
margin: 0 -4px 0 6px;
background: url('data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAOCAYAAAD0f5bSAAAAgUlEQVQoz2NgQAKzdxwWAOIEIG5AwiC+AAM2AJQIAOL3QPwfCwaJB6BrSMChGB0nwDQYwATP3nn4f+Ge4ygKQXyQOJKYAUjTepjAm09fwBimEUTDxJA0rWdANxWmaMXB0xiGwDADurthGkEAmwbqaCLFeWQFBOlBTlbkkp2MSE2wAA8R50rWvqeRAAAAAElFTkSuQmCC') left 1px no-repeat;
cursor: pointer;
}
.tagedit-list li.tagedit-listelement-old span {
display: inline-block;
height: 15px;
}
/** Special hacks for IE7 **/
html.ie7 .tagedit span.tag-element,