Commit 90a47357 authored by Evren Kutar's avatar Evren Kutar

sidebar and table scroll

submit data error fix
parent 8d7e24c9
...@@ -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
...@@ -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
......
...@@ -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>
......
<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
...@@ -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);
} }
}); });
}; };
......
This diff is collapsed.
...@@ -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
......
...@@ -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>");
}]); }]);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment