Skip to content

Commit

Permalink
Add project configuration files.
Browse files Browse the repository at this point in the history
Had to make small changes to be jshint compliant.
  • Loading branch information
rikkert committed Mar 23, 2013
1 parent ad89b41 commit 79bf252
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 23 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
@@ -0,0 +1,15 @@
; http://EditorConfig.org
root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{js,css}]
indent_style = space
indent_size = 4

[*.md]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .gitattributes
@@ -0,0 +1 @@
* text=auto
21 changes: 21 additions & 0 deletions .jshintrc
@@ -0,0 +1,21 @@
{
"node": true,
"browser": true,
"es5": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
"eqeqeq": true,
"immed": true,
"indent": 4,
"latedef": true,
"newcap": true,
"noarg": true,
"quotmark": "single",
"regexp": true,
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"smarttabs": true
}
22 changes: 11 additions & 11 deletions pikaday.js
Expand Up @@ -174,12 +174,11 @@

// internationalization
i18n: {
previousMonth : 'Previous Month',
nextMonth : 'Next Month',
months : ['January','February','March','April','May','June','July','August','September','October','November','December'],
//monthsShort : ['Jan_Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
weekdays : ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],
weekdaysShort : ['Sun','Mon','Tue','Wed','Thu','Fri','Sat']
previousMonth : 'Previous Month',
nextMonth : 'Next Month',
months : ['January','February','March','April','May','June','July','August','September','October','November','December'],
weekdays : ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],
weekdaysShort : ['Sun','Mon','Tue','Wed','Thu','Fri','Sat']
},

// callback function
Expand Down Expand Up @@ -334,7 +333,8 @@
if (e.preventDefault) {
e.preventDefault();
} else {
return e.returnValue = false;
e.returnValue = false;
return false;
}
} else {
self._c = true;
Expand Down Expand Up @@ -376,17 +376,17 @@
}
};

self._onInputFocus = function(e)
self._onInputFocus = function()
{
self.show();
};

self._onInputClick = function(e)
self._onInputClick = function()
{
self.show();
};

self._onInputBlur = function(e)
self._onInputBlur = function()
{
if (!self._c) {
self._b = sto(function() {
Expand Down Expand Up @@ -595,7 +595,7 @@

if (this._o.field) {
this._o.field.value = this.toString();
fireEvent(this._o.field, "change", { firedBy: this });
fireEvent(this._o.field, 'change', { firedBy: this });
}
if (!preventOnSelect && typeof this._o.onSelect === 'function') {
this._o.onSelect.call(this, this.getDate());
Expand Down
25 changes: 13 additions & 12 deletions plugins/pikaday.jquery.js
Expand Up @@ -5,6 +5,7 @@

(function($)
{
'use strict';

$.fn.pikaday = function()
{
Expand All @@ -23,7 +24,7 @@
if (typeof args[0] === 'object') {
var options = $.extend({}, args[0]);
options.field = self[0];
self.data('pikaday', new Pikaday(options));
self.data('pikaday', new window.Pikaday(options));
}
} else {
if (typeof args[0] === 'string' && typeof plugin[args[0]] === 'function') {
Expand Down Expand Up @@ -211,12 +212,11 @@

// internationalization
i18n: {
previousMonth : 'Previous Month',
nextMonth : 'Next Month',
months : ['January','February','March','April','May','June','July','August','September','October','November','December'],
//monthsShort : ['Jan_Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
weekdays : ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],
weekdaysShort : ['Sun','Mon','Tue','Wed','Thu','Fri','Sat']
previousMonth : 'Previous Month',
nextMonth : 'Next Month',
months : ['January','February','March','April','May','June','July','August','September','October','November','December'],
weekdays : ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],
weekdaysShort : ['Sun','Mon','Tue','Wed','Thu','Fri','Sat']
},

// callback function
Expand Down Expand Up @@ -371,7 +371,8 @@
if (e.preventDefault) {
e.preventDefault();
} else {
return e.returnValue = false;
e.returnValue = false;
return false;
}
} else {
self._c = true;
Expand Down Expand Up @@ -413,17 +414,17 @@
}
};

self._onInputFocus = function(e)
self._onInputFocus = function()
{
self.show();
};

self._onInputClick = function(e)
self._onInputClick = function()
{
self.show();
};

self._onInputBlur = function(e)
self._onInputBlur = function()
{
if (!self._c) {
self._b = sto(function() {
Expand Down Expand Up @@ -632,7 +633,7 @@

if (this._o.field) {
this._o.field.value = this.toString();
fireEvent(this._o.field, "change", { firedBy: this });
fireEvent(this._o.field, 'change', { firedBy: this });
}
if (!preventOnSelect && typeof this._o.onSelect === 'function') {
this._o.onSelect.call(this, this.getDate());
Expand Down

0 comments on commit 79bf252

Please sign in to comment.