Skip to content

Commit

Permalink
Auto-format all files to use consistent tab size of 2.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmazzola committed Aug 22, 2016
1 parent c18bb62 commit 4d63a39
Show file tree
Hide file tree
Showing 20 changed files with 1,397 additions and 1,388 deletions.
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Place your settings in this file to overwrite default and user settings.
{
"editor.tabSize": 4,
"editor.insertSpaces": true
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.detectIndentation": false
}
46 changes: 27 additions & 19 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "npm",
"isShellCommand": true,
"showOutput": "always",
"suppressTaskName": true,
"tasks": [
{
"taskName": "build",
"args": ["run", "build"],
"isBuildCommand": true
},
{
"taskName": "test",
"args": ["run", "test", "--", "--chrome"],
"isTestCommand": true
}
]
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "npm",
"isShellCommand": true,
"showOutput": "always",
"suppressTaskName": true,
"tasks": [
{
"taskName": "build",
"args": [
"run",
"build"
],
"isBuildCommand": true
},
{
"taskName": "test",
"args": [
"run",
"test",
"--",
"--chrome"
],
"isTestCommand": true
}
]
}
98 changes: 49 additions & 49 deletions demo/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ $(function () {
customPageNavReport.getPages()
.then(function (pages) {
console.log('pages: ', pages);
if(pages.length > 0) {
if (pages.length > 0) {
const firstPage = pages[0];
firstPage.isActive = true;

Expand Down Expand Up @@ -161,7 +161,7 @@ $(function () {

customFilterPaneReport.on('loaded', function (event) {
createAppliedFiltersPane(null, customFilterPaneReport);

console.log('custom filter pane report loaded');
customFilterPaneReport.getPages()
.then(function (pages) {
Expand Down Expand Up @@ -224,7 +224,7 @@ $(function () {
.each(function (index, element) {
var $element = $(element);
var buttonPage = $element.data('page');
if(buttonPage.isActive) {
if (buttonPage.isActive) {
buttonPage.isActive = false;
$element.removeClass('active');
}
Expand All @@ -235,7 +235,7 @@ $(function () {
.each(function (index, element) {
var $element = $(element);
var buttonPage = $element.data('page');
if(buttonPage.name === newPage.name) {
if (buttonPage.name === newPage.name) {
buttonPage.isActive = true;
$element.addClass('active');
}
Expand Down Expand Up @@ -271,7 +271,7 @@ $(function () {
.data('page', page)
.text(page.displayName);

if(page.isActive) {
if (page.isActive) {
$page.addClass('active');
}

Expand All @@ -287,7 +287,7 @@ $(function () {
var $nextButton = $('#nextbutton');
var $cycleButton = $('#cyclebutton');
var cycleIntervalId;

// When report button is clicked embed the report
$reportsList.on('click', 'button', function (event) {
var button = event.target;
Expand All @@ -300,11 +300,11 @@ $(function () {
})
.then(function (reportWithToken) {
var reportConfig = $.extend({
type: 'report',
settings: {
filterPaneEnabled: false,
navContentPaneEnabled: false
}
type: 'report',
settings: {
filterPaneEnabled: false,
navContentPaneEnabled: false
}
}, reportWithToken);

powerbi.embed($dynamicReportContainer.get(0), reportConfig);
Expand All @@ -323,7 +323,7 @@ $(function () {
$cycleButton.toggleClass('active');
$cycleButton.data('cycle', !$cycleButton.data('cycle'));

if($cycleButton.data('cycle')) {
if ($cycleButton.data('cycle')) {
cycleIntervalId = setInterval(function () {
console.log('cycle page: ');
changePage(true);
Expand Down Expand Up @@ -359,31 +359,31 @@ $(function () {
.each(function (index, element) {
var $element = $(element);
var buttonPage = $element.data('page');
if(buttonPage.isActive) {
if (buttonPage.isActive) {
$activeButtonIndex = index;
}
});

if(forwards) {
if (forwards) {
$activeButtonIndex += 1;
}
else {
$activeButtonIndex -= 1;
}

if($activeButtonIndex > reportButtons.length - 1) {
if ($activeButtonIndex > reportButtons.length - 1) {
$activeButtonIndex = 0;
}
if($activeButtonIndex < 0) {
if ($activeButtonIndex < 0) {
$activeButtonIndex = reportButtons.length - 1;
}

reportButtons
.each(function (index, element) {
if($activeButtonIndex === index) {
if ($activeButtonIndex === index) {
var $element = $(element);
var buttonPage = $element.data('page');

customPageNavReport.setPage(buttonPage.name);
}
});
Expand All @@ -407,41 +407,41 @@ $(function () {
table: "Store",
column: "Name"
}, "And", [
{
operator: "Contains",
value: "Direct"
}
]);
{
operator: "Contains",
value: "Direct"
}
]);

var $predefinedFilter2 = $('#predefinedFilter2');
var predefinedFilter2 = new models.AdvancedFilter({
table: "Store",
column: "Name"
}, "Or", [
{
operator: "Contains",
value: "Wash"
},
{
operator: "Contains",
value: "Park"
}
]);
{
operator: "Contains",
value: "Wash"
},
{
operator: "Contains",
value: "Park"
}
]);

var $predefinedFilter3 = $('#predefinedFilter3');
var predefinedFilter3 = new models.AdvancedFilter({
table: "Store",
column: "Name"
}, "Or", [
{
operator: "Contains",
value: "Wash"
},
{
operator: "Contains",
value: "Park"
}
]);
{
operator: "Contains",
value: "Wash"
},
{
operator: "Contains",
value: "Park"
}
]);

$customFilterForm.on('submit', function (event) {
event.preventDefault();
Expand Down Expand Up @@ -485,14 +485,14 @@ $(function () {
$operatorTypeFields.on('change', function (event) {
var checkedType = $('#customfilterform input[name=operatorType]:checked').val();
console.log('operator change', checkedType);

updateFieldsForOperator(checkedType.toLowerCase());
});

$targetTypeFields.on('change', function (event) {
var checkedTarget = $('#customfilterform input[name=filterTarget]:checked').val();
console.log('target change', checkedTarget);

updateTargetFields(checkedTarget.toLowerCase());
});

Expand Down Expand Up @@ -526,14 +526,14 @@ $(function () {
var filterTypeTarget = {};
filterTypeTarget.table = $('#filtertable').val();

if(filterType === "column") {
if (filterType === "column") {
filterTypeTarget.column = $('#filtercolumn').val();
}
else if(filterType === "hierarchy") {
else if (filterType === "hierarchy") {
filterTypeTarget.hierarchy = $('#filterhierarchy').val();
filterTypeTarget.hierarchyLevel = $('#filterhierarchylevel').val();
}
else if(filterType === "measure") {
else if (filterType === "measure") {
filterTypeTarget.measure = $('#filtermeasure').val();
}

Expand Down Expand Up @@ -571,7 +571,7 @@ $(function () {
var target = {
type: checkedTarget
};

if (checkedTarget === "page") {
target.name = $('#filtertargetpage').val();
}
Expand Down Expand Up @@ -611,7 +611,7 @@ $(function () {
.data('filter', filter)
.html('&times;')
;

var $filterText = $('<div>')
.addClass('filter__text')
.text(JSON.stringify(filter, null, ' '))
Expand Down Expand Up @@ -718,7 +718,7 @@ $(function () {
filters.some(function (filter, i) {
if (JSON.stringify(filter) === JSON.stringify(filterToRemove)) {
index = i;
return true;
return true;
}
});

Expand Down
Loading

0 comments on commit 4d63a39

Please sign in to comment.