Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

remove all warnings

  • Loading branch information...
commit 541a304fe16d64a79c3ac3b4641f07971eca77c1 1 parent 4b76d8f
Eero Anttila eeroan authored
1  .idea/inspectionProfiles/Project_Default.xml
View
@@ -6,6 +6,7 @@
<inspection_tool class="CallToStringConcatCanBeReplacedByOperator" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="ClassEscapesItsScope" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="ComparatorNotSerializable" enabled="true" level="WARNING" enabled_by_default="true" />
+ <inspection_tool class="CssUnusedSymbolInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="ExternalizableWithSerializationMethods" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="FieldHidesSuperclassField" enabled="true" level="WARNING" enabled_by_default="true">
<option name="m_ignoreInvisibleFields" value="true" />
4 jquery-continuous-calendar.iml
View
@@ -3,9 +3,7 @@
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
- <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
- <sourceFolder url="file://$MODULE_DIR$/src/main" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/src/lib" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
0  src/test/qunit.css → src/lib/qunit.css
View
File renamed without changes
3  src/test/qunit.js → src/lib/qunit.js
View
@@ -8,7 +8,6 @@
* or GPL (GPL-LICENSE.txt) licenses.
*/
-(function(window) {
var defined = {
setTimeout: typeof window.setTimeout !== "undefined",
@@ -1413,5 +1412,3 @@ QUnit.diff = (function() {
return str;
};
})();
-
-})(this);
1  src/main/date-range.js
View
@@ -113,7 +113,6 @@ function DateRange(date1, date2) {
this.toString = function(locale) {
if (hasTimes) {
- var minutes = this.minutes() > 0 ? ',' + (this.minutes() / 6) : ''
return Date.daysLabel(this.days()) + ' ' + Date.hoursLabel(this.hours(), this.minutes())
} else {
return this.start.dateFormat(locale.shortDateFormat) + ' - ' + this.end.dateFormat(locale.shortDateFormat)
10 src/main/jquery.continuous-calendar.js
View
@@ -304,15 +304,14 @@
return
}
-
status = Status.CREATE_OR_RESIZE
mouseDownDate = elem.date
- if(enabledCell(elem) && mouseDownDate.equalsOnlyDate(selection.end)) {
+ if(mouseDownDate.equalsOnlyDate(selection.end)) {
mouseDownDate = selection.start
return
}
- if(enabledCell(elem) && mouseDownDate.equalsOnlyDate(selection.start)) {
+ if(mouseDownDate.equalsOnlyDate(selection.start)) {
mouseDownDate = selection.end
return
}
@@ -388,13 +387,12 @@
afterSelection()
}
-
- function tooSmallSelection() {
+ function isTooSmallSelection() {
return params.minimumRange && selection.days() <= params.minimumRange;
}
function drawSelection() {
- if(tooSmallSelection()) {
+ if(isTooSmallSelection()) {
selection.expandDaysTo(params.minimumRange)
}
drawSelectionBetweenDates(selection)
4 src/test/dateRange-test.html
View
@@ -18,12 +18,12 @@
<head>
<title>Tests for jquery.continuous-calendar</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
- <link rel="stylesheet" href="qunit.css" type="text/css" media="screen" />
+ <link rel="stylesheet" href="../lib/qunit.css" type="text/css" media="screen" />
<script type="text/javascript" src="../lib/jquery-1.4.2.js"></script>
<script type="text/javascript" src="../main/date-functions.js"></script>
<script type="text/javascript" src="../main/date-locales.js"></script>
<script type="text/javascript" src="../main/date-range.js"></script>
- <script type="text/javascript" src="qunit.js"></script>
+ <script type="text/javascript" src="../lib/qunit.js"></script>
<script type="text/javascript" language="JavaScript" src="test-functions.js"></script>
<script type="text/javascript" src="dateRange-test.js"></script>
</head>
4 src/test/jquery.continuous-calendar-test.html
View
@@ -17,7 +17,7 @@
<head>
<title>Tests for jquery.continuous-calendar</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
- <link rel="stylesheet" href="qunit.css" type="text/css" media="screen" />
+ <link rel="stylesheet" href="../lib/qunit.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../main/jquery.continuous-calendar.css" type="text/css" media="screen" />
<style type="text/css">
.testCalendarContainer {margin: 10px;float: left;height: 160px;width: 220px;}
@@ -29,7 +29,7 @@
<script type="text/javascript" src="../main/date-locales.js"></script>
<script type="text/javascript" src="../main/date-range.js"></script>
<script type="text/javascript" src="../main/jquery.continuous-calendar.js"></script>
- <script type="text/javascript" src="qunit.js"></script>
+ <script type="text/javascript" src="../lib/qunit.js"></script>
<script type="text/javascript" language="JavaScript" src="test-functions.js"></script>
<script type="text/javascript" src="jquery.continuous-calendar-test.js"></script>
</head>
6 src/test/jquery.continuous-calendar-test.js
View
@@ -250,7 +250,7 @@ test("range can be specified with weeks and dates mixed", function() {
//TODO fails with IE7
test("calendar executes callback-function and triggers event when date is picked", function() {
- function testFunction(date) {
+ function testFunction() {
calendarCallBack++
}
bindCalled = 0
@@ -393,6 +393,10 @@ test("prevent selecting range that starts or ends on weekend", function() {
})
+test = QUnit.test
+module = QUnit.module
+equals = QUnit.equal
+ok = QUnit.ok
QUnit.begin = function() {
$('#tests').hide()
}
15 src/test/test-functions.js
View
@@ -14,9 +14,6 @@
function click(selector) {
$(selector).click();
}
-function setText(selector, value) {
- $(selector).val(value).keyup()
-}
function value(selector) {
var elem = $(selector)
if (elem.is("input")) {
@@ -25,15 +22,6 @@ function value(selector) {
return elem.text()
}
}
-function assertEmpty(selector) {
- ok($(selector).length == 0, selector + " should be empty")
-}
-function assertNotEmpty(selector) {
- ok($(selector).length > 0, selector + " should not be empty")
-}
-function resetTextInputs() {
- setText("input:text", "")
-}
$.fn.withText = function(text) {
return this.filter(function() {
@@ -47,4 +35,5 @@ function assertHasValues(selector, expectedArray) {
}), $.map(expectedArray, function(i) {
return i.toString()
}))
-}
+}
+ok = QUnit.ok
Please sign in to comment.
Something went wrong with that request. Please try again.