Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sualko/cloud_piwik.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorsualko <klaus@jsxc.org>2017-01-10 01:15:27 +0300
committersualko <klaus@jsxc.org>2017-01-10 01:15:27 +0300
commit5fc283d33bac1f32a3860acddbc4119da81d0fbb (patch)
treef753d625726bdc0ee3348cf054f8e9489b48a2d3 /js
parentea4640e0842e5e1c62bf33e56177bc6cdbb70e29 (diff)
build v0.2.0-betav0.2.0-beta
Diffstat (limited to 'js')
-rw-r--r--js/settings-admin.js38
-rw-r--r--js/track.js32
2 files changed, 35 insertions, 35 deletions
diff --git a/js/settings-admin.js b/js/settings-admin.js
index 1f5029c..ad0a971 100644
--- a/js/settings-admin.js
+++ b/js/settings-admin.js
@@ -3,33 +3,33 @@
$(function() {
function setValue(data) {
if (data) {
- try {
- data = JSON.parse(data);
- } catch(err) {}
+ try {
+ data = JSON.parse(data);
+ } catch (err) {}
}
data = data || {};
var form = $('#piwikSettings form');
$.each(data, function(name, val) {
- var el = form.find('[name=' + name + ']');
+ var el = form.find('[name=' + name + ']');
- if (el.attr('type') === 'checkbox') {
- el.prop('checked', val === 'yes' || val === 'on');
- } else {
- el.val(val);
- }
+ if (el.attr('type') === 'checkbox') {
+ el.prop('checked', val === 'yes' || val === 'on');
+ } else {
+ el.val(val);
+ }
});
}
if (typeof OCP !== 'undefined') {
- OCP.AppConfig.getValue('piwik', 'piwik', {}, {
- success: function(result) {
- setValue($(result).find('data data').text());
- }
- });
+ OCP.AppConfig.getValue('piwik', 'piwik', {}, {
+ success: function(result) {
+ setValue($(result).find('data data').text());
+ }
+ });
} else {
- OC.AppConfig.getValue('piwik', 'piwik', {}, setValue);
+ OC.AppConfig.getValue('piwik', 'piwik', {}, setValue);
}
$('#piwikUrl').attr('placeholder', 'e.g. //' + window.location.host + '/piwik/');
@@ -38,8 +38,8 @@ $(function() {
var formData = $('#piwikSettings form').serializeArray();
var data = {};
- $.each(formData, function(index, obj){
- data[obj.name] = obj.value;
+ $.each(formData, function(index, obj) {
+ data[obj.name] = obj.value;
});
if (!data.url.match(/\/$/)) {
@@ -47,9 +47,9 @@ $(function() {
}
if (typeof OCP !== 'undefined') {
- OCP.AppConfig.setValue('piwik', 'piwik', JSON.stringify(data));
+ OCP.AppConfig.setValue('piwik', 'piwik', JSON.stringify(data));
} else {
- OC.AppConfig.setValue('piwik', 'piwik', JSON.stringify(data));
+ OC.AppConfig.setValue('piwik', 'piwik', JSON.stringify(data));
}
});
});
diff --git a/js/track.js b/js/track.js
index 9dcfc90..68bd425 100644
--- a/js/track.js
+++ b/js/track.js
@@ -43,14 +43,14 @@ var _paq = _paq || [];
var sharevalue = $('input[name="filename"]').val();
- if(sharevalue) {
- sharevalue = pathparts[3] + ' (' + sharevalue + ')';
+ if (sharevalue) {
+ sharevalue = pathparts[3] + ' (' + sharevalue + ')';
// save share id + share name in slot 3
- _paq.push(['setCustomVariable', '3', 'ShareNodes', sharevalue, 'page']);
- } else {
- sharevalue = pathparts[3];
- }
+ _paq.push(['setCustomVariable', '3', 'ShareNodes', sharevalue, 'page']);
+ } else {
+ sharevalue = pathparts[3];
+ }
// save share id in slot 2
_paq.push(['setCustomVariable', '2', 'Shares', pathparts[3], 'page']);
@@ -66,14 +66,14 @@ var _paq = _paq || [];
}
if (options.trackDir === 'on') {
- // track file browsing
-
- $('#app-content').delegate('>div', 'afterChangeDirectory', function(){
- // update title and url for next page view
- _paq.push(['setDocumentTitle', document.title]);
- _paq.push(['setCustomUrl', window.location.href]);
- _paq.push(['trackPageView']);
- });
+ // track file browsing
+
+ $('#app-content').delegate('>div', 'afterChangeDirectory', function() {
+ // update title and url for next page view
+ _paq.push(['setDocumentTitle', document.title]);
+ _paq.push(['setCustomUrl', window.location.href]);
+ _paq.push(['trackPageView']);
+ });
}
// set piwik options
@@ -81,8 +81,8 @@ var _paq = _paq || [];
_paq.push(['setSiteId', options.siteId]);
if (app !== 'files' || options.trackDir !== 'on') {
- // track page view
- _paq.push(['trackPageView']);
+ // track page view
+ _paq.push(['trackPageView']);
}
if (typeof Piwik === 'undefined') {