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
69d2bb3f
Commit
69d2bb3f
authored
Sep 18, 2015
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v0.0.3.1 list page fix for all cases
parent
f239bad5
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
38 additions
and
29 deletions
+38
-29
Gruntfile.js
Gruntfile.js
+1
-1
crud_controller.js
app/components/crud/crud_controller.js
+1
-6
list.html
app/components/crud/templates/list.html
+15
-6
index.html
app/index.html
+0
-1
main.html
app/main.html
+0
-2
directives.js
app/shared/directives.js
+5
-4
form_service.js
app/zetalib/forms/form_service.js
+0
-2
app.js
dist/app.js
+1
-1
templates.js
dist/templates.js
+15
-6
No files found.
Gruntfile.js
View file @
69d2bb3f
...
@@ -198,7 +198,7 @@ module.exports = function (grunt) {
...
@@ -198,7 +198,7 @@ module.exports = function (grunt) {
},
},
watch
:
{
watch
:
{
dev
:
{
dev
:
{
files
:
[
'app/**/*.js'
,
'app/components/**/*.html'
,
'
index
.html'
,
'Gruntfile.js'
,
'!app/tmp/*.js'
,
'!app/app.js'
],
files
:
[
'app/**/*.js'
,
'app/components/**/*.html'
,
'
app/main
.html'
,
'Gruntfile.js'
,
'!app/tmp/*.js'
,
'!app/app.js'
],
tasks
:
[
'env:dev'
,
'preprocess:dev'
,
'html2js:dev'
],
tasks
:
[
'env:dev'
,
'preprocess:dev'
,
'html2js:dev'
],
options
:
{
options
:
{
atBegin
:
false
atBegin
:
false
...
...
app/components/crud/crud_controller.js
View file @
69d2bb3f
...
@@ -58,12 +58,7 @@ crud.controller('CRUDListCtrl', function ($scope, $rootScope, Generator, $routeP
...
@@ -58,12 +58,7 @@ crud.controller('CRUDListCtrl', function ($scope, $rootScope, Generator, $routeP
// call generator's get_list func
// call generator's get_list func
Generator
.
get_list
(
$scope
)
Generator
.
get_list
(
$scope
)
.
then
(
function
(
res
)
{
.
then
(
function
(
res
)
{
var
data
=
res
.
data
.
objects
;
$scope
.
nobjects
=
res
.
data
.
nobjects
;
for
(
var
item
in
data
){
delete
data
[
item
].
data
[
'deleted'
];
delete
data
[
item
].
data
[
'timestamp'
];
}
$scope
.
objects
=
data
;
$scope
.
model
=
$routeParams
.
model
;
$scope
.
model
=
$routeParams
.
model
;
});
});
});
});
...
...
app/components/crud/templates/list.html
View file @
69d2bb3f
...
@@ -10,27 +10,36 @@
...
@@ -10,27 +10,36 @@
Hepsini Seç
Hepsini Seç
</label>
</label>
</th>
</th>
<th
ng-repeat=
"(key,value) in nobjects[0].data"
>
{{ key }}
</th>
<th
ng-repeat=
"value in nobjects[0]"
ng-if=
"nobjects[0]!='-1'"
>
{{ value }}
</th>
<th
ng-if=
"nobjects[0]=='-1'"
>
{{ model }}
</th>
<th>
action
</th>
<th>
action
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
<tr
ng-repeat=
"object in nobjects"
>
<tr
ng-repeat=
"object in nobjects"
ng-if=
"$index>0"
>
<td
width=
"60"
>
<td
width=
"60"
>
<label>
<label>
<input
type=
"checkbox"
style=
"zoom:1.5; margin:5px 0 0 8px;"
>
<input
type=
"checkbox"
style=
"zoom:1.5; margin:5px 0 0 8px;"
>
</label>
</label>
</td>
</td>
<th
scope=
"row"
style=
"text-align:center"
>
{{$index + 1}}
</th>
<th
scope=
"row"
style=
"text-align:center"
>
{{$index}}
</th>
<td
ng-repeat=
"(key,value) in object.data"
>
{{value}}
</td>
<td
ng-repeat=
"k in object"
ng-if=
"nobjects[0]=='-1' && $index>0"
>
<a
ng-href=
"#/{{model}}/{{object[0]}}"
>
{{object[1]}}
</a>
</td>
<td
ng-repeat=
"(key,value) in object"
ng-if=
"nobjects[0]!='-1' && $index>0"
>
<a
ng-href=
"#/{{model}}/{{object[0]}}"
ng-if=
"$index==1"
>
{{value}}
</a>
<span
ng-if=
"$index!=1"
>
{{value}}
</span>
</td>
<td>
<td>
<a
ng-href=
"#/{{model}}/edit/{{object.key}}"
>
Edit
</a><br>
<a
ng-href=
"#/{{model}}/edit/{{object[0]}}"
>
Edit
</a><br>
<a
ng-href=
"#/{{model}}/{{object.key}}"
>
Show
</a>
</td>
</td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
</div>
</div>
<br/>
<hr/>
<div
class=
"btn-group"
>
<div
class=
"btn-group"
>
<button
type=
"button"
class=
"btn btn-default dropdown-toggle"
data-toggle=
"dropdown"
aria-haspopup=
"true"
<button
type=
"button"
class=
"btn btn-default dropdown-toggle"
data-toggle=
"dropdown"
aria-haspopup=
"true"
...
...
app/index.html
View file @
69d2bb3f
...
@@ -87,7 +87,6 @@
...
@@ -87,7 +87,6 @@
<script
src=
"tmp/templates.js"
></script>
<script
src=
"tmp/templates.js"
></script>
<script
src=
"app.js"
></script>
<script
src=
"app.js"
></script>
<script
src=
"app_routes.js"
></script>
<script
src=
"app_routes.js"
></script>
<script
src=
"shared/scripts/theme.js"
></script>
<script
src=
"shared/scripts/jquery-ui.min.js"
></script>
<script
src=
"shared/scripts/jquery-ui.min.js"
></script>
<script
src=
"shared/directives.js"
></script>
<script
src=
"shared/directives.js"
></script>
<script
src=
"zetalib/interceptors.js"
></script>
<script
src=
"zetalib/interceptors.js"
></script>
...
...
app/main.html
View file @
69d2bb3f
...
@@ -95,7 +95,6 @@
...
@@ -95,7 +95,6 @@
<script
src=
"tmp/templates.js"
></script>
<script
src=
"tmp/templates.js"
></script>
<script
src=
"app.js"
></script>
<script
src=
"app.js"
></script>
<script
src=
"app_routes.js"
></script>
<script
src=
"app_routes.js"
></script>
<script
src=
"shared/scripts/theme.js"
></script>
<script
src=
"shared/scripts/jquery-ui.min.js"
></script>
<script
src=
"shared/scripts/jquery-ui.min.js"
></script>
<script
src=
"shared/directives.js"
></script>
<script
src=
"shared/directives.js"
></script>
<script
src=
"zetalib/interceptors.js"
></script>
<script
src=
"zetalib/interceptors.js"
></script>
...
@@ -120,7 +119,6 @@
...
@@ -120,7 +119,6 @@
<script
src=
"shared/translations.js"
></script>
<script
src=
"shared/translations.js"
></script>
<script
src=
"templates.js"
></script>
<script
src=
"templates.js"
></script>
<script
src=
"app.js"
></script>
<script
src=
"app.js"
></script>
<script
src=
"bower_components/theme.js"
></script>
<!-- @endif -->
<!-- @endif -->
</body>
</body>
</html>
</html>
app/shared/directives.js
View file @
69d2bb3f
...
@@ -70,7 +70,7 @@ app.directive('sidebar', ['$location', function () {
...
@@ -70,7 +70,7 @@ app.directive('sidebar', ['$location', function () {
restrict
:
'E'
,
restrict
:
'E'
,
replace
:
true
,
replace
:
true
,
scope
:
{},
scope
:
{},
controller
:
function
(
$scope
,
$rootScope
,
$http
,
RESTURL
,
$location
)
{
controller
:
function
(
$scope
,
$rootScope
,
$http
,
RESTURL
,
$location
,
$timeout
)
{
$rootScope
.
$watch
(
$rootScope
.
$watch
(
$rootScope
.
loggedInUser
,
function
(){
$rootScope
.
loggedInUser
,
function
(){
$http
.
post
(
RESTURL
.
url
+
'crud/'
).
success
(
function
(
data
)
{
$http
.
post
(
RESTURL
.
url
+
'crud/'
).
success
(
function
(
data
)
{
...
@@ -79,9 +79,10 @@ app.directive('sidebar', ['$location', function () {
...
@@ -79,9 +79,10 @@ app.directive('sidebar', ['$location', function () {
}
}
);
);
//$http.post(RESTURL.url + 'crud/').success(function (data) {
$timeout
(
function
(){
// $scope.menuItems = data.app_models;
$
(
'#side-menu'
).
metisMenu
();
//});
console
.
log
(
'amk'
);
},
1000
);
$scope
.
selectedMenu
=
$location
.
path
();
$scope
.
selectedMenu
=
$location
.
path
();
$scope
.
collapseVar
=
0
;
$scope
.
collapseVar
=
0
;
...
...
app/zetalib/forms/form_service.js
View file @
69d2bb3f
...
@@ -238,8 +238,6 @@ form_generator.controller('ModalCtrl', function ($scope, $modalInstance, Generat
...
@@ -238,8 +238,6 @@ form_generator.controller('ModalCtrl', function ($scope, $modalInstance, Generat
$scope
[
key
]
=
items
[
key
];
$scope
[
key
]
=
items
[
key
];
});
});
console
.
log
(
items
);
Generator
.
prepareFormItems
(
$scope
);
Generator
.
prepareFormItems
(
$scope
);
$scope
.
onSubmit
=
function
(
form
)
{
$scope
.
onSubmit
=
function
(
form
)
{
...
...
dist/app.js
View file @
69d2bb3f
This diff is collapsed.
Click to expand it.
dist/templates.js
View file @
69d2bb3f
...
@@ -50,27 +50,36 @@ angular.module("components/crud/templates/list.html", []).run(["$templateCache",
...
@@ -50,27 +50,36 @@ angular.module("components/crud/templates/list.html", []).run(["$templateCache",
" Hepsini Seç
\n
"
+
" Hepsini Seç
\n
"
+
" </label>
\n
"
+
" </label>
\n
"
+
" </th>
\n
"
+
" </th>
\n
"
+
" <th ng-repeat=
\"
(key,value) in nobjects[0].data
\"
>{{ key }}</th>
\n
"
+
" <th ng-repeat=
\"
value in nobjects[0]
\"
ng-if=
\"
nobjects[0]!='-1'
\"
>{{ value }}</th>
\n
"
+
" <th ng-if=
\"
nobjects[0]=='-1'
\"
>{{ model }}</th>
\n
"
+
" <th>action</th>
\n
"
+
" <th>action</th>
\n
"
+
" </tr>
\n
"
+
" </tr>
\n
"
+
" </thead>
\n
"
+
" </thead>
\n
"
+
" <tbody>
\n
"
+
" <tbody>
\n
"
+
" <tr ng-repeat=
\"
object in nobjects
\"
>
\n
"
+
" <tr ng-repeat=
\"
object in nobjects
\"
ng-if=
\"
$index>0
\"
>
\n
"
+
" <td width=
\"
60
\"
>
\n
"
+
" <td width=
\"
60
\"
>
\n
"
+
" <label>
\n
"
+
" <label>
\n
"
+
" <input type=
\"
checkbox
\"
style=
\"
zoom:1.5; margin:5px 0 0 8px;
\"
>
\n
"
+
" <input type=
\"
checkbox
\"
style=
\"
zoom:1.5; margin:5px 0 0 8px;
\"
>
\n
"
+
" </label>
\n
"
+
" </label>
\n
"
+
" </td>
\n
"
+
" </td>
\n
"
+
" <th scope=
\"
row
\"
style=
\"
text-align:center
\"
>{{$index + 1}}</th>
\n
"
+
" <th scope=
\"
row
\"
style=
\"
text-align:center
\"
>{{$index}}</th>
\n
"
+
" <td ng-repeat=
\"
(key,value) in object.data
\"
>{{value}}</td>
\n
"
+
" <td ng-repeat=
\"
k in object
\"
ng-if=
\"
nobjects[0]=='-1' && $index>0
\"
>
\n
"
+
" <a ng-href=
\"
#/{{model}}/{{object[0]}}
\"
>{{object[1]}}</a>
\n
"
+
" </td>
\n
"
+
"
\n
"
+
" <td ng-repeat=
\"
(key,value) in object
\"
ng-if=
\"
nobjects[0]!='-1' && $index>0
\"
>
\n
"
+
" <a ng-href=
\"
#/{{model}}/{{object[0]}}
\"
ng-if=
\"
$index==1
\"
>{{value}}</a>
\n
"
+
" <span ng-if=
\"
$index!=1
\"
>{{value}}</span>
\n
"
+
" </td>
\n
"
+
" <td>
\n
"
+
" <td>
\n
"
+
" <a ng-href=
\"
#/{{model}}/edit/{{object.key}}
\"
>Edit</a><br>
\n
"
+
" <a ng-href=
\"
#/{{model}}/edit/{{object[0]}}
\"
>Edit</a><br>
\n
"
+
" <a ng-href=
\"
#/{{model}}/{{object.key}}
\"
>Show</a>
\n
"
+
" </td>
\n
"
+
" </td>
\n
"
+
" </tr>
\n
"
+
" </tr>
\n
"
+
" </tbody>
\n
"
+
" </tbody>
\n
"
+
" </table>
\n
"
+
" </table>
\n
"
+
" </div>
\n
"
+
" </div>
\n
"
+
" <br/>
\n
"
+
" <hr/>
\n
"
+
"
\n
"
+
"
\n
"
+
" <div class=
\"
btn-group
\"
>
\n
"
+
" <div class=
\"
btn-group
\"
>
\n
"
+
" <button type=
\"
button
\"
class=
\"
btn btn-default dropdown-toggle
\"
data-toggle=
\"
dropdown
\"
aria-haspopup=
\"
true
\"\n
"
+
" <button type=
\"
button
\"
class=
\"
btn btn-default dropdown-toggle
\"
data-toggle=
\"
dropdown
\"
aria-haspopup=
\"
true
\"\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