Skip to content

Commit

Permalink
Further task list refinements
Browse files Browse the repository at this point in the history
  • Loading branch information
MentalAtom committed May 28, 2014
1 parent 37daae7 commit 2de5f5a
Show file tree
Hide file tree
Showing 9 changed files with 324 additions and 5 deletions.
133 changes: 133 additions & 0 deletions app/assets/css/XigenTimer.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 14 additions & 2 deletions app/assets/js/XT_Runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $(function () {
ready,
loginError;

XT.socket = socket = io.connect("http://localhost:8080");
XT.socket = socket = io.connect("http://timerservice.magpiex.co.uk:8080");
XT.viewmodel = new XT.ViewModel();

ko.applyBindings(XT.viewmodel);
Expand Down Expand Up @@ -53,6 +53,17 @@ $(function () {

});

socket.on("send setup", function () {

if (XT.token && XT.user) {
socket.emit("setup", {
"userToken" : XT.token,
"userName" : XT.user
});
}

});

$(".xt__login").on("submit", function (e) {
e.preventDefault();

Expand All @@ -61,7 +72,8 @@ $(function () {
password = form.find("[name=pass]").val(),
token;

token = "Basic " + btoa(username + ":" + password);
token = XT.token = "Basic " + btoa(username + ":" + password);
XT.user = username;

setup(token, username);

Expand Down
14 changes: 13 additions & 1 deletion app/assets/js/XT_TaskFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
TASKS_BODY: ".xt__tasks__body",
APPLY: ".btn--info",
RESET: ".btn--yellow",
OVERLAY: ".xt__tasks__overlay",
REFRESH: ".btn--warning",
NAME: "[name=nameFilter]",
NO_END_DATE: "#withoutEndDate",
Expand Down Expand Up @@ -64,7 +65,10 @@

this.noEndDateState = endDate;
this.waitingReviewState = waitingReview;
this.nameFieldState = !!nameFilter;
this.nameFieldState = nameFilter;

this.checkApplyButton();
this.checkResetButton();

XT.socket.once("filteredActivites", function (data) {
that.getProjectNames(data);
Expand Down Expand Up @@ -158,6 +162,10 @@
});
});

$(config.OVERLAY).css({
"display" : "flex"
});

XT.socket.emit("get", request);

XT.socket.once("data", function (data) {
Expand Down Expand Up @@ -212,6 +220,10 @@
"cellpadding" : 0
}).appendTo(config.TASKS_BODY);

$(config.OVERLAY).css({
"display" : "none"
});

}

};
Expand Down
1 change: 1 addition & 0 deletions app/assets/js/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ XT.i18n = {
2 : "High",
3 : "Medium",
4 : "Low",
0 : "--"
}

};
4 changes: 3 additions & 1 deletion app/assets/less/XigenTimer.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@
@import "modules/overlay";
@import "modules/timelogs";
@import "modules/timelog-edit";
@import "modules/tasks";
@import "modules/tasks";

@import "modules/spinkit";
111 changes: 111 additions & 0 deletions app/assets/less/modules/spinkit.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
.spinner {
margin: 100px auto;
width: 20px;
height: 20px;
position: relative;
}

.container1 > div, .container2 > div, .container3 > div {
width: 6px;
height: 6px;
background-color: #333;

border-radius: 100%;
position: absolute;
-webkit-animation: bouncedelay 1.2s infinite ease-in-out;
animation: bouncedelay 1.2s infinite ease-in-out;
/* Prevent first frame from flickering when animation starts */
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}

.spinner .spinner-container {
position: absolute;
width: 100%;
height: 100%;
}

.container2 {
-webkit-transform: rotateZ(45deg);
transform: rotateZ(45deg);
}

.container3 {
-webkit-transform: rotateZ(90deg);
transform: rotateZ(90deg);
}

.circle1 { top: 0; left: 0; }
.circle2 { top: 0; right: 0; }
.circle3 { right: 0; bottom: 0; }
.circle4 { left: 0; bottom: 0; }

.container2 .circle1 {
-webkit-animation-delay: -1.1s;
animation-delay: -1.1s;
}

.container3 .circle1 {
-webkit-animation-delay: -1.0s;
animation-delay: -1.0s;
}

.container1 .circle2 {
-webkit-animation-delay: -0.9s;
animation-delay: -0.9s;
}

.container2 .circle2 {
-webkit-animation-delay: -0.8s;
animation-delay: -0.8s;
}

.container3 .circle2 {
-webkit-animation-delay: -0.7s;
animation-delay: -0.7s;
}

.container1 .circle3 {
-webkit-animation-delay: -0.6s;
animation-delay: -0.6s;
}

.container2 .circle3 {
-webkit-animation-delay: -0.5s;
animation-delay: -0.5s;
}

.container3 .circle3 {
-webkit-animation-delay: -0.4s;
animation-delay: -0.4s;
}

.container1 .circle4 {
-webkit-animation-delay: -0.3s;
animation-delay: -0.3s;
}

.container2 .circle4 {
-webkit-animation-delay: -0.2s;
animation-delay: -0.2s;
}

.container3 .circle4 {
-webkit-animation-delay: -0.1s;
animation-delay: -0.1s;
}

@-webkit-keyframes bouncedelay {
0%, 80%, 100% { -webkit-transform: scale(0.0) }
40% { -webkit-transform: scale(1.0) }
}

@keyframes bouncedelay {
0%, 80%, 100% {
transform: scale(0.0);
-webkit-transform: scale(0.0);
} 40% {
transform: scale(1.0);
-webkit-transform: scale(1.0);
}
}
23 changes: 23 additions & 0 deletions app/assets/less/modules/tasks.less
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,27 @@
overflow: auto;
}

&__overlay {
position: absolute;
left: 0px;
bottom: 0px;
width: 100%;
height: 90%;
display: flex;
background: rgba(255, 255, 255, 0.5);
display: none;

.spinner {
margin: auto;

.container1 > div,
.container2 > div,
.container3 > div {
background: @xigenblue;
}
}
}

[data-priority='1'] {}

}
Loading

0 comments on commit 2de5f5a

Please sign in to comment.