Skip to content

Commit 576cd96

Browse files
committed
[sources] update config view
1 parent 185eea8 commit 576cd96

File tree

2 files changed

+5
-39
lines changed

2 files changed

+5
-39
lines changed

plugins/sources/frontend/public/javascripts/countly.views.js

+4-38
Original file line numberDiff line numberDiff line change
@@ -226,44 +226,6 @@ window.KeywordsView = countlyView.extend({
226226
}
227227
});
228228

229-
app.addAppManagementView('sources', jQuery.i18n.map['sources.title'], window.countlyManagementView.extend({
230-
initialize: function() {
231-
this.plugin = 'sources';
232-
this.template = window.Handlebars.compile('<div class="mgmt-plugins-row">' +
233-
' <div>' +
234-
' <label for="bundle" data-localize="sources.length_limit" /> ' +
235-
' <span data-localize="sources.length_limit_explain" />' +
236-
' </div>' +
237-
' <div>' +
238-
' <br />' +
239-
' <input type="number" name="sources_length_limit" value="" />' +
240-
' </div>' +
241-
'</div>');
242-
this.resetTemplateData();
243-
},
244-
245-
beforeRender: function() {
246-
},
247-
248-
afterRender: function() {
249-
this.el.find('input')[0].value = this.templateData.sources_length_limit;
250-
},
251-
252-
resetTemplateData: function() {
253-
this.templateData = {
254-
sources_length_limit: this.config().sources_length_limit || 100
255-
};
256-
},
257-
258-
prepare: function() {
259-
return $.when({
260-
sources: {
261-
sources_length_limit: this.templateData.sources_length_limit || []
262-
}
263-
});
264-
}
265-
}));
266-
267229
//register views
268230
app.sourcesView = new SourcesView();
269231
app.keywordsView = new KeywordsView();
@@ -289,4 +251,8 @@ $(document).ready(function() {
289251
'<div class="text" data-localize="keywords.title"></div>' +
290252
'</a>';
291253
$('#web-type #analytics-submenu').append(menu2);
254+
if(app.configurationsView){
255+
app.configurationsView.registerLabel("sources", "sources.source");
256+
app.configurationsView.registerLabel("sources.sources_length_limit", "sources.length_limit");
257+
}
292258
});

plugins/sources/frontend/public/localization/sources.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sources.source = Source
55
sources.direct = Direct
66
sources.organic = Organic
77
sources.length_limit = Characters length limitation for sources
8-
sources.length_limit_explain = The characters beyond the limitation value will be ignored
8+
configs.help.sources-sources_length_limit = The characters beyond the limitation value will be ignored
99
help.sources.chart = Pie chart on the left shows total visitors from each source (referral URL). Pie chart on the right shows new visitors from each source. The table below shows a breakdown of this data for each source. Click on each line on a table to see a list of paths.
1010
#keywords
1111
keywords.title = Search terms

0 commit comments

Comments
 (0)