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 {
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(
//'ulakbus.version',
'schemaForm',
'gettext',
//'templates-prod'
'templates-prod'
]).
/**
* RESTURL is the url of rest api to talk
* Based on the environment it changes from dev to prod
*/
constant("RESTURL", (function () {
return {url: "http://" + window.location.hostname + ":9001/"};
//return {url: "http://api.ulakbus.net/"};
//return {url: "http://127.0.0.1:9001/"};
return {url: "http://api.ulakbus.net/"};
})()).
/**
* USER_ROLES and AUTH_EVENTS are constant for auth functions
......
......@@ -3,7 +3,7 @@
<div class="brand">
<a href="" class="logo"><img src="/img/brand-logo.png" /></a>
</div>
<ul class="nav in" id="side-menu">
<ul class="nav in sidebarscroll" id="side-menu">
<!--<sidebar-search></sidebar-search>-->
<li ui-sref-active="active">
<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;">
<thead>
<tr>
......@@ -27,4 +28,5 @@
</td>
</tr>
</tbody>
</table>
\ No newline at end of file
</table>
</div>
\ No newline at end of file
......@@ -93,7 +93,7 @@ form_generator.factory('Generator', function ($http, $q, $log, $location, $modal
// get model objects from db and add to select list
scope.form[scope.form.indexOf(v)] = formitem;
scope.$broadcast('schemaFormRedraw');
//scope.$broadcast('schemaFormRedraw');
// todo: make lines below work properly
//if (scope.model[v].indexOf("TMP_") > -1) {
......@@ -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
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
};
generator.submit = function ($scope) {
// todo: diff for all submits to recognize form change. if no change returns to view with no submit
data = {
debugger;
var data = {
"form": $scope.model,
"cmd": $scope.form_params.cmd,
"subcmd": "do_list",
......@@ -214,7 +217,8 @@ form_generator.factory('Generator', function ($http, $q, $log, $location, $modal
.success()
.then(function(res){
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 {
}
}
.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
......
......@@ -1000,7 +1000,7 @@ angular.module("shared/templates/directives/sidebar.html", []).run(["$templateCa
" <div class=\"brand\">\n" +
" <a href=\"\" class=\"logo\"><img src=\"/img/brand-logo.png\" /></a>\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" +
" <li ui-sref-active=\"active\">\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",
angular.module("shared/templates/nodeTable.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("shared/templates/nodeTable.html",
"<div class=\"tablescroll\">\n" +
"<table class=\"table table-bordered\" style=\"background-color:#fff;\">\n" +
" <thead>\n" +
" <tr>\n" +
......@@ -1263,5 +1264,6 @@ angular.module("shared/templates/nodeTable.html", []).run(["$templateCache", fun
" </td>\n" +
" </tr>\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