Skip to content

Commit

Permalink
fixed ESLint warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
ohine authored and bdukes committed May 15, 2019
1 parent 186a9ae commit 7676fb8
Showing 1 changed file with 12 additions and 19 deletions.
31 changes: 12 additions & 19 deletions DNN Platform/Connectors/GoogleAnalytics/Scripts/connector.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ define(["jquery", "knockout", "templatePath/scripts/config", "templatePath/scrip
window.String.format = !window.String.format ? window.top.String.format : window.String.format;
}

}
};

var onSave = function (conn) {

// Convert boolean to string as the API requires a dictionary of string values
conn.configurations[2].value(conn.configurations[2].value().toString());
conn.configurations[3].value(conn.configurations[3].value().toString());
conn.configurations[4].value(conn.configurations[4].value().toString());
}
};

var onSaveComplete = function (conn, id) {

Expand All @@ -52,19 +52,19 @@ define(["jquery", "knockout", "templatePath/scripts/config", "templatePath/scrip

conn.connected("true");

if (bindViewModel.buttons().length == 1) {
if (bindViewModel.buttons().length === 1) {

activateDeleteButton(conn);

}

}

}
};

var activateDeleteButton = function (conn) {

if (conn.buttons().length == 1) {
if (conn.buttons().length === 1) {

conn.buttons.push({
className: "secondarybtn",
Expand All @@ -81,7 +81,7 @@ define(["jquery", "knockout", "templatePath/scripts/config", "templatePath/scrip

}

}
};

var getActionButtons = function () {

Expand All @@ -94,9 +94,7 @@ define(["jquery", "knockout", "templatePath/scripts/config", "templatePath/scrip
text: utility.resx.Connectors.btn_Save,
action: function (conn, e) {
conn.save(conn, e, onSaveComplete.bind(this, conn, conn.id));
},


}
},

{
Expand All @@ -111,7 +109,7 @@ define(["jquery", "knockout", "templatePath/scripts/config", "templatePath/scrip
conn.save(conn, e, onSaveComplete.bind(this, conn, conn.id));
}
}
]
];

} else {

Expand All @@ -121,23 +119,18 @@ define(["jquery", "knockout", "templatePath/scripts/config", "templatePath/scrip
text: utility.resx.Connectors.btn_Save,
action: function (conn, e) {
conn.save(conn, e, onSaveComplete.bind(this, conn, conn.id));
},


}
}
]


];
}

}
};

return {

init: init,
onSave: onSave,
getActionButtons: getActionButtons

}
};

});

0 comments on commit 7676fb8

Please sign in to comment.