@osimatic/helpers-js 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/graphiques.js ADDED
@@ -0,0 +1,281 @@
1
+
2
+ // --------------------------------------------------------------------------------
3
+ // Graphiques (new)
4
+ // --------------------------------------------------------------------------------
5
+
6
+ google.load("visualization", "1", {packages:["corechart"]});
7
+
8
+ $(function() {
9
+ if (typeof(listeAllGraphiqueStats) != 'undefined' && listeAllGraphiqueStats.length > 0) {
10
+ loadListAllGraphStats(listeAllGraphiqueStats);
11
+ }
12
+ });
13
+
14
+ function loadListAllGraphStats(listeAllGraphiqueStats) {
15
+ $.each(listeAllGraphiqueStats, function(idx, listGraphStats) {
16
+ loadAllGraphStats(listGraphStats);
17
+ });
18
+ }
19
+
20
+ function loadAllGraphStats(listGraphStats) {
21
+ if (typeof(initWidth) == 'undefined' || initWidth) {
22
+ console.log('ok');
23
+ var width = 0;
24
+ $.each(listGraphStats, function(idx, tabGraph) {
25
+ if ($('#'+tabGraph.id).length) {
26
+ if ($('#'+tabGraph.id).width() > 0) {
27
+ width = $('#'+tabGraph.id).width();
28
+ }
29
+ }
30
+ });
31
+ }
32
+
33
+ $.each(listGraphStats, function(idx, tabGraph) {
34
+ // console.log(width + ' ' + height);
35
+ drawGraphiqueStat(tabGraph.type_graph, tabGraph.id, tabGraph.title, tabGraph.libelle_abs, tabGraph.tab_data_abs, tabGraph.liste_libelle_ord, tabGraph.liste_tab_data_ord, tabGraph.list_color, tabGraph.format_ord, tabGraph.height, width);
36
+ });
37
+ }
38
+
39
+ function drawGraphiqueStat(typeGraph, idDiv, titre, libelleAbs, tabDataAbsParam, listeLibelleOrd, listeTabDataOrd, tabColor, formatData, height, width) {
40
+ if ($('#'+idDiv).length == 0) {
41
+ return;
42
+ }
43
+
44
+ var afficherLibelleOrd = false;
45
+
46
+ isStacked = false;
47
+ if (typeGraph == 'stacked_bar_chart') {
48
+ typeGraph = 'bar_chart';
49
+ isStacked = true;
50
+ }
51
+ if (typeGraph == 'stacked_column_chart') {
52
+ typeGraph = 'column_chart';
53
+ isStacked = true;
54
+ }
55
+ if (typeGraph == 'stacked_combo_chart') {
56
+ typeGraph = 'combo_chart';
57
+ isStacked = true;
58
+ }
59
+
60
+ isDualChart = false;
61
+ if (typeGraph == 'dual_column_chart') {
62
+ typeGraph = 'column_chart';
63
+ isDualChart = true;
64
+ }
65
+ if (typeGraph == 'dual_bar_chart') {
66
+ typeGraph = 'bar_chart';
67
+ isDualChart = true;
68
+ }
69
+
70
+ // Déclaration du tableau de données
71
+ var data = new google.visualization.DataTable();
72
+ data.addColumn('string', libelleAbs);
73
+ $.each(listeLibelleOrd, function(idx, libelleOrd) {
74
+ data.addColumn('number', libelleOrd);
75
+ });
76
+
77
+ // Remplissage des données
78
+ var nbCells = 0;
79
+ var numRow = 0;
80
+ $.each(tabDataAbsParam, function(idx, dataAbs) {
81
+ // dataOrd = tabDataOrd[idx];
82
+ // data.addRow([dataAbs, dataOrd]);
83
+ data.addRows(1);
84
+
85
+ data.setCell(numRow, 0, dataAbs);
86
+
87
+ var numCell = 1;
88
+ $.each(listeTabDataOrd, function(idx2, tabDataOrd) {
89
+ data.setCell(numRow, numCell, tabDataOrd[idx]);
90
+ numCell++;
91
+ });
92
+
93
+ nbCells = numCell;
94
+ numRow++;
95
+ });
96
+ nbCells -= 2;
97
+
98
+ // console.log(data);
99
+ // console.log('drawGraph : '+idDiv+' ; type : '+typeGraph);
100
+
101
+ // Options générales
102
+ var options = {
103
+ colors: tabColor,
104
+ fontName: 'Trebuchet MS',
105
+ fontSize: 12,
106
+ hAxis: {maxAlternation: 1},
107
+ vAxis: {minValue: 0, textPosition: 'out'},
108
+ //gridlines: {color: '#333', count: 1}
109
+ };
110
+
111
+ if (formatData != null) {
112
+ options.vAxis.format = formatData;
113
+ }
114
+
115
+ // Options sur le titre du graphique
116
+ options.title = titre;
117
+ if (typeGraph == 'pie_chart') {
118
+ // options.titlePosition = 'none';
119
+ }
120
+ else {
121
+ options.titlePosition = 'none';
122
+ }
123
+
124
+ // Options sur la taille du graphique
125
+ if (typeGraph == 'bar_chart') {
126
+ options.chartArea = {left:120, top:30};
127
+ options.chartArea.height = (height-60);
128
+ options.chartArea.width = "85%";
129
+ }
130
+ else {
131
+ options.chartArea = {left:"auto", top:"auto"};
132
+ if (height != null) {
133
+ options.chartArea.height = height+"%";
134
+ }
135
+ else {
136
+ options.chartArea.height = "80%";
137
+ }
138
+ options.chartArea.width = "85%";
139
+ }
140
+ // options.chartArea = {};
141
+ // options.chartArea.height = "100%";
142
+ // options.chartArea.width = "100%";
143
+
144
+
145
+ // console.log($('#'+idDiv).width());
146
+ // options.height = $('#'+idDiv).height();
147
+ // options.width = $('#'+idDiv).width();
148
+ // options.height = height;
149
+ // console.log(height);
150
+ options.width = width;
151
+
152
+
153
+
154
+ // Options sur la légende
155
+ options.legend = {};
156
+ if (typeGraph == 'pie_chart') {
157
+ options.legend.position = 'right';
158
+ }
159
+ else {
160
+ options.legend.position = 'top';
161
+ }
162
+
163
+ // Options sur l'affichage des labels en absisse / ordonnée
164
+ if (typeGraph == 'bar_chart') {
165
+ // options.hAxis.title = libelleOrd;
166
+ options.vAxis.title = libelleAbs;
167
+ }
168
+ else {
169
+ options.hAxis.title = libelleAbs;
170
+ // options.vAxis.title = libelleOrd;
171
+ }
172
+
173
+ // Options sur les graphiques "dual bar chart / dual column chart"
174
+ if (isDualChart) {
175
+ options.series = {};
176
+ options.axes = {};
177
+ if (typeGraph == 'column_chart') {
178
+ options.axes.y = {};
179
+ }
180
+ else {
181
+ options.axes.x = {};
182
+ }
183
+ $.each(listeLibelleOrd, function(idx, libelleOrd) {
184
+ console.log(idx);
185
+ if (idx <= 1) {
186
+ key = 'series_'+idx;
187
+ options.series[idx] = {axis: key};
188
+ if (typeGraph == 'column_chart') {
189
+ options.axes.y[key] = {label: libelleOrd};
190
+ if (idx == 1) {
191
+ options.axes.y[key].side = 'right';
192
+ }
193
+ }
194
+ else {
195
+ options.axes.x[key] = {label: libelleOrd};
196
+ if (idx == 1) {
197
+ options.axes.x[key].side = 'top';
198
+ }
199
+ }
200
+ }
201
+ });
202
+ console.log(options.series);
203
+ console.log(options.axes.y);
204
+ }
205
+
206
+ // Options sur les graphiques "combo chart"
207
+ if (typeGraph == 'combo_chart') {
208
+ options.seriesType = "bars";
209
+ options.series = {};
210
+ options.series[nbCells] = {type: "line"};
211
+ }
212
+
213
+ // Options sur le style des lignes pour les "line chart"
214
+ if (typeGraph == 'line_chart') {
215
+ options.series = [{lineWidth: 3}, {lineWidth: 1.5}];
216
+ options.curveType = 'function';
217
+ }
218
+
219
+ // Options sur le style pour les "pie chart"
220
+ if (typeGraph == 'pie_chart') {
221
+ options.is3D = false;
222
+ options.pieResidueSliceLabel = 'Autre';
223
+ }
224
+
225
+ if (isStacked) {
226
+ options.isStacked = true;
227
+ }
228
+
229
+ // console.log(options);
230
+
231
+ // Création du graphique
232
+ var errorChart = false;
233
+ if (typeGraph == 'column_chart') {
234
+ var chart = new google.visualization.ColumnChart(document.getElementById(idDiv));
235
+ }
236
+ else if (typeGraph == 'bar_chart') {
237
+ var chart = new google.visualization.BarChart(document.getElementById(idDiv));
238
+ }
239
+ else if (typeGraph == 'line_chart') {
240
+ var chart = new google.visualization.LineChart(document.getElementById(idDiv));
241
+ }
242
+ else if (typeGraph == 'combo_chart') {
243
+ var chart = new google.visualization.ComboChart(document.getElementById(idDiv));
244
+ }
245
+ else if (typeGraph == 'pie_chart') {
246
+ var chart = new google.visualization.PieChart(document.getElementById(idDiv));
247
+ }
248
+ else {
249
+ errorChart = true;
250
+ }
251
+
252
+ $('#'+idDiv).removeClass('ajaxLoader');
253
+ $('#'+idDiv).removeClass('graphique_load');
254
+
255
+ if (errorChart) {
256
+ console.log('erreur graphique');
257
+ $('#'+idDiv).addClass('graphique_error');
258
+ document.getElementById(idDiv).innerHTML = 'Une erreur s\'est produite lors du chargement du graphique.';
259
+ }
260
+ else {
261
+ $('#'+idDiv).addClass('graphique');
262
+ document.getElementById(idDiv).innerHTML = '';
263
+
264
+ // $('#'+idDiv).
265
+ // document.getElementById(idDiv).style.display = 'block';
266
+ var hasClassActive = $('#'+idDiv).hasClass('active');
267
+ if (!hasClassActive) {
268
+ $('#'+idDiv).addClass('active');
269
+ }
270
+ google.visualization.events.addListener(chart, 'ready', function () {
271
+ // document.getElementById(idDiv).style.display = 'none';
272
+ // $('#'+idDiv).hide();
273
+ if (!hasClassActive) {
274
+ $('#'+idDiv).removeClass('active');
275
+ }
276
+ });
277
+ // console.log($("ul li.ui-state-active").index()
278
+
279
+ chart.draw(data, options);
280
+ }
281
+ }
@@ -0,0 +1,274 @@
1
+
2
+ class ImportFromCsv {
3
+
4
+ static initModal(modal, importColumns, requestImportData, specificDescDiv, additionalFormField) {
5
+ modal.find('.modal-body').empty().append($('.import_form_base').clone().removeClass('import_form_base hide'));
6
+
7
+ let formUpload = modal.find('.form_upload');
8
+ let formMatching = modal.find('.form_matching');
9
+ let divResult = modal.find('.csv_result');
10
+
11
+ function resetUi() {
12
+ formMatching.addClass('hide');
13
+ formUpload.removeClass('hide');
14
+ formUpload.find('div.errors').addClass('hide');
15
+ }
16
+
17
+ if (typeof specificDescDiv != 'undefined' && specificDescDiv != null) {
18
+ modal.find('.specific_desc').append(specificDescDiv);
19
+ }
20
+
21
+ if (typeof additionalFormField != 'undefined' && additionalFormField != null) {
22
+ modal.find('.import_matching_select_content').after(additionalFormField);
23
+ }
24
+
25
+ formUpload.find('button[type="submit"]').click(function(event) {
26
+ event.preventDefault();
27
+ $(this).buttonLoader('loading');
28
+ formUpload.find('div.errors').addClass('hide');
29
+
30
+ let isFileParsed = false;
31
+ let hasHeader = formUpload.find('input[name="header"][value="1"]:checked').length;
32
+ let encoding = formUpload.find('select[name="encoding"]').val();
33
+
34
+ formUpload.find('input[type="file"]').parse({
35
+ config: {
36
+ header: hasHeader,
37
+ encoding: encoding,
38
+ dynamicTyping: false,
39
+ skipEmptyLines: true,
40
+ beforeFirstChunk: function(chunk) {
41
+ return chunk.trim();
42
+ },
43
+ complete: function(results, file) {
44
+ isFileParsed = true;
45
+ console.log(file, results);
46
+
47
+ if (false === CSV.checkFile(file.name, file.type)) {
48
+ $('#form_import_upload div.errors').html(errorMessageFileNotValid).removeClass('hide');
49
+ return;
50
+ }
51
+
52
+ let parsedImportList = results.data;
53
+ let header = hasHeader?results.meta.fields:results.data[0];
54
+
55
+ ImportFromCsv.displayData(divResult, parsedImportList, (hasHeader?header:null), formMatching);
56
+ ImportFromCsv.displayFormMatching(formMatching, importColumns, header, hasHeader);
57
+
58
+ formUpload.addClass('hide');
59
+ }
60
+ },
61
+ before: function(file, inputElem) {
62
+ },
63
+ error: function(err, file, inputElem, reason) {
64
+ isFileParsed = true;
65
+ formUpload.find('div.errors').html(errorMessageFileNotValid).removeClass('hide');
66
+ console.log(err, file, reason);
67
+ },
68
+ complete: function() {
69
+ if (!isFileParsed) {
70
+ formUpload.find('div.errors').html(errorMessageFileEmpty).removeClass('hide');
71
+ }
72
+ formUpload.find('button[type="submit"]').buttonLoader('reset');
73
+ }
74
+ });
75
+ event.preventDefault();
76
+ });
77
+
78
+ formMatching.find('button[type="submit"]').click(function (event) {
79
+ event.preventDefault();
80
+ $(this).buttonLoader('loading');
81
+ formMatching.find('div.errors').addClass('hide').empty();
82
+ divResult.find('table tr').removeClass('danger');
83
+
84
+ let tabLink = ImportFromCsv.getTabLink(formMatching);
85
+ console.log('tabLink', tabLink);
86
+
87
+ if ($.isEmptyObject(tabLink)) {
88
+ formMatching.find('div.errors').html(errorMessageImportSelectColumns).removeClass('hide');
89
+ $(this).buttonLoader('reset');
90
+ return false;
91
+ }
92
+
93
+ let dataToImport = ImportFromCsv.getDataToImport(divResult, tabLink);
94
+ console.log('dataToImport', dataToImport);
95
+
96
+ requestImportData(dataToImport,
97
+ // fonction callback en cas d'erreur de formulaire
98
+ function (jqxhr) {
99
+ console.log(jqxhr.responseJSON);
100
+ if (typeof jqxhr.responseJSON['import_list'] !== 'undefined') {
101
+ formMatching.find('div.errors').html(jqxhr.responseJSON['import_list']).removeClass('hide');
102
+ }
103
+ else {
104
+ formMatching.find('div.errors').html(ImportFromCsv.getErrorsHtmlOfImportData(jqxhr.responseJSON, divResult)).removeClass('hide');
105
+ }
106
+ formMatching.find('button[type="submit"]').buttonLoader('reset');
107
+ }
108
+ );
109
+ });
110
+
111
+ formMatching.find('a.cancel_link').click(function (event) {
112
+ resetUi();
113
+ });
114
+
115
+ resetUi();
116
+ }
117
+
118
+ static getDataToImport(divResult, tabLink) {
119
+ let importListWithFieldNames = [];
120
+ $.each(divResult.find('table tbody tr'), function(index, line) {
121
+ // console.log('line', line);
122
+ if (!$(line).find('input.import_line_checkbox:checked').length) {
123
+ // if (!divResult.find('table tr[data-line="'+(index+1)+'"] input.import_line_checkbox:checked').length) {
124
+ return;
125
+ }
126
+
127
+ let lineData = {line: (index+1)};
128
+ $.each(tabLink, function(key, listeImportIndex) {
129
+ if (listeImportIndex != -1) {
130
+ var td = $(line).find('td[data-key="'+listeImportIndex+'"]');
131
+ if (td.length) {
132
+ lineData[key] = td.text();
133
+ }
134
+ }
135
+ });
136
+ console.log('lineData', lineData);
137
+ importListWithFieldNames.push(lineData);
138
+ });
139
+ return importListWithFieldNames;
140
+ }
141
+
142
+ static displayData(divResult, data, header, formMatching) {
143
+ let table = divResult.find('table');
144
+ if (table.length === 0) {
145
+ divResult.append('<table class="table table-sm table-bordered"></table>');
146
+ table = divResult.find('table');
147
+ }
148
+ table.empty();
149
+
150
+ let tableContent = '';
151
+ if (null !== header) {
152
+ tableContent += '<thead><tr>';
153
+ //tableContent += '<th><input type="checkbox" class="import_line_select_all" /></th>';
154
+ tableContent += '<th></th>';
155
+ $.each(header, function (index, value) {
156
+ tableContent += '<th>'+value+'</th>';
157
+ });
158
+ tableContent += '<th></th>';
159
+ tableContent += '</tr></thead>';
160
+ }
161
+
162
+ tableContent += '<tbody>';
163
+ $.each(data, function (index, line) {
164
+ tableContent += '<tr data-line="'+(index+1)+'">';
165
+ tableContent += '<td class="gras text-end select_line_checkbox"><input type="checkbox" class="import_line_checkbox pull-left" checked="checked" /> '+(index+1)+'.</td>';
166
+ $.each(line, function (key, value) {
167
+ tableContent += '<td data-key="'+key+'">'+(value!==null?value:'')+'</td>';
168
+ });
169
+ tableContent += '<td class="text-center edit_line_button"></td>';
170
+ tableContent +='</tr>';
171
+ });
172
+ tableContent += '</tbody>';
173
+
174
+ table.html(tableContent);
175
+
176
+ table.find('td.edit_line_button').each(function(idx, el) {
177
+ ImportFromCsv.initEditLink(formMatching, $(el));
178
+ });
179
+
180
+ divResult.removeClass('hide');
181
+ }
182
+
183
+ static initValidateLine(formMatching, td) {
184
+ td.html($('<a href="#" class="import_validate_line text-success"><i class="fas fa-check"></i></a>'));
185
+ td.find('a.import_validate_line').click(function () {
186
+ let tr = $(this).parent().parent();
187
+ tr.find('td').each(function(key, el) {
188
+ let td = $(el);
189
+ if (td.hasClass('select_line_checkbox') || td.hasClass('edit_line_button')) {
190
+ return;
191
+ }
192
+ td.html(td.find('input').val());
193
+ });
194
+
195
+ if (!td.closest('table').find('td input[type="text"]').length) {
196
+ formMatching.find('button[type="submit"]').prop('disabled', false);
197
+ }
198
+ ImportFromCsv.initEditLink(formMatching, td);
199
+ return false;
200
+ });
201
+ }
202
+
203
+ static initEditLink(formMatching, td) {
204
+ td.html($('<a href="#" class="import_edit_line text-danger"><i class="fas fa-pencil-alt"></i></a>'));
205
+ td.find('a.import_edit_line').click(function () {
206
+ let tr = $(this).parent().parent();
207
+ tr.find('td').each(function(key, el) {
208
+ let td = $(el);
209
+ if (td.hasClass('select_line_checkbox') || td.hasClass('edit_line_button')) {
210
+ return;
211
+ }
212
+ td.data('original_value', td.html());
213
+ td.html($('<input type="text" class="form-control" value="'+td.html()+'" />'));
214
+ });
215
+ formMatching.find('button[type="submit"]').prop('disabled', true);
216
+ ImportFromCsv.initValidateLine(formMatching, td);
217
+ return false;
218
+ });
219
+ }
220
+
221
+ static getErrorsHtmlOfImportData(json, divResult) {
222
+ let resultError = errorMessageImportFailed;
223
+ resultError += '<ul>';
224
+ $.each(json, function(idx, errorData) {
225
+ console.log(errorData);
226
+ divResult.find('table tr[data-line="'+errorData.line+'"]').addClass('danger');
227
+
228
+ resultError += '<li>'+lineLabel.format(errorData.line)+'<ul>';
229
+ $.each(errorData.errors, function(index, error) {
230
+ resultError += '<li>'+error+'</li>';
231
+ });
232
+ resultError += '</ul></li>';
233
+ });
234
+ resultError +='</ul>';
235
+ return resultError;
236
+ }
237
+
238
+ static getTabLink(formMatching) {
239
+ let tabLink = {};
240
+ formMatching.find('select').each(function(idx, select) {
241
+ var listeImportIndex = $(select).val();
242
+ if (listeImportIndex != -1) {
243
+ let key = $(select).prop('name');
244
+ tabLink[key] = listeImportIndex;
245
+ }
246
+ });
247
+ return tabLink;
248
+ }
249
+
250
+ static displayFormMatching(formMatching, importColumns, header, hasHeader) {
251
+ let options = '<option value="-1">'+selectDefaultOptionLabel+'</option>';
252
+ $.each(header, function (index, value) {
253
+ options += '<option value="'+(hasHeader?value:index)+'">' + value + '</option>';
254
+ });
255
+
256
+ let selectContent = formMatching.find('.import_matching_select_content').addClass('row').empty();
257
+ $.each(importColumns, function (key, label) {
258
+ let selectFormGroup = $(
259
+ '<div class="form-group col-md-3">' +
260
+ '<label for="form_import_'+key+'">'+label+'</label>' +
261
+ '<select class="form-control" name="'+key+'" id="form_import_'+key+'">'+options+'</select>' +
262
+ '</div>'
263
+ );
264
+ selectFormGroup.find('select option:contains('+label+')').prop('selected', true);
265
+ selectContent.append(selectFormGroup);
266
+ });
267
+
268
+ formMatching.find('div.errors').addClass('hide');
269
+ formMatching.removeClass('hide');
270
+ }
271
+
272
+ }
273
+
274
+ exports.ImportFromCsv = ImportFromCsv;
package/index.js ADDED
@@ -0,0 +1,69 @@
1
+ const network = require('./network.js');
2
+ const bank = require('./bank.js');
3
+ const media = require('./media.js');
4
+ const contactDetails = require('./contact_details.js');
5
+ const countDown = require('./count_down.js');
6
+ const dataTable = require('./data_table.js');
7
+ const dateTime = require('./date_time.js');
8
+ const detailsSubArray = require('./details_sub_array.js');
9
+ const duration = require('./duration.js');
10
+ const file = require('./file.js');
11
+ const flashMessage = require('./flash_message.js');
12
+ const formHelper = require('./form_helper.js');
13
+ const googleMaps = require('./google_maps.js');
14
+ const importFromCsv = require('./import_from_csv.js');
15
+ const jwt = require('./jwt.js');
16
+ const listBox = require('./list_box.js')
17
+ const location = require('./location.js')
18
+ const socialNetwork = require('./social_network.js')
19
+
20
+ exports.HTTPRequest = network.HTTPRequest;
21
+ exports.Cookie = network.Cookie;
22
+ exports.UrlAndQueryString = network.UrlAndQueryString;
23
+
24
+ exports.IBAN = bank.IBAN;
25
+
26
+ exports.AudioMedia = media.AudioMedia;
27
+
28
+ exports.PersonName = contactDetails.PersonName;
29
+ exports.Email = contactDetails.Email;
30
+ exports.TelephoneNumber = contactDetails.TelephoneNumber;
31
+
32
+ exports.CountDown = countDown.CountDown;
33
+
34
+ exports.DataTable = dataTable.DataTable;
35
+
36
+ exports.DateTime = dateTime.DateTime;
37
+ exports.TimestampUnix = dateTime.TimestampUnix;
38
+ exports.SqlDate = dateTime.SqlDate;
39
+ exports.SqlTime = dateTime.SqlTime;
40
+ exports.SqlDateTime = dateTime.SqlDateTime;
41
+ exports.InputPeriod = dateTime.InputPeriod;
42
+
43
+ exports.DetailsSubArray = detailsSubArray.DetailsSubArray;
44
+
45
+ exports.Duration = duration.Duration;
46
+
47
+ exports.File = file.File;
48
+ exports.CSV = file.CSV;
49
+ exports.Img = file.Img;
50
+
51
+ exports.FlashMessage = flashMessage.FlashMessage;
52
+
53
+ exports.FormHelper = formHelper.FormHelper;
54
+
55
+ exports.GoogleMap = googleMaps.GoogleMap;
56
+
57
+ exports.ImportFromCsv = importFromCsv.ImportFromCsv;
58
+
59
+ exports.JwtToken = jwt.JwtToken;
60
+ exports.JwtSession = jwt.JwtSession;
61
+
62
+ exports.ListBox = listBox.ListBox;
63
+
64
+ exports.COUNTRIES_LIST = location.COUNTRIES_LIST;
65
+ exports.Country = location.Country;
66
+ exports.PostalAddress = location.PostalAddress;
67
+ exports.Location = location.Location;
68
+
69
+ exports.SocialNetwork = socialNetwork.SocialNetwork;
package/jquery.js ADDED
@@ -0,0 +1,5 @@
1
+ $.fn.filterByData = function(prop, val) {
2
+ return this.filter(
3
+ function() { return $(this).data(prop)==val; }
4
+ );
5
+ };