[FIX] website snippet: slider

bzr revid: chm@openerp.com-20131204130740-mk8jtp8p6ip16q1a
This commit is contained in:
Christophe Matthieu 2013-12-04 14:07:40 +01:00
parent 16a544fc6f
commit 58eb518155
1 changed files with 1 additions and 7 deletions

View File

@ -1148,13 +1148,7 @@
website.snippet.editorRegistry.slider = website.snippet.editorRegistry.resize.extend({
drop_and_build_snippet: function() {
var id = 0;
$(".carousel").each(function () {
var _id = +$(this).attr("id").replace(/^[^a-z]+/i, '');
if (id <= _id) {
id = _id + 1;
}
});
var id = $(".carousel").length;
this.id = "myCarousel" + id;
this.$target.attr("id", this.id);
this.$target.find(".carousel-control").attr("href", "#myCarousel" + id);