Skip to content

Commit fb82274

Browse files
committed
No need to load js files in javascript directory anymore, they are loaded automatically
1 parent 8ec4a38 commit fb82274

File tree

7 files changed

+8
-36
lines changed

7 files changed

+8
-36
lines changed

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

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*globals countlyView,_,countlyDeviceDetails,countlyDeviceList,marked,addDrill,extendViewWithFilter,hljs,production,countlyUserdata,moment,store,jQuery,countlySession,$,countlyGlobal,Handlebars,countlyCrashes,app,CountlyHelpers,CrashesView,CrashgroupView,countlySegmentation,countlyCommon */
1+
/*globals countlyView,_,countlyDeviceDetails,countlyDeviceList,marked,addDrill,extendViewWithFilter,hljs,countlyUserdata,moment,store,jQuery,countlySession,$,countlyGlobal,Handlebars,countlyCrashes,app,CountlyHelpers,CrashesView,CrashgroupView,countlySegmentation,countlyCommon */
22
window.CrashesView = countlyView.extend({
33
convertFilter: {
44
"sg.crash": {prop: "_id", type: "string"},
@@ -2117,9 +2117,6 @@ $(document).ready(function() {
21172117
countlyCrashes.loadList(appId);
21182118
}
21192119
});
2120-
if (!production) {
2121-
CountlyHelpers.loadJS("crashes/javascripts/marked.min.js");
2122-
}
21232120

21242121
app.addMenu("improve", {code: "crashes", text: "crashes.title", icon: '<div class="logo ion-alert-circled"></div>', priority: 10});
21252122
app.addSubMenu("crashes", {code: "crash", url: "#/crashes", text: "sidebar.dashboard", priority: 10});

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

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*global store, countlyCommon, moment, countlyView, $, countlyGlobal, production, Handlebars, jQuery, app, CountlyHelpers, Backbone, DBViewerView, CountlyDrop, countlyDBviewer*/
1+
/*global store, countlyCommon, moment, countlyView, $, countlyGlobal, Handlebars, jQuery, app, CountlyHelpers, Backbone, DBViewerView, CountlyDrop, countlyDBviewer*/
22
window.DBViewerView = countlyView.extend({
33
initialize: function() {
44
this.dbviewer_selected_app = "all";
@@ -1078,10 +1078,5 @@ app.route('/manage/db/aggregate/:dbs/:collection', 'dbs', function(db, collectio
10781078
});
10791079

10801080
$(document).ready(function() {
1081-
if (!production) {
1082-
CountlyHelpers.loadJS("dbviewer/javascripts/json.human.js");
1083-
CountlyHelpers.loadJS("dbviewer/javascripts/jquery.json-viewer.js");
1084-
}
1085-
10861081
app.addSubMenu("management", {code: "db", url: "#/manage/db", text: "dbviewer.title", priority: 50});
10871082
});

plugins/plugin-upload/frontend/public/javascripts/countly.views.js

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*global countlyView, production, CountlyHelpers,countlyGlobal, app, Handlebars, Dropzone, countlyCommon, jQuery, $ */
1+
/*global countlyView, CountlyHelpers,countlyGlobal, app, Handlebars, Dropzone, countlyCommon, jQuery, $ */
22
window.PluginUploadView = countlyView.extend({
33

44
//need to provide at least empty initialize function
@@ -17,9 +17,6 @@ window.PluginUploadView = countlyView.extend({
1717
refresh: function() {}
1818
});
1919

20-
if (!production) {
21-
CountlyHelpers.loadJS("plugin-upload/javascripts/dropzone.js");
22-
}
2320
/** Function checks file extension. Accept .zip, tar, .tgz, .tar.gz
2421
* @param {string} file - filename
2522
* @returns {boolean} true - if file vaild, false - if not.
@@ -58,9 +55,6 @@ function highlight_my_uploaded_plugin(myname) { //sometimes it gets called a lit
5855
}
5956

6057
if (countlyGlobal.member.global_admin) {
61-
if (!production) {
62-
CountlyHelpers.loadJS("plugin-upload/javascripts/dropzone.js");
63-
}
6458
var myDropzone;
6559

6660
app.addPageScript("/manage/plugins", function() {

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

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*global countlyPopulator, countlyGlobal, store, countlyCommon, $, moment, app, countlyView, Handlebars, jQuery, PopulatorView, CountlyHelpers, production*/
1+
/*global countlyPopulator, countlyGlobal, store, countlyCommon, $, moment, app, countlyView, Handlebars, jQuery, PopulatorView, CountlyHelpers*/
22
window.PopulatorView = countlyView.extend({
33
initialize: function() {
44
},
@@ -197,9 +197,6 @@ app.addAppManagementSwitchCallback(function() {
197197
});
198198

199199
$(document).ready(function() {
200-
if (!production) {
201-
CountlyHelpers.loadJS("populator/javascripts/chance.js");
202-
}
203200
var style = "display:none;";
204201
if (countlyGlobal.member.global_admin || countlyGlobal.admin_apps[countlyCommon.ACTIVE_APP_ID]) {
205202
style = "";

plugins/star-rating/frontend/public/javascripts/countly.views.js

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
/*global $, starRatingPlugin, app, jQuery, CountlyHelpers, starView, store, countlyGlobal, countlyCommon, ClipboardJS, tippy, moment, countlyView, Handlebars, production, path1*/
1+
/*global $, starRatingPlugin, app, jQuery, CountlyHelpers, starView, store, countlyGlobal, countlyCommon, ClipboardJS, tippy, moment, countlyView, Handlebars, path1*/
22
window.starView = countlyView.extend({
33
/**
44
* this variable contains the infos that render view required.
55
* @type {object}
66
*/
77
initialize: function() {
8-
if (!production) {
9-
//For color picker, copy to clipboard feature and tooltip
10-
CountlyHelpers.loadJS("star-rating/javascripts/jquery.colorpicker.js");
11-
CountlyHelpers.loadJS("star-rating/javascripts/clipboard.min.js");
12-
CountlyHelpers.loadJS("star-rating/javascripts/tippy.all.min.js");
13-
}
8+
149
},
1510
templateData: {
1611
"page-title": jQuery.i18n.map["star.menu-title"],

plugins/video-intelligence-monetization/frontend/public/javascripts/countly.views.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*global $, jQuery, app, production, countlyView, countlyCommon, countlyGlobal, Handlebars, CountlyHelpers, countlyMonetization, MonetizationIntegrationView, MonetizationMetricsView, iFrameResize */
1+
/*global $, jQuery, app, countlyView, countlyCommon, countlyGlobal, Handlebars, CountlyHelpers, countlyMonetization, MonetizationIntegrationView, MonetizationMetricsView, iFrameResize */
22

33
window.MonetizationMetricsView = countlyView.extend({
44
templateData: {},
@@ -265,9 +265,6 @@ $(document).ready(function() {
265265
];
266266
var wrapper = '<div class="sidebar-submenu" id="monetization-submenu">' + items.join('') + '</div>';
267267

268-
if (!production) {
269-
CountlyHelpers.loadJS("video-intelligence-monetization/javascripts/iframeResizer.js");
270-
}
271268
if ($('.sidebar-menu #management-menu').length) {
272269
$('.sidebar-menu #management-menu').before(folder + wrapper);
273270
}

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

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*global CountlyHelpers, countlyDashboards, countlyView, _, simpleheat, production, countlySegmentation, ViewsView, ViewFrequencyView, ActionMapView, countlyCommon, countlyTokenManager, addDrill, countlyGlobal, countlySession, countlyViews, Handlebars, app, $, jQuery, moment*/
1+
/*global CountlyHelpers, countlyDashboards, countlyView, _, simpleheat, countlySegmentation, ViewsView, ViewFrequencyView, ActionMapView, countlyCommon, countlyTokenManager, addDrill, countlyGlobal, countlySession, countlyViews, Handlebars, app, $, jQuery, moment*/
22

33
window.ViewsView = countlyView.extend({
44
selectedMetric: "u",
@@ -914,9 +914,6 @@ app.addPageScript("/custom#", function() {
914914
});
915915

916916
$(document).ready(function() {
917-
if (!production) {
918-
CountlyHelpers.loadJS("views/javascripts/simpleheat.js");
919-
}
920917
jQuery.fn.dataTableExt.oSort['view-frequency-asc'] = function(x, y) {
921918
x = countlyViews.getFrequencyIndex(x);
922919
y = countlyViews.getFrequencyIndex(y);

0 commit comments

Comments
 (0)