1
0
Fork 0

Fixed jslint warnings, removed sloppy:true

This commit is contained in:
Michael Hackstein 2013-11-12 15:44:44 +01:00
parent 61ab284433
commit 20578ae5f5
2 changed files with 1027 additions and 1007 deletions

View File

@ -1,7 +1,9 @@
/*jslint indent: 2, nomen: true, maxlen: 100, sloppy: true, vars: true, white: true, plusplus: true */
/*jslint indent: 2, nomen: true, maxlen: 100, vars: true, white: true, plusplus: true */
/*global window, $ */
window.arangoHelper = {
(function() {
"use strict";
window.arangoHelper = {
lastNotificationMessage: null,
CollectionTypes: {},
@ -46,7 +48,7 @@ window.arangoHelper = {
},
databaseAllowed: function () {
var currentDB = this.currentDatabase();
var currentDB = this.currentDatabase(),
returnVal = false;
$.ajax({
type: "GET",
@ -94,7 +96,7 @@ window.arangoHelper = {
// prevent display the same message over & over
return false;
}
if($('.gritter-item-wrapper').length == 3) {
if($('.gritter-item-wrapper').length === 3) {
// not more than 3 messages at once
return false;
}
@ -249,4 +251,5 @@ window.arangoHelper = {
return typeof v;
}
};
};
}());

View File

@ -1,7 +1,9 @@
/*jslint indent: 2, nomen: true, maxlen: 100, sloppy: true, vars: true, white: true, plusplus: true */
/*global require, exports, Backbone, EJS, $, window, arangoHelper */
/*jslint indent: 2, nomen: true, maxlen: 100, vars: true, white: true, plusplus: true */
/*global require, exports, Backbone, EJS, $, window, arangoHelper, templateEngine */
var documentsView = Backbone.View.extend({
(function() {
"use strict";
var documentsView = Backbone.View.extend({
collectionID: 0,
currentPage: 1,
documentsPerPage: 10,
@ -23,6 +25,9 @@ var documentsView = Backbone.View.extend({
el: '#content',
table: '#documentsTableID',
template: templateEngine.createTemplate("documentsView.ejs"),
events: {
"click #collectionPrev" : "prevCollection",
"click #collectionNext" : "nextCollection",
@ -189,7 +194,14 @@ var documentsView = Backbone.View.extend({
prevCollection : function () {
if (this.collectionContext.prev !== null) {
$('#collectionPrev').parent().removeClass('disabledPag');
window.App.navigate(this.buildCollectionLink(this.collectionContext.prev), { trigger: true });
window.App.navigate(
this.buildCollectionLink(
this.collectionContext.prev
),
{
trigger: true
}
);
}
else {
$('#collectionPrev').parent().addClass('disabledPag');
@ -199,7 +211,14 @@ var documentsView = Backbone.View.extend({
nextCollection : function () {
if (this.collectionContext.next !== null) {
$('#collectionNext').parent().removeClass('disabledPag');
window.App.navigate(this.buildCollectionLink(this.collectionContext.next), { trigger: true });
window.App.navigate(
this.buildCollectionLink(
this.collectionContext.next
),
{
trigger: true
}
);
}
else {
$('#collectionNext').parent().addClass('disabledPag');
@ -275,7 +294,6 @@ var documentsView = Backbone.View.extend({
},
addFilterItem : function () {
"use strict";
// adds a line to the filter widget
var num = ++this.filterId;
@ -306,7 +324,6 @@ var documentsView = Backbone.View.extend({
},
removeFilterItem : function (e) {
"use strict";
// removes line from the filter widget
var button = e.currentTarget;
@ -560,7 +577,6 @@ var documentsView = Backbone.View.extend({
}
},
template: templateEngine.createTemplate("documentsView.ejs"),
render: function() {
this.collectionContext = window.arangoCollectionsStore.getPosition(this.colid);
@ -830,4 +846,5 @@ var documentsView = Backbone.View.extend({
arangoHelper.fixTooltips("deleteIndex", "left");
}
}
});
});
}());