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

Proposed by Marcus Tomlinson on 2015-10-27
Status: Merged
Approved by: Marcus Tomlinson on 2015-10-27
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 on 2015-10-27
Review via email: mp+275798@code.launchpad.net

Commit message

Updated class naming in templates

To post a comment you must log in.
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
1=== modified file 'qtc-templates/scope-js/src/displayName.js.in'
2--- qtc-templates/scope-js/src/displayName.js.in 2015-10-22 19:11:39 +0000
3+++ qtc-templates/scope-js/src/displayName.js.in 2015-10-27 06:25:57 +0000
4@@ -62,7 +62,7 @@
5 + scopes.self.scope_config)
6 },
7 search: function(canned_query, metadata) {
8- return new scopes.lib.search_query(
9+ return new scopes.lib.SearchQuery(
10 canned_query,
11 metadata,
12 // run
13@@ -86,10 +86,10 @@
14 @if "%ContentType%" == "http+xml"
15 r = XML.parse(res);
16
17- var category_renderer = new scopes.lib.category_renderer(JSON.stringify(CURRENT_TEMPLATE));
18+ var category_renderer = new scopes.lib.CategoryRenderer(JSON.stringify(CURRENT_TEMPLATE));
19 var category = search_reply.register_category("current", r.city.name + ", " + r.city.country, "", category_renderer);
20
21- var categorised_result = new scopes.lib.categorised_result(category);
22+ var categorised_result = new scopes.lib.CategorisedResult(category);
23 categorised_result.set_uri(r.city.id.toString());
24 categorised_result.set_title(r.temperature.value.toString() + "°C");
25 categorised_result.set_art("http://openweathermap.org/img/w/" + r.weather.icon + ".png");
26@@ -98,10 +98,10 @@
27 @elsif "%ContentType%" == "http+json"
28 r = JSON.parse(res);
29
30- var category_renderer = new scopes.lib.category_renderer(JSON.stringify(CURRENT_TEMPLATE));
31+ var category_renderer = new scopes.lib.CategoryRenderer(JSON.stringify(CURRENT_TEMPLATE));
32 var category = search_reply.register_category("current", r.name + ", " + r.sys.country, "", category_renderer);
33
34- var categorised_result = new scopes.lib.categorised_result(category);
35+ var categorised_result = new scopes.lib.CategorisedResult(category);
36 categorised_result.set_uri(r.id.toString());
37 categorised_result.set_title(r.main.temp.toString() + "°C");
38 categorised_result.set_art("http://openweathermap.org/img/w/" + r.weather[0].icon + ".png");
39@@ -130,12 +130,12 @@
40 @if "%ContentType%" == "http+xml"
41 r = XML.parse(res);
42
43- var category_renderer = new scopes.lib.category_renderer(JSON.stringify(FORECAST_TEMPLATE));
44+ var category_renderer = new scopes.lib.CategoryRenderer(JSON.stringify(FORECAST_TEMPLATE));
45 var category = search_reply.register_category("forecast", "7 day forecast", "", category_renderer);
46
47 var weather_id = 1000000;
48 for (i = 0; i < r.forecast.time.length; i++) {
49- var categorised_result = new scopes.lib.categorised_result(category);
50+ var categorised_result = new scopes.lib.CategorisedResult(category);
51 categorised_result.set_uri((weather_id++).toString());
52 categorised_result.set_title(r.forecast.time[i].temperature.min.toString() + "°C to "
53 + r.forecast.time[i].temperature.max.toString() + "°C");
54@@ -148,11 +148,11 @@
55 @elsif "%ContentType%" == "http+json"
56 r = JSON.parse(res);
57
58- var category_renderer = new scopes.lib.category_renderer(JSON.stringify(FORECAST_TEMPLATE));
59+ var category_renderer = new scopes.lib.CategoryRenderer(JSON.stringify(FORECAST_TEMPLATE));
60 var category = search_reply.register_category("forecast", "7 day forecast", "", category_renderer);
61
62 for (i = 0; i < r.list.length; i++) {
63- var categorised_result = new scopes.lib.categorised_result(category);
64+ var categorised_result = new scopes.lib.CategorisedResult(category);
65 categorised_result.set_uri(r.list[i].weather[0].id.toString());
66 categorised_result.set_title(r.list[i].temp.min.toString() + "°C to "
67 + r.list[i].temp.max.toString() + "°C");
68@@ -182,15 +182,15 @@
69 });
70 },
71 preview: function(result, action_metadata) {
72- return new scopes.lib.preview_query(
73+ return new scopes.lib.PreviewQuery(
74 result,
75 action_metadata,
76 // run
77 function(preview_reply) {
78 @if "%ContentType%" != "empty"
79- var layout1col = new scopes.lib.column_layout(1);
80- var layout2col = new scopes.lib.column_layout(2);
81- var layout3col = new scopes.lib.column_layout(3);
82+ var layout1col = new scopes.lib.ColumnLayout(1);
83+ var layout2col = new scopes.lib.ColumnLayout(2);
84+ var layout3col = new scopes.lib.ColumnLayout(3);
85 layout1col.add_column(["image", "header", "summary"]);
86
87 layout2col.add_column(["image"]);
88@@ -202,14 +202,14 @@
89
90 preview_reply.register_layout([layout1col, layout2col, layout3col]);
91
92- var header = new scopes.lib.preview_widget("header", "header");
93+ var header = new scopes.lib.PreviewWidget("header", "header");
94 header.add_attribute_mapping("title", "title");
95 header.add_attribute_mapping("subtitle", "subtitle");
96
97- var image = new scopes.lib.preview_widget("image", "image");
98+ var image = new scopes.lib.PreviewWidget("image", "image");
99 image.add_attribute_mapping("source", "art");
100
101- var description = new scopes.lib.preview_widget("summary", "text");
102+ var description = new scopes.lib.PreviewWidget("summary", "text");
103 description.add_attribute_mapping("text", "description");
104
105 preview_reply.push([image, header, description ]);

Subscribers

People subscribed via source and target branches

to all changes: