equal
deleted
inserted
replaced
96 var _this = this; |
96 var _this = this; |
97 |
97 |
98 Rkns.__renkans.push(this); |
98 Rkns.__renkans.push(this); |
99 |
99 |
100 this.options = _.defaults(_opts, Rkns.defaults, {templates: renkanJST}); |
100 this.options = _.defaults(_opts, Rkns.defaults, {templates: renkanJST}); |
|
101 this.template = renkanJST['templates/main.html']; |
101 |
102 |
102 _(this.options.property_files).each(function(f) { |
103 _(this.options.property_files).each(function(f) { |
103 Rkns.$.getJSON(f, function(data) { |
104 Rkns.$.getJSON(f, function(data) { |
104 _this.options.properties = _this.options.properties.concat(data); |
105 _this.options.properties = _this.options.properties.concat(data); |
105 }); |
106 }); |
284 this.$.find(".Rk-Bins-Search-Form").submit(function() { |
285 this.$.find(".Rk-Bins-Search-Form").submit(function() { |
285 return false; |
286 return false; |
286 }); |
287 }); |
287 |
288 |
288 }; |
289 }; |
289 |
|
290 Renkan.prototype.template = _.template( |
|
291 '<% if (options.show_bins) { %><div class="Rk-Bins"><div class="Rk-Bins-Head"><h2 class="Rk-Bins-Title"><%- translate("Select contents:")%></h2>' + |
|
292 '<form class="Rk-Web-Search-Form Rk-Search-Form"><input class="Rk-Web-Search-Input Rk-Search-Input" type="search" placeholder="<%- translate("Search the Web") %>" />' + |
|
293 '<div class="Rk-Search-Select"><div class="Rk-Search-Current"></div><ul class="Rk-Search-List"></ul></div>' + |
|
294 '<input type="submit" value="" class="Rk-Web-Search-Submit Rk-Search-Submit" title="<%- translate("Search the Web") %>" /></form>' + |
|
295 '<form class="Rk-Bins-Search-Form Rk-Search-Form"><input class="Rk-Bins-Search-Input Rk-Search-Input" type="search" placeholder="<%- translate("Search in Bins") %>" />' + |
|
296 '<input type="submit" value="" class="Rk-Bins-Search-Submit Rk-Search-Submit" title="<%- translate("Search in Bins") %>" /></form></div>' + |
|
297 '<ul class="Rk-Bin-List"></ul></div><% } %>' + |
|
298 '<% if (options.show_editor) { %><div class="Rk-Render Rk-Render-<% if (options.show_bins) { %>Panel<% } else { %>Full<% } %>"></div><% } %>' |
|
299 ); |
|
300 |
290 |
301 Renkan.prototype.translate = function(_text) { |
291 Renkan.prototype.translate = function(_text) { |
302 if (Rkns.i18n[this.options.language] && Rkns.i18n[this.options.language][_text]) { |
292 if (Rkns.i18n[this.options.language] && Rkns.i18n[this.options.language][_text]) { |
303 return Rkns.i18n[this.options.language][_text]; |
293 return Rkns.i18n[this.options.language][_text]; |
304 } |
294 } |