Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
ulakbus-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ulakbus
ulakbus-ui
Commits
a705f5c2
Commit
a705f5c2
authored
Apr 11, 2016
by
Evren Kutar
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bugfix/5239' into develop-merge-5239
parents
b29a0bdb
1edbba27
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
9 deletions
+37
-9
dashboard.html
app/components/dashboard/dashboard.html
+1
-0
form_service.js
app/zetalib/form_service.js
+3
-5
socket.js
app/zetalib/socket.js
+30
-1
app.js
dist/app.js
+2
-2
templates.js
dist/templates.js
+1
-1
No files found.
app/components/dashboard/dashboard.html
View file @
a705f5c2
<div
ng-app=
"ulakbus.dashboard"
class=
"dashboard academician-dashboard"
>
<div
class=
"starter-template"
>
<!--<user-tasks></user-tasks>-->
<ng-include
src=
"'components/dashboard/user-templates/student.html'"
ng-if=
"$root.current_user.is_student"
></ng-include>
<ng-include
src=
"'components/dashboard/user-templates/staff.html'"
ng-if=
"!$root.current_user.is_student"
></ng-include>
<ng-include
src=
"'components/dashboard/user-templates/academician.html'"
ng-if=
"$root.current_user.is_staff && $root.current_user.is_academic"
></ng-include>
...
...
app/zetalib/form_service.js
View file @
a705f5c2
...
...
@@ -384,7 +384,7 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
var
formitem
=
scope
.
form
[
scope
.
form
.
indexOf
(
k
)];
var
modelScope
=
{
"form_params"
:
{
wf
:
v
.
wf
||
scope
.
wf
,
wf
:
v
.
wf
||
scope
.
wf
||
scope
.
form_params
.
wf
,
model
:
v
.
model_name
||
v
.
schema
[
0
].
model_name
,
cmd
:
v
.
list_cmd
||
'select_list'
,
query
:
''
...
...
@@ -568,13 +568,11 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
status
:
{
opened
:
false
},
open
:
function
(
$event
)
{
this
.
status
.
opened
=
true
;
scope
.
model
[
k
]
=
Moment
(
scope
.
model
[
k
],
"DD.MM.YYYY"
).
toDate
();
},
format
:
'dd.MM.yyyy'
,
onSelect
:
function
()
{
var
tempDate
=
angular
.
copy
(
scope
.
model
[
k
]);
tempDate
=
Date
.
parse
(
tempDate
,
"dd.MM.yyyy"
);
scope
.
model
[
k
]
=
tempDate
;
//scope.model[k] = angular.copy(generator.dateformatter(scope.model[k]));
scope
.
model
[
k
]
=
angular
.
copy
(
generator
.
dateformatter
(
scope
.
model
[
k
]));
}
};
}
...
...
app/zetalib/socket.js
View file @
a705f5c2
...
...
@@ -25,7 +25,7 @@ angular.module('ulakbus')
/**
* WSOps operates all websocket interactions
*/
.
factory
(
'WSOps'
,
function
(
WSUri
,
$q
,
$log
,
$rootScope
,
$timeou
t
,
ErrorService
,
WS
,
IsOnline
)
{
.
factory
(
'WSOps'
,
function
(
WSUri
,
$q
,
$log
,
$rootScope
,
$timeout
,
$documen
t
,
ErrorService
,
WS
,
IsOnline
)
{
$rootScope
.
$on
(
'ws_turn_on'
,
function
()
{
generate_ws
();
});
...
...
@@ -137,6 +137,9 @@ angular.module('ulakbus')
};
// do_action is the dispatcher function for incoming events
var
do_action
=
function
(
options
)
{
// remove mask from crud here
togglePageReadyMask
(
0
);
$log
.
info
(
"togglePageReadyMask off"
);
var
args
=
[].
slice
.
call
(
arguments
,
0
),
initialized
=
false
,
action
=
'init'
;
...
...
@@ -170,6 +173,9 @@ angular.module('ulakbus')
wsOps
.
callbacks
[
request
.
callbackID
]
=
deferred
;
websocket
.
send
(
angular
.
toJson
(
request
));
$log
.
info
(
'SENT:'
,
data
);
togglePageReadyMask
(
1
);
$log
.
info
(
"togglePageReadyMask on"
);
//
// todo: add success & error promises
return
deferred
.
promise
.
then
(
function
(
response
)
{
request
.
response
=
response
;
...
...
@@ -191,5 +197,28 @@ angular.module('ulakbus')
delete
websocket
;
};
var
pageReady
;
var
mask
=
angular
.
element
(
'<div class="body-mask"><div class="loader"></div>'
+
'</div>'
);
mask
.
css
({
zIndex
:
'2010'
,
opacity
:
'0.6'
});
var
body
=
$document
.
find
(
'body'
).
eq
(
0
);
var
togglePageReadyMask
=
function
(
st
)
{
var
toggle
=
[
function
()
{
if
(
pageReady
===
0
)
{
return
;}
$timeout
(
function
()
{
mask
.
remove
();
pageReady
=
0
;
},
1000
);
},
function
()
{
if
(
pageReady
===
1
)
{
return
;}
body
.
append
(
mask
);
pageReady
=
1
;
}
];
toggle
[
st
]();
};
return
wsOps
;
});
\ No newline at end of file
dist/app.js
View file @
a705f5c2
This source diff could not be displayed because it is too large. You can
view the blob
instead.
dist/templates.js
View file @
a705f5c2
...
...
@@ -463,7 +463,7 @@ angular.module("components/dashboard/dashboard.html", []).run(["$templateCache",
$templateCache
.
put
(
"components/dashboard/dashboard.html"
,
"<div ng-app=
\"
ulakbus.dashboard
\"
class=
\"
dashboard academician-dashboard
\"
>
\n
"
+
" <div class=
\"
starter-template
\"
>
\n
"
+
" <
user-tasks></user-tasks
>
\n
"
+
" <
!--<user-tasks></user-tasks>--
>
\n
"
+
" <ng-include src=
\"
'components/dashboard/user-templates/student.html'
\"
ng-if=
\"
$root.current_user.is_student
\"
></ng-include>
\n
"
+
" <ng-include src=
\"
'components/dashboard/user-templates/staff.html'
\"
ng-if=
\"
!$root.current_user.is_student
\"
></ng-include>
\n
"
+
" <ng-include src=
\"
'components/dashboard/user-templates/academician.html'
\"
ng-if=
\"
$root.current_user.is_staff && $root.current_user.is_academic
\"
></ng-include>
\n
"
+
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment