mirror of
https://github.com/Mibew/mibew.git
synced 2025-05-15 16:04:22 +03:00
Fix js code style
This commit is contained in:
parent
aa94e21602
commit
7a16536341
@ -416,7 +416,7 @@ var Mibew = Mibew || {};
|
|||||||
this.toggleDiv.className = 'mibew-chat-frame-toggle mibew-chat-frame-toggle-on';
|
this.toggleDiv.className = 'mibew-chat-frame-toggle mibew-chat-frame-toggle-on';
|
||||||
Mibew.Utils.addEventListener(this.toggleDiv, 'click', function(event) {
|
Mibew.Utils.addEventListener(this.toggleDiv, 'click', function(event) {
|
||||||
var popups = Mibew.Objects.ChatPopups,
|
var popups = Mibew.Objects.ChatPopups,
|
||||||
matches = /^mibew-chat-frame-toggle-([0-9A-Za-z]+)$/.exec(this.id);
|
matches = /^mibew-chat-frame-toggle-([0-9A-Za-z]+)$/.exec(this.id);
|
||||||
|
|
||||||
if (matches && popups[matches[1]]) {
|
if (matches && popups[matches[1]]) {
|
||||||
popups[matches[1]].toggle();
|
popups[matches[1]].toggle();
|
||||||
|
@ -180,11 +180,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
var sanitizeMessage = function(message) {
|
var sanitizeMessage = function(message) {
|
||||||
return message.replace(/&/g, "&")
|
return message.replace(/&/g, "&")
|
||||||
.replace(/</g, "<")
|
.replace(/</g, "<")
|
||||||
.replace(/>/g, ">")
|
.replace(/>/g, ">")
|
||||||
.replace(/"/g, """)
|
.replace(/"/g, """)
|
||||||
.replace(/'/g, "'");
|
.replace(/'/g, "'");
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -91,7 +91,7 @@ MibewAPI.prototype.checkFunction = function(functionObject, filterReservedFuncti
|
|||||||
// Work with own properties only.
|
// Work with own properties only.
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for (var i = 0; i < mandatoryArgumentsList.length; i++) {
|
for (i = 0; i < mandatoryArgumentsList.length; i++) {
|
||||||
if (argName == mandatoryArgumentsList[i]) {
|
if (argName == mandatoryArgumentsList[i]) {
|
||||||
mandatoryArgumentsCount++;
|
mandatoryArgumentsCount++;
|
||||||
continue argumentsLoop;
|
continue argumentsLoop;
|
||||||
@ -358,7 +358,7 @@ MibewAPIInteraction.prototype.getMandatoryArguments = function(functionName) {
|
|||||||
}
|
}
|
||||||
// Add mandatory arguments for given function
|
// Add mandatory arguments for given function
|
||||||
if (typeof allMandatoryArguments[functionName] == 'object') {
|
if (typeof allMandatoryArguments[functionName] == 'object') {
|
||||||
for (var arg in allMandatoryArguments[functionName]) {
|
for (arg in allMandatoryArguments[functionName]) {
|
||||||
if (! allMandatoryArguments[functionName].hasOwnProperty(arg)) {
|
if (! allMandatoryArguments[functionName].hasOwnProperty(arg)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -389,7 +389,7 @@ MibewAPIInteraction.prototype.getMandatoryArgumentsDefaults = function(functionN
|
|||||||
}
|
}
|
||||||
// Add mandatory arguments for given function
|
// Add mandatory arguments for given function
|
||||||
if (typeof allMandatoryArguments[functionName] == 'object') {
|
if (typeof allMandatoryArguments[functionName] == 'object') {
|
||||||
for (var arg in allMandatoryArguments[functionName]) {
|
for (arg in allMandatoryArguments[functionName]) {
|
||||||
if (! allMandatoryArguments[functionName].hasOwnProperty(arg)) {
|
if (! allMandatoryArguments[functionName].hasOwnProperty(arg)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
$('#permissionsForm').submit(function(e){
|
$('#permissionsForm').submit(function(e){
|
||||||
if (!$('#permissionsadmin').is(":checked")) {
|
if (!$('#permissionsadmin').is(":checked")) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
message = Mibew.Localization.trans(
|
var message = Mibew.Localization.trans(
|
||||||
'This action is irreversible, proceed anyway?'
|
'This action is irreversible, proceed anyway?'
|
||||||
);
|
);
|
||||||
Mibew.Utils.confirm(message, function(value) {
|
Mibew.Utils.confirm(message, function(value) {
|
||||||
|
@ -148,7 +148,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add styles names to DOM element
|
// Add styles names to DOM element
|
||||||
for(var i = 0, l = childView.lastStyles.length; i < l; i++) {
|
for(i = 0, l = childView.lastStyles.length; i < l; i++) {
|
||||||
childView.$el.addClass(childView.lastStyles[i]);
|
childView.$el.addClass(childView.lastStyles[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user