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
90a47357
Commit
90a47357
authored
Sep 17, 2015
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sidebar and table scroll
submit data error fix
parent
8d7e24c9
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
67 additions
and
12 deletions
+67
-12
app.css
app/app.css
+24
-0
app.js
app/app.js
+3
-3
sidebar.html
app/shared/templates/directives/sidebar.html
+1
-1
nodeTable.html
app/shared/templates/nodeTable.html
+3
-1
form_service.js
app/zetalib/forms/form_service.js
+8
-4
app.js
dist/app.js
+1
-1
app.css
dist/css/app.css
+23
-0
templates.js
dist/templates.js
+4
-2
No files found.
app/app.css
View file @
90a47357
...
@@ -994,3 +994,27 @@ table.dataTable thead .sorting:after {
...
@@ -994,3 +994,27 @@ table.dataTable thead .sorting:after {
width
:
350px
;
width
:
350px
;
}
}
}
}
.tablescroll
{
width
:
100%
;
overflow-x
:
scroll
;
overflow-y
:
visible
;
padding-bottom
:
1px
;
}
.tablescrollfixleft
{
position
:
absolute
;
left
:
0
;
top
:
auto
;
}
.tablescrollfixleft
{
position
:
absolute
;
right
:
0
;
top
:
auto
;
}
.sidebarscroll
{
overflow-x
:
visible
;
overflow-y
:
scroll
;
height
:
700px
;
}
\ No newline at end of file
app/app.js
View file @
90a47357
...
@@ -24,15 +24,15 @@ var app = angular.module(
...
@@ -24,15 +24,15 @@ var app = angular.module(
//'ulakbus.version',
//'ulakbus.version',
'schemaForm'
,
'schemaForm'
,
'gettext'
,
'gettext'
,
//
'templates-prod'
'templates-prod'
]).
]).
/**
/**
* RESTURL is the url of rest api to talk
* RESTURL is the url of rest api to talk
* Based on the environment it changes from dev to prod
* Based on the environment it changes from dev to prod
*/
*/
constant
(
"RESTURL"
,
(
function
()
{
constant
(
"RESTURL"
,
(
function
()
{
return
{
url
:
"http://"
+
window
.
location
.
hostname
+
"
:9001/"
};
//return {url: "http://127.0.0.1
:9001/"};
//
return {url: "http://api.ulakbus.net/"};
return
{
url
:
"http://api.ulakbus.net/"
};
})()).
})()).
/**
/**
* USER_ROLES and AUTH_EVENTS are constant for auth functions
* USER_ROLES and AUTH_EVENTS are constant for auth functions
...
...
app/shared/templates/directives/sidebar.html
View file @
90a47357
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<div
class=
"brand"
>
<div
class=
"brand"
>
<a
href=
""
class=
"logo"
><img
src=
"/img/brand-logo.png"
/></a>
<a
href=
""
class=
"logo"
><img
src=
"/img/brand-logo.png"
/></a>
</div>
</div>
<ul
class=
"nav in"
id=
"side-menu"
>
<ul
class=
"nav in
sidebarscroll
"
id=
"side-menu"
>
<!--<sidebar-search></sidebar-search>-->
<!--<sidebar-search></sidebar-search>-->
<li
ui-sref-active=
"active"
>
<li
ui-sref-active=
"active"
>
<a
href=
"#/dashboard"
><i
class=
"fa fa-dashboard fa-fw"
></i>
Panel
</a>
<a
href=
"#/dashboard"
><i
class=
"fa fa-dashboard fa-fw"
></i>
Panel
</a>
...
...
app/shared/templates/nodeTable.html
View file @
90a47357
<div
class=
"tablescroll"
>
<table
class=
"table table-bordered"
style=
"background-color:#fff;"
>
<table
class=
"table table-bordered"
style=
"background-color:#fff;"
>
<thead>
<thead>
<tr>
<tr>
...
@@ -27,4 +28,5 @@
...
@@ -27,4 +28,5 @@
</td>
</td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
\ No newline at end of file
</div>
\ No newline at end of file
app/zetalib/forms/form_service.js
View file @
90a47357
...
@@ -93,7 +93,7 @@ form_generator.factory('Generator', function ($http, $q, $log, $location, $modal
...
@@ -93,7 +93,7 @@ form_generator.factory('Generator', function ($http, $q, $log, $location, $modal
// get model objects from db and add to select list
// get model objects from db and add to select list
scope
.
form
[
scope
.
form
.
indexOf
(
v
)]
=
formitem
;
scope
.
form
[
scope
.
form
.
indexOf
(
v
)]
=
formitem
;
scope
.
$broadcast
(
'schemaFormRedraw'
);
//
scope.$broadcast('schemaFormRedraw');
// todo: make lines below work properly
// todo: make lines below work properly
//if (scope.model[v].indexOf("TMP_") > -1) {
//if (scope.model[v].indexOf("TMP_") > -1) {
...
@@ -140,6 +140,9 @@ form_generator.factory('Generator', function ($http, $q, $log, $location, $modal
...
@@ -140,6 +140,9 @@ form_generator.factory('Generator', function ($http, $q, $log, $location, $modal
// lengthModels is length of the listnode models. if greater than 0 show records on template
// lengthModels is length of the listnode models. if greater than 0 show records on template
scope
[
k
.
type
][
k
.
title
][
'lengthModels'
]
=
scope
.
model
[
k
.
title
]
?
1
:
0
;
scope
[
k
.
type
][
k
.
title
][
'lengthModels'
]
=
scope
.
model
[
k
.
title
]
?
1
:
0
;
console
.
log
(
scope
[
k
.
type
][
k
.
title
][
'lengthModels'
]);
debugger
;
}
}
});
});
...
@@ -197,8 +200,8 @@ form_generator.factory('Generator', function ($http, $q, $log, $location, $modal
...
@@ -197,8 +200,8 @@ form_generator.factory('Generator', function ($http, $q, $log, $location, $modal
};
};
generator
.
submit
=
function
(
$scope
)
{
generator
.
submit
=
function
(
$scope
)
{
// todo: diff for all submits to recognize form change. if no change returns to view with no submit
// todo: diff for all submits to recognize form change. if no change returns to view with no submit
debugger
;
data
=
{
var
data
=
{
"form"
:
$scope
.
model
,
"form"
:
$scope
.
model
,
"cmd"
:
$scope
.
form_params
.
cmd
,
"cmd"
:
$scope
.
form_params
.
cmd
,
"subcmd"
:
"do_list"
,
"subcmd"
:
"do_list"
,
...
@@ -214,7 +217,8 @@ form_generator.factory('Generator', function ($http, $q, $log, $location, $modal
...
@@ -214,7 +217,8 @@ form_generator.factory('Generator', function ($http, $q, $log, $location, $modal
.
success
()
.
success
()
.
then
(
function
(
res
){
.
then
(
function
(
res
){
if
(
res
.
data
.
client_cmd
){
if
(
res
.
data
.
client_cmd
){
$location
.
path
(
data
.
model
);
console
.
log
(
"record fin"
);
$location
.
path
(
$scope
.
form_params
.
model
);
}
}
});
});
};
};
...
...
dist/app.js
View file @
90a47357
This diff is collapsed.
Click to expand it.
dist/css/app.css
View file @
90a47357
...
@@ -1008,6 +1008,29 @@ table.dataTable thead .sorting:after {
...
@@ -1008,6 +1008,29 @@ table.dataTable thead .sorting:after {
}
}
}
}
.tablescroll
{
width
:
100%
;
overflow-x
:
scroll
;
overflow-y
:
visible
;
padding-bottom
:
1px
;
}
.tablescrollfixleft
{
position
:
absolute
;
left
:
0
;
top
:
auto
;
}
.tablescrollfixleft
{
position
:
absolute
;
right
:
0
;
top
:
auto
;
}
.sidebarscroll
{
overflow-x
:
visible
;
overflow-y
:
scroll
;
height
:
700px
;
}
/*
/*
* metismenu - v1.1.3
* metismenu - v1.1.3
...
...
dist/templates.js
View file @
90a47357
...
@@ -1000,7 +1000,7 @@ angular.module("shared/templates/directives/sidebar.html", []).run(["$templateCa
...
@@ -1000,7 +1000,7 @@ angular.module("shared/templates/directives/sidebar.html", []).run(["$templateCa
" <div class=
\"
brand
\"
>
\n
"
+
" <div class=
\"
brand
\"
>
\n
"
+
" <a href=
\"\"
class=
\"
logo
\"
><img src=
\"
/img/brand-logo.png
\"
/></a>
\n
"
+
" <a href=
\"\"
class=
\"
logo
\"
><img src=
\"
/img/brand-logo.png
\"
/></a>
\n
"
+
" </div>
\n
"
+
" </div>
\n
"
+
" <ul class=
\"
nav in
\"
id=
\"
side-menu
\"
>
\n
"
+
" <ul class=
\"
nav in
sidebarscroll
\"
id=
\"
side-menu
\"
>
\n
"
+
" <!--<sidebar-search></sidebar-search>-->
\n
"
+
" <!--<sidebar-search></sidebar-search>-->
\n
"
+
" <li ui-sref-active=
\"
active
\"
>
\n
"
+
" <li ui-sref-active=
\"
active
\"
>
\n
"
+
" <a href=
\"
#/dashboard
\"
><i class=
\"
fa fa-dashboard fa-fw
\"
></i> Panel</a>
\n
"
+
" <a href=
\"
#/dashboard
\"
><i class=
\"
fa fa-dashboard fa-fw
\"
></i> Panel</a>
\n
"
+
...
@@ -1234,6 +1234,7 @@ angular.module("shared/templates/modalContent.html", []).run(["$templateCache",
...
@@ -1234,6 +1234,7 @@ angular.module("shared/templates/modalContent.html", []).run(["$templateCache",
angular
.
module
(
"shared/templates/nodeTable.html"
,
[]).
run
([
"$templateCache"
,
function
(
$templateCache
)
{
angular
.
module
(
"shared/templates/nodeTable.html"
,
[]).
run
([
"$templateCache"
,
function
(
$templateCache
)
{
$templateCache
.
put
(
"shared/templates/nodeTable.html"
,
$templateCache
.
put
(
"shared/templates/nodeTable.html"
,
"<div class=
\"
tablescroll
\"
>
\n
"
+
"<table class=
\"
table table-bordered
\"
style=
\"
background-color:#fff;
\"
>
\n
"
+
"<table class=
\"
table table-bordered
\"
style=
\"
background-color:#fff;
\"
>
\n
"
+
" <thead>
\n
"
+
" <thead>
\n
"
+
" <tr>
\n
"
+
" <tr>
\n
"
+
...
@@ -1263,5 +1264,6 @@ angular.module("shared/templates/nodeTable.html", []).run(["$templateCache", fun
...
@@ -1263,5 +1264,6 @@ angular.module("shared/templates/nodeTable.html", []).run(["$templateCache", fun
" </td>
\n
"
+
" </td>
\n
"
+
" </tr>
\n
"
+
" </tr>
\n
"
+
" </tbody>
\n
"
+
" </tbody>
\n
"
+
"</table>"
);
"</table>
\n
"
+
"</div>"
);
}]);
}]);
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