split the 'colorpicker' template and the 'search' template (list of possible kind of search in the bins) into separate html
authorrougeronj
Fri, 24 Apr 2015 18:01:02 +0200
changeset 430 d3ae63bc18c6
parent 429 6103b7192d38
child 431 1387779706e5
split the 'colorpicker' template and the 'search' template (list of possible kind of search in the bins) into separate html
client/js/main.js
client/templates/colorpicker.html
client/templates/main.html
client/templates/search.html
--- a/client/js/main.js	Fri Apr 24 13:13:24 2015 +0200
+++ b/client/js/main.js	Fri Apr 24 18:01:02 2015 +0200
@@ -139,7 +139,7 @@
     });
 
     this.colorPicker = (function() {
-        var _tmpl = _.template('<li data-color="<%=c%>" style="background: <%=c%>"></li>');
+        var _tmpl = renkanJST['templates/colorpicker.html'];
         return '<ul class="Rk-Edit-ColorPicker">' + Rkns.pickerColors.map(function(c) { return _tmpl({c:c});}).join("") + '</ul>';
     })();
 
@@ -150,7 +150,7 @@
     if (!this.options.search.length) {
         this.$.find(".Rk-Web-Search-Form").detach();
     } else {
-        var _tmpl = _.template('<li class="<%= className %>" data-key="<%= key %>"><%= title %></li>'),
+        var _tmpl = renkanJST['templates/search.html'],
             _select = this.$.find(".Rk-Search-List"),
             _input = this.$.find(".Rk-Web-Search-Input"),
             _form = this.$.find(".Rk-Web-Search-Form");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/templates/colorpicker.html	Fri Apr 24 18:01:02 2015 +0200
@@ -0,0 +1,1 @@
+<li data-color="<%=c%>" style="background: <%=c%>"></li>
\ No newline at end of file
--- a/client/templates/main.html	Fri Apr 24 13:13:24 2015 +0200
+++ b/client/templates/main.html	Fri Apr 24 18:01:02 2015 +0200
@@ -4,20 +4,20 @@
 			<h2 class="Rk-Bins-Title"><%- translate("Select contents:")%></h2>
 			<form class="Rk-Web-Search-Form Rk-Search-Form">
 				<input class="Rk-Web-Search-Input Rk-Search-Input" type="search"
-					placeholder="<%- translate('Search theWeb') %>" />
+					placeholder="<%- translate('Search the Web') %>" />
 				<div class="Rk-Search-Select">
 					<div class="Rk-Search-Current"></div>
 					<ul class="Rk-Search-List"></ul>
 				</div>
 				<input type="submit" value=""
-					class="Rk-Web-Search-Submit Rk-Search-Submit" title="<%- translate('Search theWeb') %>" />
+					class="Rk-Web-Search-Submit Rk-Search-Submit" title="<%- translate('Search the Web') %>" />
 			</form>
 			<form class="Rk-Bins-Search-Form Rk-Search-Form">
 				<input class="Rk-Bins-Search-Input Rk-Search-Input" type="search"
-					placeholder="<%- translate('Search inBins') %>" /> <input
+					placeholder="<%- translate('Search in Bins') %>" /> <input
 					type="submit" value=""
 					class="Rk-Bins-Search-Submit Rk-Search-Submit"
-					title="<%- translate('Search inBins') %>" />
+					title="<%- translate('Search in Bins') %>" />
 			</form>
 		</div>
 		<ul class="Rk-Bin-List"></ul>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/templates/search.html	Fri Apr 24 18:01:02 2015 +0200
@@ -0,0 +1,1 @@
+<li class="<%= className %>" data-key="<%= key %>"><%= title %></li>
\ No newline at end of file