client/js/main.js
changeset 430 d3ae63bc18c6
parent 426 05ed0d95a511
child 433 e457ec945e50
equal deleted inserted replaced
429:6103b7192d38 430:d3ae63bc18c6
   137             this.renderer.redrawUsers();
   137             this.renderer.redrawUsers();
   138         }
   138         }
   139     });
   139     });
   140 
   140 
   141     this.colorPicker = (function() {
   141     this.colorPicker = (function() {
   142         var _tmpl = _.template('<li data-color="<%=c%>" style="background: <%=c%>"></li>');
   142         var _tmpl = renkanJST['templates/colorpicker.html'];
   143         return '<ul class="Rk-Edit-ColorPicker">' + Rkns.pickerColors.map(function(c) { return _tmpl({c:c});}).join("") + '</ul>';
   143         return '<ul class="Rk-Edit-ColorPicker">' + Rkns.pickerColors.map(function(c) { return _tmpl({c:c});}).join("") + '</ul>';
   144     })();
   144     })();
   145 
   145 
   146     if (this.options.show_editor) {
   146     if (this.options.show_editor) {
   147         this.renderer = new Rkns.Renderer.Scene(this);
   147         this.renderer = new Rkns.Renderer.Scene(this);
   148     }
   148     }
   149 
   149 
   150     if (!this.options.search.length) {
   150     if (!this.options.search.length) {
   151         this.$.find(".Rk-Web-Search-Form").detach();
   151         this.$.find(".Rk-Web-Search-Form").detach();
   152     } else {
   152     } else {
   153         var _tmpl = _.template('<li class="<%= className %>" data-key="<%= key %>"><%= title %></li>'),
   153         var _tmpl = renkanJST['templates/search.html'],
   154             _select = this.$.find(".Rk-Search-List"),
   154             _select = this.$.find(".Rk-Search-List"),
   155             _input = this.$.find(".Rk-Web-Search-Input"),
   155             _input = this.$.find(".Rk-Web-Search-Input"),
   156             _form = this.$.find(".Rk-Web-Search-Form");
   156             _form = this.$.find(".Rk-Web-Search-Form");
   157         _(this.options.search).each(function(_search, _key) {
   157         _(this.options.search).each(function(_search, _key) {
   158             if (Rkns[_search.type] && Rkns[_search.type].Search) {
   158             if (Rkns[_search.type] && Rkns[_search.type].Search) {