mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 20:43:25 +00:00
refactored code to use newer version of backbone.js and underscore.js
This commit is contained in:
@@ -16,16 +16,16 @@ define([
|
||||
var DcFieldsView = Backbone.View.extend({
|
||||
tagName: "div",
|
||||
className: "input-append",
|
||||
template: _.template($("#dc_fields_template").html()),
|
||||
initialize: function (options) {
|
||||
this.field = options.field;
|
||||
},
|
||||
render: function () {
|
||||
var template = _.template($("#dc_fields_template").html(), {
|
||||
dces_elements: this.collection.toJSON(),
|
||||
field: this.field.toJSON()
|
||||
});
|
||||
|
||||
this.$el.html(template);
|
||||
this.$el.html(this.template({
|
||||
dces_elements: this.collection.toJSON(),
|
||||
field: this.field.toJSON()
|
||||
})
|
||||
);
|
||||
|
||||
var index = $("#dces-element", this.$el)[0].selectedIndex - 1;
|
||||
if (index > 0) {
|
||||
|
Reference in New Issue
Block a user