Merge lp:~marcustomlinson/unity-js-scopes/template-class-names into lp:unity-js-scopes

Proposed by Marcus Tomlinson
Status: Merged
Approved by: Marcus Tomlinson
Approved revision: 100
Merged at revision: 99
Proposed branch: lp:~marcustomlinson/unity-js-scopes/template-class-names
Merge into: lp:unity-js-scopes
Prerequisite: lp:~abreu-alexandre/unity-js-scopes/fix-classnames-docs
Diff against target: 105 lines (+16/-16)
1 file modified
qtc-templates/scope-js/src/displayName.js.in (+16/-16)
To merge this branch: bzr merge lp:~marcustomlinson/unity-js-scopes/template-class-names
Reviewer Review Type Date Requested Status
Marcus Tomlinson (community) Approve
Review via email: mp+275798@code.launchpad.net

Commit message

Updated class naming in templates

To post a comment you must log in.
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This change is required in order for the fix-classnames-docs MP to merge. Self approving.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'qtc-templates/scope-js/src/displayName.js.in'
--- qtc-templates/scope-js/src/displayName.js.in 2015-10-22 19:11:39 +0000
+++ qtc-templates/scope-js/src/displayName.js.in 2015-10-27 06:25:57 +0000
@@ -62,7 +62,7 @@
62 + scopes.self.scope_config)62 + scopes.self.scope_config)
63 },63 },
64 search: function(canned_query, metadata) {64 search: function(canned_query, metadata) {
65 return new scopes.lib.search_query(65 return new scopes.lib.SearchQuery(
66 canned_query,66 canned_query,
67 metadata,67 metadata,
68 // run68 // run
@@ -86,10 +86,10 @@
86@if "%ContentType%" == "http+xml"86@if "%ContentType%" == "http+xml"
87 r = XML.parse(res);87 r = XML.parse(res);
8888
89 var category_renderer = new scopes.lib.category_renderer(JSON.stringify(CURRENT_TEMPLATE));89 var category_renderer = new scopes.lib.CategoryRenderer(JSON.stringify(CURRENT_TEMPLATE));
90 var category = search_reply.register_category("current", r.city.name + ", " + r.city.country, "", category_renderer);90 var category = search_reply.register_category("current", r.city.name + ", " + r.city.country, "", category_renderer);
9191
92 var categorised_result = new scopes.lib.categorised_result(category);92 var categorised_result = new scopes.lib.CategorisedResult(category);
93 categorised_result.set_uri(r.city.id.toString());93 categorised_result.set_uri(r.city.id.toString());
94 categorised_result.set_title(r.temperature.value.toString() + "°C");94 categorised_result.set_title(r.temperature.value.toString() + "°C");
95 categorised_result.set_art("http://openweathermap.org/img/w/" + r.weather.icon + ".png");95 categorised_result.set_art("http://openweathermap.org/img/w/" + r.weather.icon + ".png");
@@ -98,10 +98,10 @@
98@elsif "%ContentType%" == "http+json"98@elsif "%ContentType%" == "http+json"
99 r = JSON.parse(res);99 r = JSON.parse(res);
100100
101 var category_renderer = new scopes.lib.category_renderer(JSON.stringify(CURRENT_TEMPLATE));101 var category_renderer = new scopes.lib.CategoryRenderer(JSON.stringify(CURRENT_TEMPLATE));
102 var category = search_reply.register_category("current", r.name + ", " + r.sys.country, "", category_renderer);102 var category = search_reply.register_category("current", r.name + ", " + r.sys.country, "", category_renderer);
103103
104 var categorised_result = new scopes.lib.categorised_result(category);104 var categorised_result = new scopes.lib.CategorisedResult(category);
105 categorised_result.set_uri(r.id.toString());105 categorised_result.set_uri(r.id.toString());
106 categorised_result.set_title(r.main.temp.toString() + "°C");106 categorised_result.set_title(r.main.temp.toString() + "°C");
107 categorised_result.set_art("http://openweathermap.org/img/w/" + r.weather[0].icon + ".png");107 categorised_result.set_art("http://openweathermap.org/img/w/" + r.weather[0].icon + ".png");
@@ -130,12 +130,12 @@
130@if "%ContentType%" == "http+xml"130@if "%ContentType%" == "http+xml"
131 r = XML.parse(res);131 r = XML.parse(res);
132132
133 var category_renderer = new scopes.lib.category_renderer(JSON.stringify(FORECAST_TEMPLATE));133 var category_renderer = new scopes.lib.CategoryRenderer(JSON.stringify(FORECAST_TEMPLATE));
134 var category = search_reply.register_category("forecast", "7 day forecast", "", category_renderer);134 var category = search_reply.register_category("forecast", "7 day forecast", "", category_renderer);
135135
136 var weather_id = 1000000;136 var weather_id = 1000000;
137 for (i = 0; i < r.forecast.time.length; i++) {137 for (i = 0; i < r.forecast.time.length; i++) {
138 var categorised_result = new scopes.lib.categorised_result(category);138 var categorised_result = new scopes.lib.CategorisedResult(category);
139 categorised_result.set_uri((weather_id++).toString());139 categorised_result.set_uri((weather_id++).toString());
140 categorised_result.set_title(r.forecast.time[i].temperature.min.toString() + "°C to "140 categorised_result.set_title(r.forecast.time[i].temperature.min.toString() + "°C to "
141 + r.forecast.time[i].temperature.max.toString() + "°C");141 + r.forecast.time[i].temperature.max.toString() + "°C");
@@ -148,11 +148,11 @@
148@elsif "%ContentType%" == "http+json"148@elsif "%ContentType%" == "http+json"
149 r = JSON.parse(res);149 r = JSON.parse(res);
150150
151 var category_renderer = new scopes.lib.category_renderer(JSON.stringify(FORECAST_TEMPLATE));151 var category_renderer = new scopes.lib.CategoryRenderer(JSON.stringify(FORECAST_TEMPLATE));
152 var category = search_reply.register_category("forecast", "7 day forecast", "", category_renderer);152 var category = search_reply.register_category("forecast", "7 day forecast", "", category_renderer);
153153
154 for (i = 0; i < r.list.length; i++) {154 for (i = 0; i < r.list.length; i++) {
155 var categorised_result = new scopes.lib.categorised_result(category);155 var categorised_result = new scopes.lib.CategorisedResult(category);
156 categorised_result.set_uri(r.list[i].weather[0].id.toString());156 categorised_result.set_uri(r.list[i].weather[0].id.toString());
157 categorised_result.set_title(r.list[i].temp.min.toString() + "°C to "157 categorised_result.set_title(r.list[i].temp.min.toString() + "°C to "
158 + r.list[i].temp.max.toString() + "°C");158 + r.list[i].temp.max.toString() + "°C");
@@ -182,15 +182,15 @@
182 });182 });
183 },183 },
184 preview: function(result, action_metadata) {184 preview: function(result, action_metadata) {
185 return new scopes.lib.preview_query(185 return new scopes.lib.PreviewQuery(
186 result,186 result,
187 action_metadata,187 action_metadata,
188 // run188 // run
189 function(preview_reply) {189 function(preview_reply) {
190@if "%ContentType%" != "empty"190@if "%ContentType%" != "empty"
191 var layout1col = new scopes.lib.column_layout(1);191 var layout1col = new scopes.lib.ColumnLayout(1);
192 var layout2col = new scopes.lib.column_layout(2);192 var layout2col = new scopes.lib.ColumnLayout(2);
193 var layout3col = new scopes.lib.column_layout(3);193 var layout3col = new scopes.lib.ColumnLayout(3);
194 layout1col.add_column(["image", "header", "summary"]);194 layout1col.add_column(["image", "header", "summary"]);
195195
196 layout2col.add_column(["image"]);196 layout2col.add_column(["image"]);
@@ -202,14 +202,14 @@
202202
203 preview_reply.register_layout([layout1col, layout2col, layout3col]);203 preview_reply.register_layout([layout1col, layout2col, layout3col]);
204204
205 var header = new scopes.lib.preview_widget("header", "header");205 var header = new scopes.lib.PreviewWidget("header", "header");
206 header.add_attribute_mapping("title", "title");206 header.add_attribute_mapping("title", "title");
207 header.add_attribute_mapping("subtitle", "subtitle");207 header.add_attribute_mapping("subtitle", "subtitle");
208208
209 var image = new scopes.lib.preview_widget("image", "image");209 var image = new scopes.lib.PreviewWidget("image", "image");
210 image.add_attribute_mapping("source", "art");210 image.add_attribute_mapping("source", "art");
211211
212 var description = new scopes.lib.preview_widget("summary", "text");212 var description = new scopes.lib.PreviewWidget("summary", "text");
213 description.add_attribute_mapping("text", "description");213 description.add_attribute_mapping("text", "description");
214214
215 preview_reply.push([image, header, description ]);215 preview_reply.push([image, header, description ]);

Subscribers

People subscribed via source and target branches

to all changes: