Commit 8d7e24c9 authored by Evren Kutar's avatar Evren Kutar

edit page model to form implementation

dashboard cleanup
parent 38722004
......@@ -118,13 +118,14 @@ module.exports = function (grunt) {
"app/bower_components/angular-loading-bar/build/loading-bar.min.js",
"app/bower_components/metisMenu/dist/metisMenu.min.js",
"app/bower_components/Chart.js/Chart.min.js",
"app/shared/scripts/jquery-ui.min.js",
"app/shared/scripts/jquery-ui.min.js"
],
dest: 'dist/bower_components/components.js'
},
css: {
files: {
'dist/css/app.css': [
"app/bower_components/angular-bootstrap/ui-bootstrap-csp.css",
"app/bower_components/bootstrap/dist/css/bootstrap.min.css",
"app/app.css",
"app/bower_components/metisMenu/dist/metisMenu.min.css",
......
......@@ -2,107 +2,107 @@
<div class="starter-template">
<!-- table view -->
<table class="table table-bordered" style="background-color:#fff;">
<thead>
<tr>
<th colspan="2">
<label>
<input type="checkbox" style="zoom:1.5; margin:5px 0 0 8px;">
Hepsini Seç
</label>
</th>
<th>First Name</th>
<th>Last Name</th>
<th>Username</th>
</tr>
</thead>
<tbody>
<tr>
<td width="60">
<label>
<input type="checkbox" style="zoom:1.5; margin:5px 0 0 8px;">
</label>
</td>
<th scope="row" style="text-align:center">1</th>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<td>
<label>
<input type="checkbox" style="zoom:1.5; margin:5px 0 0 8px;">
</label>
</td>
<th scope="row" style="text-align:center">2</th>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<td>
<label>
<input type="checkbox" style="zoom:1.5; margin:5px 0 0 8px;">
</label>
</td>
<th scope="row" style="text-align:center">3</th>
<td>Larry</td>
<td>the Bird</td>
<td>@twitter</td>
</tr>
<tr>
<td width="60">
<label>
<input type="checkbox" style="zoom:1.5; margin:5px 0 0 8px;">
</label>
</td>
<th scope="row" style="text-align:center">4</th>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<td>
<label>
<input type="checkbox" style="zoom:1.5; margin:5px 0 0 8px;">
</label>
</td>
<th scope="row" style="text-align:center">5</th>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<td>
<label>
<input type="checkbox" style="zoom:1.5; margin:5px 0 0 8px;">
</label>
</td>
<th scope="row" style="text-align:center">6</th>
<td>Larry</td>
<td>the Bird</td>
<td>@twitter</td>
</tr>
</tbody>
</table>
<!-- end of table view -->
<!--<table class="table table-bordered" style="background-color:#fff;">-->
<!--<thead>-->
<!--<tr>-->
<!--<th colspan="2">-->
<!--<label>-->
<!--<input type="checkbox" style="zoom:1.5; margin:5px 0 0 8px;">-->
<!--Hepsini Seç-->
<!--</label>-->
<!--</th>-->
<!--<th>First Name</th>-->
<!--<th>Last Name</th>-->
<!--<th>Username</th>-->
<!--</tr>-->
<!--</thead>-->
<!--<tbody>-->
<!--<tr>-->
<!--<td width="60">-->
<!--<label>-->
<!--<input type="checkbox" style="zoom:1.5; margin:5px 0 0 8px;">-->
<!--</label>-->
<!--</td>-->
<!--<th scope="row" style="text-align:center">1</th>-->
<!--<td>Mark</td>-->
<!--<td>Otto</td>-->
<!--<td>@mdo</td>-->
<!--</tr>-->
<!--<tr>-->
<!--<td>-->
<!--<label>-->
<!--<input type="checkbox" style="zoom:1.5; margin:5px 0 0 8px;">-->
<!--</label>-->
<!--</td>-->
<!--<th scope="row" style="text-align:center">2</th>-->
<!--<td>Jacob</td>-->
<!--<td>Thornton</td>-->
<!--<td>@fat</td>-->
<!--</tr>-->
<!--<tr>-->
<!--<td>-->
<!--<label>-->
<!--<input type="checkbox" style="zoom:1.5; margin:5px 0 0 8px;">-->
<!--</label>-->
<!--</td>-->
<!--<th scope="row" style="text-align:center">3</th>-->
<!--<td>Larry</td>-->
<!--<td>the Bird</td>-->
<!--<td>@twitter</td>-->
<!--</tr>-->
<!--<tr>-->
<!--<td width="60">-->
<!--<label>-->
<!--<input type="checkbox" style="zoom:1.5; margin:5px 0 0 8px;">-->
<!--</label>-->
<!--</td>-->
<!--<th scope="row" style="text-align:center">4</th>-->
<!--<td>Mark</td>-->
<!--<td>Otto</td>-->
<!--<td>@mdo</td>-->
<!--</tr>-->
<!--<tr>-->
<!--<td>-->
<!--<label>-->
<!--<input type="checkbox" style="zoom:1.5; margin:5px 0 0 8px;">-->
<!--</label>-->
<!--</td>-->
<!--<th scope="row" style="text-align:center">5</th>-->
<!--<td>Jacob</td>-->
<!--<td>Thornton</td>-->
<!--<td>@fat</td>-->
<!--</tr>-->
<!--<tr>-->
<!--<td>-->
<!--<label>-->
<!--<input type="checkbox" style="zoom:1.5; margin:5px 0 0 8px;">-->
<!--</label>-->
<!--</td>-->
<!--<th scope="row" style="text-align:center">6</th>-->
<!--<td>Larry</td>-->
<!--<td>the Bird</td>-->
<!--<td>@twitter</td>-->
<!--</tr>-->
<!--</tbody>-->
<!--</table>-->
<!--&lt;!&ndash; end of table view &ndash;&gt;-->
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
İşlemler <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="">İşlem 1</a></li>
<li><a href="">İşlem 2</a></li>
<li><a href="">İşlem 3</a></li>
<li role="separator" class="divider"></li>
<li><a href="">İşlem 4</a></li>
</ul>
</div>
<!--<div class="btn-group">-->
<!--<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true"-->
<!--aria-expanded="false">-->
<!--İşlemler <span class="caret"></span>-->
<!--</button>-->
<!--<ul class="dropdown-menu">-->
<!--<li><a href="">İşlem 1</a></li>-->
<!--<li><a href="">İşlem 2</a></li>-->
<!--<li><a href="">İşlem 3</a></li>-->
<!--<li role="separator" class="divider"></li>-->
<!--<li><a href="">İşlem 4</a></li>-->
<!--</ul>-->
<!--</div>-->
<hr>
<!--<hr>-->
</div>
</div>
\ No newline at end of file
/*! ulakbus-ui 2015-09-17 */
"use strict";var app=angular.module("ulakbus",["ui.bootstrap","angular-loading-bar","ngRoute","ngSanitize","ngCookies","general","formService","ulakbus.dashboard","ulakbus.auth","ulakbus.staff","ulakbus.student","ulakbus.crud","schemaForm","gettext","templates-prod"]).constant("RESTURL",function(){return{url:"http://api.ulakbus.net/"}}()).constant("USER_ROLES",{all:"*",admin:"admin",student:"student",staff:"staff",dean:"dean"}).constant("AUTH_EVENTS",{loginSuccess:"auth-login-success",loginFailed:"auth-login-failed",logoutSuccess:"auth-logout-success",sessionTimeout:"auth-session-timeout",notAuthenticated:"auth-not-authenticated",notAuthorized:"auth-not-authorized"});app.config(["$routeProvider",function($routeProvider){$routeProvider.when("/login",{templateUrl:"components/auth/login.html",controller:"LoginCtrl"}).when("/dashboard",{templateUrl:"components/dashboard/dashboard.html",controller:"DashCtrl"}).when("/:model/add",{templateUrl:"components/crud/templates/add.html",controller:"CRUDAddEditCtrl"}).when("/:model/edit/:id",{templateUrl:"components/crud/templates/add.html",controller:"CRUDAddEditCtrl"}).when("/:model",{templateUrl:"components/crud/templates/list.html",controller:"CRUDListCtrl"}).when("/:model/:id",{templateUrl:"components/crud/templates/show.html",controller:"CRUDShowCtrl"}).when("/staff/add",{templateUrl:"components/staff/templates/add.html",controller:"StaffAddEditCtrl"}).when("/staff/edit/:id",{templateUrl:"components/staff/templates/edit.html",controller:"StaffAddEditCtrl"}).when("/staffs",{templateUrl:"components/staff/templates/list.html",controller:"StaffListCtrl"}).when("/staff/:id",{templateUrl:"components/staff/templates/show.html",controller:"StaffShowCtrl"}).otherwise({redirectTo:"/dashboard"})}]).run(function($rootScope,$location,$cookies){$rootScope.loggedInUser?$rootScope.loggedInUser:!1,$rootScope.$on("$routeChangeStart",function(event,next,current){})}).config(["$httpProvider",function($httpProvider){$httpProvider.defaults.withCredentials=!0}]).run(function(gettextCatalog){gettextCatalog.setCurrentLanguage("tr"),gettextCatalog.debug=!0});var form_generator=angular.module("formService",["general"]);form_generator.factory("Generator",function($http,$q,$log,$location,$modal,$timeout,RESTURL,FormDiff){var generator={};return generator.makeUrl=function(url){return RESTURL.url+url},generator.generate=function(scope,data){return data.forms?(angular.forEach(data.forms,function(value,key){scope[key]=data.forms[key]}),scope.token=data.token,scope.initialModel=angular.copy(scope.model),generator.prepareFormItems(scope),scope.object_id=scope.form_params.object_id,generator.group(scope)):scope},generator.group=function(formObject){return formObject},generator.prepareFormItems=function(scope){return angular.forEach(scope.schema.properties,function(k,v){if("date"==k.type&&(k.type="string",scope.model[v]=generator.dateformatter(scope.model[v]),scope.$watch($("#"+v),function(){$timeout(function(){jQuery("#"+v).datepicker({dateFormat:"dd.mm.yy",onSelect:function(date){scope.model[v]=date}})})})),"int"==k.type&&(k.type="number"),"model"==k.type){var formitem=scope.form[scope.form.indexOf(v)];formitem={type:"template",templateUrl:"shared/templates/foreignKey.html",title:k.title};var modelscope={url:scope.url,form_params:{model:k.title}};generator.get_list(modelscope).then(function(res){formitem.titleMap=[],angular.forEach(res.data.objects,function(item){formitem.titleMap.push({value:item.key,name:item.data.name?item.data.name:item.data.username})})}),scope.form[scope.form.indexOf(v)]=formitem}("ListNode"==k.type||"Node"==k.type)&&(scope[k.type]=scope[k.type]?scope[k.type]:{},scope[k.type][k.title]={title:k.title,form:[],schema:{properties:{},required:[],title:k.title,type:"object",formType:k.type},model:{},url:scope.url},angular.forEach(k.schema,function(item){scope[k.type][k.title].schema.properties[item.name]=item,scope[k.type][k.title].model[item.name]=item.value,1==item.required&&"idx"!=item.name&&scope[k.type][k.title].schema.required.push(item.name),"idx"==item.name?scope[k.type][k.title].form.push({type:"string",key:item.name,htmlClass:"hidden"}):scope[k.type][k.title].form.push(item.name)}),scope[k.type][k.title].lengthModels=scope.model[k.title]?1:0)}),scope},generator.dateformatter=function(formObject){var ndate=new Date(formObject);if("Invalid Date"==ndate)return"";var newdatearray=[ndate.getDate(),ndate.getMonth(),ndate.getFullYear()];return newdatearray.join(".")},generator.get_form=function(scope){return $http.post(generator.makeUrl(scope.url),scope.form_params).then(function(res){return generator.generate(scope,res.data)})},generator.get_list=function(scope){return $http.post(generator.makeUrl(scope.url),scope.form_params).then(function(res){return res})},generator.get_single_item=function(scope){return $http.post(generator.makeUrl(scope.url),scope.form_params).then(function(res){return res})},generator.isValidEmail=function(email){var re=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;return re.test(email)},generator.asyncValidators={emailNotValid:function(value){var deferred=$q.defer();return $timeout(function(){generator.isValidEmail(value)?deferred.resolve():deferred.reject()},500),deferred.promise}},generator.submit=function($scope){data={form:$scope.model,cmd:$scope.form_params.cmd,subcmd:"do_list",model:$scope.form_params.model,token:$scope.token},$scope.object_id&&(data.object_id=$scope.object_id),$http.post(generator.makeUrl($scope.url),data).success().then(function(res){res.data.client_cmd&&$location.path(data.model)})},generator}),form_generator.controller("ModalCtrl",function($scope,$modalInstance,Generator,$route,items){angular.forEach(items,function(value,key){$scope[key]=items[key]}),console.log(items),Generator.prepareFormItems($scope),$scope.onSubmit=function(form){$scope.$broadcast("schemaFormValidate"),console.log(form.$valid),$modalInstance.close($scope)},$scope.cancel=function(){$modalInstance.dismiss("cancel")}}),form_generator.directive("modalForNodes",function($modal){return{link:function(scope,element,attributes){element.on("click",function(){var modalInstance=$modal.open({animation:!1,templateUrl:"shared/templates/listnodeModalContent.html",controller:"ModalCtrl",size:"lg",resolve:{items:function(){var attribs=attributes.modalForNodes.split(","),node=angular.copy(scope.$parent.$parent[attribs[1]][attribs[0]]);return node}}});modalInstance.result.then(function(childmodel,key){"Node"==childmodel.schema.formType&&(scope.$parent.model[childmodel.schema.title]=childmodel.model),"ListNode"==childmodel.schema.formType&&(null==scope.$parent.model[childmodel.schema.title]&&(scope.$parent.model[childmodel.schema.title]=[]),scope.$parent.model[childmodel.schema.title].push(childmodel.model)),childmodel.lengthModels+=1})})}}}),form_generator.directive("addModalForLinkedModel",function($modal,Generator){return{link:function(scope,element){element.on("click",function(){var modalInstance=$modal.open({animation:!1,templateUrl:"shared/templates/linkedModelModalContent.html",controller:"ModalCtrl",size:"lg",resolve:{items:function(){return Generator.get_form({url:"crud",form_params:{model:scope.form.title,cmd:"add"}})}}});modalInstance.result.then(function(childmodel,key){Generator.submit(scope)})})}}}),form_generator.directive("editModalForLinkedModel",function($modal,Generator){return{link:function(scope,element){element.on("click",function(){var modalInstance=$modal.open({animation:!1,templateUrl:"shared/templates/linkedModelModalContent.html",controller:"ModalCtrl",size:"lg",resolve:{items:function(){return Generator.get_form({url:"crud",form_params:{model:scope.form.title,cmd:"add"}})}}});modalInstance.result.then(function(childmodel,key){Generator.submit(scope)})})}}});var general=angular.module("general",[]);general.factory("FormDiff",function(){var formDiff={};return formDiff.get_diff=function(obj1,obj2){var result={};for(key in obj1)obj2[key]!=obj1[key]&&(result[key]=obj1[key]),"array"==typeof obj2[key]&&"array"==typeof obj1[key]&&(result[key]=arguments.callee(obj1[key],obj2[key])),"object"==typeof obj2[key]&&"object"==typeof obj1[key]&&(result[key]=arguments.callee(obj1[key],obj2[key]));return result},formDiff}),app.config(["$httpProvider",function($httpProvider){$httpProvider.interceptors.push(function($q,$rootScope,$location){return{request:function(config){return"POST"==config.method&&(config.headers["Content-Type"]="text/plain"),config},response:function(response){return response.data.is_login===!0&&($rootScope.loggedInUser=response.data.is_login,"/login"===$location.path()&&$location.path("/dashboard")),response.data.client_cmd&&console.log(response.data.client_cmd),response},responseError:function(rejection){return 400===rejection.status&&$location.reload(),401===rejection.status&&($rootScope.loggedInUser=!1,"/login"===$location.path()?console.log("show errors on login form"):$location.path("/login")),$q.reject(rejection)}}})}]),$(function(){$("#side-menu").metisMenu()}),$(function(){$(window).bind("load resize",function(){topOffset=50,width=this.window.innerWidth>0?this.window.innerWidth:this.screen.width,width<768?($("div.navbar-collapse").addClass("collapse"),topOffset=100):$("div.navbar-collapse").removeClass("collapse"),height=(this.window.innerHeight>0?this.window.innerHeight:this.screen.height)-1,height-=topOffset,height<1&&(height=1),height>topOffset&&$("#page-wrapper").css("min-height",height+"px")});var url=window.location,element=$("ul.nav a").filter(function(){return this.href==url||0==url.href.indexOf(this.href)}).addClass("active").parent().parent().addClass("in").parent();element.is("li")&&element.addClass("active")}),app.directive("logout",function($http,$location){return{link:function($scope,$element,$rootScope){$element.on("click",function(){$http.post("http://"+window.location.hostname+":9001/logout",{}).then(function(){$rootScope.loggedInUser=!1,console.log($rootScope.loggedInUser),$location.path("/login"),$scope.$apply()})})}}}),app.directive("headerNotification",function(){return{templateUrl:"shared/templates/directives/header-notification.html",restrict:"E",replace:!0}}),app.directive("headerSubMenu",function(){return{templateUrl:"shared/templates/directives/header-sub-menu.html",restrict:"E",controller:"CRUDAddEditCtrl",replace:!0,link:function($scope){$scope.triggerSubmit=function(){angular.element($("#submitbutton")).triggerHandler("click"),angular.element($("#submitbutton")).triggerHandler("click")}}}}),app.directive("headerBreadcrumb",function($location){return{templateUrl:"shared/templates/directives/header-breadcrumb.html",restrict:"E",replace:!0,link:function($scope){$scope.$watch("$routeUpdate",function(){$scope.links=$location.path().split("/")})}}}),app.directive("sidebar",["$location",function(){return{templateUrl:"shared/templates/directives/sidebar.html",restrict:"E",replace:!0,scope:{},controller:function($scope,$http,RESTURL){$http.post(RESTURL.url+"crud/").success(function(data){$scope.menuItems=data.models}),$scope.selectedMenu="dashboard",$scope.collapseVar=0,$scope.multiCollapseVar=0,$scope.check=function(x){x==$scope.collapseVar?$scope.collapseVar=0:$scope.collapseVar=x},$scope.multiCheck=function(y){y==$scope.multiCollapseVar?$scope.multiCollapseVar=0:$scope.multiCollapseVar=y}}}}]),app.directive("stats",function(){return{templateUrl:"shared/templates/directives/stats.html",restrict:"E",replace:!0,scope:{model:"=",comments:"@",number:"@",name:"@",colour:"@",details:"@",type:"@","goto":"@"}}}),app.directive("notifications",function(){return{templateUrl:"shared/templates/directives/notifications.html",restrict:"E",replace:!0}}),app.directive("sidebarSearch",function(){return{templateUrl:"shared/templates/directives/sidebar-search.html",restrict:"E",replace:!0,scope:{},controller:function($scope){$scope.selectedMenu="home"}}}),app.directive("timeline",function(){return{templateUrl:"shared/templates/directives/timeline.html",restrict:"E",replace:!0}}),app.directive("chat",function(){return{templateUrl:"shared/templates/directives/chat.html",restrict:"E",replace:!0}});var auth=angular.module("ulakbus.auth",["ngRoute","schemaForm","ngCookies","general"]);auth.controller("LoginCtrl",function($scope,$q,$timeout,$routeParams,Generator,LoginService){$scope.url="login",$scope.form_params={},$scope.form_params.clear_wf=1,Generator.get_form($scope).then(function(data){$scope.form=["*",{key:"password",type:"password"},{type:"submit",title:"Save"}]}),$scope.onSubmit=function(form){$scope.$broadcast("schemaFormValidate"),form.$valid?LoginService.login($scope.url,$scope.model).error(function(data){$scope.message=data.title}):console.log("not valid")}}),auth.factory("LoginService",function($http,$rootScope,$location,$log,$cookies,$window,Session,RESTURL){var loginService={};return loginService.login=function(url,credentials){return credentials={login_crd:credentials,cmd:"do"},$http.post(RESTURL.url+url,credentials).success(function(data,status,headers,config){$rootScope.loggedInUser=!0}).error(function(data,status,headers,config){return data})},loginService.logout=function(){console.log("logout"),$http.post(RESTURL.url+"logout",{}).then(function(){$rootScope.loggedInUser=!1,$location.path("/login")}),console.log("loggedout")},loginService.isAuthenticated=function(){return!!Session.userId},loginService.isAuthorized=function(authorizedRoles){return angular.isArray(authorizedRoles)||(authorizedRoles=[authorizedRoles]),loginService.isAuthenticated()&&-1!==loginService.indexOf(Session.userRole)},loginService.isValidEmail=function(email){var re=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;return re.test(email)},loginService}),auth.service("Session",function(){this.create=function(sessionId,userId,userRole){this.id=sessionId,this.userId=userId,this.userRole=userRole},this.destroy=function(){this.id=null,this.userId=null,this.userRole=null}});var crud=angular.module("ulakbus.crud",["ngRoute","schemaForm","formService","ui.bootstrap"]);crud.controller("CRUDAddEditCtrl",function($scope,$rootScope,$location,$http,$log,$modal,$timeout,Generator,$routeParams){$scope.url="crud",$scope.form_params={model:$routeParams.model},$routeParams.id?($scope.form_params.object_id=$routeParams.id,$scope.form_params.cmd="edit"):$scope.form_params.cmd="add",$routeParams.model&&Generator.get_form($scope),$scope.onSubmit=function(form){$scope.$broadcast("schemaFormValidate"),form.$valid&&Generator.submit($scope).success(function(data){$location.path("/crud")}).error(function(data){$scope.message=data.title})}}),crud.controller("CRUDListCtrl",function($scope,$rootScope,Generator,$routeParams){$scope.url="crud",$scope.form_params={model:$routeParams.model},Generator.get_list($scope).then(function(res){var data=res.data.objects;for(var item in data)delete data[item].data.deleted,delete data[item].data.timestamp;$scope.objects=data,$scope.model=$routeParams.model})}),crud.controller("CRUDShowCtrl",function($scope,$rootScope,Generator,$routeParams){$scope.url="crud",$scope.form_params={object_id:$routeParams.id,cmd:"show",model:$routeParams.model},Generator.get_single_item($scope).then(function(res){$scope.object=res.data.object,$scope.model=$routeParams.model})}),angular.module("ulakbus.dashboard",["ngRoute"]).controller("DashCtrl",function($scope,$rootScope,$location){$rootScope.loggedInUser||$location.path("/login"),$scope.testData="<h1>This is main Dashboard</h1>"}),angular.module("ulakbus.pinfo",["ngRoute"]).controller("PCtrl",function($scope){$scope.testData="<h1>This is main Dashboard</h1>"});var staff=angular.module("ulakbus.staff",["ngRoute","schemaForm","formService","ui.bootstrap"]);staff.controller("StaffAddEditCtrl",function($scope,$rootScope,$location,$http,$log,$modal,Generator,$routeParams){$scope.url="personel_duzenle_basitlestirilmis",$scope.form_params={},$routeParams.id?($scope.form_params.object_id=$routeParams.id,$scope.form_params.cmd="edit_object"):$scope.form_params.cmd="add_object",$scope.form_params.clear_wf=1,Generator.get_form($scope),$scope.onSubmit=function(form){$scope.$broadcast("schemaFormValidate"),form.$valid&&Generator.submit($scope).success(function(data){$location.path("/staffs")}).error(function(data){$scope.message=data.title})}}),staff.controller("StaffListCtrl",function($scope,$rootScope,Generator){$scope.url="personel_duzenle_basitlestirilmis",$scope.form_params={clear_wf:1},Generator.get_list($scope).then(function(res){var data=res.data.employees;for(var item in data)delete data[item].data.deleted,delete data[item].data.timestamp;$scope.staffs=data})}),staff.controller("StaffShowCtrl",function($scope,$rootScope,Generator,$routeParams){$scope.url="personel_duzenle_basitlestirilmis",$scope.form_params={object_id:$routeParams.id,clear_wf:1},Generator.get_single_item($scope).then(function(res){$scope.staff=res.data.employees[0].data})});var student=angular.module("ulakbus.student",["ngRoute","schemaForm","formService","general"]);student.controller("StudentAddEditCtrl",function($scope,$http,$log,Generator,$routeParams){Generator.get_form("add_student",$routeParams).then(function(d){$scope.schema=d.schema,$scope.form=d.form,$scope.model=d.model?d.model:{},$scope.initialModel=angular.copy(d.model),$scope.form[0].$asyncValidators=Generator.asyncValidators,$scope.form.push({type:"submit",title:"Save"})}),$scope.onSubmit=function(form){$scope.$broadcast("schemaFormValidate"),form.$valid&&Generator.submit("add_staff",$scope)}}),student.controller("StudentListCtrl",function($scope,$http){$http.get("http://127.0.0.1:3000/api/list_student").then(function(res){$scope.students=res.data})});var staff=angular.module("ulakbus.types",["ngRoute","schemaForm","formService"]);staff.controller("TypeCtrl",function($scope,$http,$log,Generator,$routeParams){Generator.get_form("input_types",$routeParams).then(function(d){$scope.congressFilter="Choice",$scope.schema=d.schema,$scope.form=d.form,$scope.model={},$scope.form[0].$asyncValidators=Generator.asyncValidators,$scope.form.push({type:"submit",title:"Save"})}),$scope.onSubmit=function(form){$scope.$broadcast("schemaFormValidate"),form.$valid&&$log.info($scope)}}),auth.factory("LoginService",function($http,$rootScope,$location,$log,$cookies,$window,Session,RESTURL){var loginService={};return loginService.login=function(url,credentials){return credentials.cmd="do",$http.post(RESTURL.url+url,credentials).success(function(data,status,headers,config){$rootScope.loggedInUser=!0}).error(function(data,status,headers,config){return data})},loginService.logout=function(){console.log("logout"),$http.post(RESTURL.url+"logout",{}).then(function(){$rootScope.loggedInUser=!1,$location.path("/login")}),console.log("loggedout")},loginService.isAuthenticated=function(){return!!Session.userId},loginService.isAuthorized=function(authorizedRoles){return angular.isArray(authorizedRoles)||(authorizedRoles=[authorizedRoles]),loginService.isAuthenticated()&&-1!==loginService.indexOf(Session.userRole)},loginService.isValidEmail=function(email){var re=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;return re.test(email)},loginService}),auth.service("Session",function(){this.create=function(sessionId,userId,userRole){this.id=sessionId,this.userId=userId,this.userRole=userRole},this.destroy=function(){this.id=null,this.userId=null,this.userRole=null}});
\ No newline at end of file
"use strict";var app=angular.module("ulakbus",["ui.bootstrap","angular-loading-bar","ngRoute","ngSanitize","ngCookies","general","formService","ulakbus.dashboard","ulakbus.auth","ulakbus.staff","ulakbus.student","ulakbus.crud","schemaForm","gettext","templates-prod"]).constant("RESTURL",function(){return{url:"http://api.ulakbus.net/"}}()).constant("USER_ROLES",{all:"*",admin:"admin",student:"student",staff:"staff",dean:"dean"}).constant("AUTH_EVENTS",{loginSuccess:"auth-login-success",loginFailed:"auth-login-failed",logoutSuccess:"auth-logout-success",sessionTimeout:"auth-session-timeout",notAuthenticated:"auth-not-authenticated",notAuthorized:"auth-not-authorized"});app.config(["$routeProvider",function($routeProvider){$routeProvider.when("/login",{templateUrl:"components/auth/login.html",controller:"LoginCtrl"}).when("/dashboard",{templateUrl:"components/dashboard/dashboard.html",controller:"DashCtrl"}).when("/:model/add",{templateUrl:"components/crud/templates/add.html",controller:"CRUDAddEditCtrl"}).when("/:model/edit/:id",{templateUrl:"components/crud/templates/add.html",controller:"CRUDAddEditCtrl"}).when("/:model",{templateUrl:"components/crud/templates/list.html",controller:"CRUDListCtrl"}).when("/:model/:id",{templateUrl:"components/crud/templates/show.html",controller:"CRUDShowCtrl"}).when("/staff/add",{templateUrl:"components/staff/templates/add.html",controller:"StaffAddEditCtrl"}).when("/staff/edit/:id",{templateUrl:"components/staff/templates/edit.html",controller:"StaffAddEditCtrl"}).when("/staffs",{templateUrl:"components/staff/templates/list.html",controller:"StaffListCtrl"}).when("/staff/:id",{templateUrl:"components/staff/templates/show.html",controller:"StaffShowCtrl"}).otherwise({redirectTo:"/dashboard"})}]).run(function($rootScope,$location,$cookies){$rootScope.loggedInUser?$rootScope.loggedInUser:!1,$rootScope.$on("$routeChangeStart",function(event,next,current){})}).config(["$httpProvider",function($httpProvider){$httpProvider.defaults.withCredentials=!0}]).run(function(gettextCatalog){gettextCatalog.setCurrentLanguage("tr"),gettextCatalog.debug=!0});var form_generator=angular.module("formService",["general"]);form_generator.factory("Generator",function($http,$q,$log,$location,$modal,$timeout,RESTURL,FormDiff){var generator={};return generator.makeUrl=function(url){return RESTURL.url+url},generator.generate=function(scope,data){return data.forms?(angular.forEach(data.forms,function(value,key){scope[key]=data.forms[key]}),scope.token=data.token,scope.initialModel=angular.copy(scope.model),generator.prepareFormItems(scope),scope.object_id=scope.form_params.object_id,generator.group(scope)):scope},generator.group=function(formObject){return formObject},generator.prepareFormItems=function(scope){return angular.forEach(scope.schema.properties,function(k,v){if("date"==k.type&&(k.type="string",scope.model[v]=generator.dateformatter(scope.model[v]),scope.$watch($("#"+v),function(){$timeout(function(){jQuery("#"+v).datepicker({dateFormat:"dd.mm.yy",onSelect:function(date){scope.model[v]=date}})})})),"int"==k.type&&(k.type="number"),"model"==k.type){var formitem=scope.form[scope.form.indexOf(v)],modelscope={url:scope.url,form_params:{model:k.title}};formitem={type:"template",templateUrl:"shared/templates/foreignKey.html",title:k.title,titleMap:generator.get_list(modelscope).then(function(res){formitem.titleMap=[],angular.forEach(res.data.objects,function(item){formitem.titleMap.push({value:item.key,name:item.data.name?item.data.name:item.data.username})})}),onChange:function(modelValue,form){scope.model[v]=modelValue}},scope.form[scope.form.indexOf(v)]=formitem,scope.$broadcast("schemaFormRedraw")}("ListNode"==k.type||"Node"==k.type)&&(scope[k.type]=scope[k.type]?scope[k.type]:{},scope[k.type][k.title]={title:k.title,form:[],schema:{properties:{},required:[],title:k.title,type:"object",formType:k.type},url:scope.url},scope[k.type][k.title].model=null!=scope.model[v]?scope.model[v]:{},angular.forEach(k.schema,function(item){scope[k.type][k.title].schema.properties[item.name]=item,1==item.required&&"idx"!=item.name&&scope[k.type][k.title].schema.required.push(item.name),"idx"==item.name?scope[k.type][k.title].form.push({type:"string",key:item.name,htmlClass:"hidden"}):scope[k.type][k.title].form.push(item.name)}),scope[k.type][k.title].lengthModels=scope.model[k.title]?1:0)}),scope},generator.dateformatter=function(formObject){var ndate=new Date(formObject);if("Invalid Date"==ndate)return"";var newdatearray=[ndate.getDate(),ndate.getMonth(),ndate.getFullYear()];return newdatearray.join(".")},generator.get_form=function(scope){return $http.post(generator.makeUrl(scope.url),scope.form_params).then(function(res){return generator.generate(scope,res.data)})},generator.get_list=function(scope){return $http.post(generator.makeUrl(scope.url),scope.form_params).then(function(res){return res})},generator.get_single_item=function(scope){return $http.post(generator.makeUrl(scope.url),scope.form_params).then(function(res){return res})},generator.isValidEmail=function(email){var re=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;return re.test(email)},generator.asyncValidators={emailNotValid:function(value){var deferred=$q.defer();return $timeout(function(){generator.isValidEmail(value)?deferred.resolve():deferred.reject()},500),deferred.promise}},generator.submit=function($scope){data={form:$scope.model,cmd:$scope.form_params.cmd,subcmd:"do_list",model:$scope.form_params.model,token:$scope.token},$scope.object_id&&(data.object_id=$scope.object_id),$http.post(generator.makeUrl($scope.url),data).success().then(function(res){res.data.client_cmd&&$location.path(data.model)})},generator}),form_generator.controller("ModalCtrl",function($scope,$modalInstance,Generator,$route,items){angular.forEach(items,function(value,key){$scope[key]=items[key]}),console.log(items),Generator.prepareFormItems($scope),$scope.onSubmit=function(form){$scope.$broadcast("schemaFormValidate"),console.log(form.$valid),$modalInstance.close($scope)},$scope.cancel=function(){$modalInstance.dismiss("cancel")}}),form_generator.directive("modalForNodes",function($modal){return{link:function(scope,element,attributes){element.on("click",function(){var modalInstance=$modal.open({animation:!1,templateUrl:"shared/templates/listnodeModalContent.html",controller:"ModalCtrl",size:"lg",resolve:{items:function(){var attribs=attributes.modalForNodes.split(","),node=angular.copy(scope.$parent.$parent[attribs[1]][attribs[0]]);return node}}});modalInstance.result.then(function(childmodel,key){"Node"==childmodel.schema.formType&&(scope.$parent.model[childmodel.schema.title]=childmodel.model),"ListNode"==childmodel.schema.formType&&(null==scope.$parent.model[childmodel.schema.title]&&(scope.$parent.model[childmodel.schema.title]=[]),scope.$parent.model[childmodel.schema.title].push(childmodel.model)),childmodel.lengthModels+=1})})}}}),form_generator.directive("addModalForLinkedModel",function($modal,Generator){return{link:function(scope,element){element.on("click",function(){var modalInstance=$modal.open({animation:!1,templateUrl:"shared/templates/linkedModelModalContent.html",controller:"ModalCtrl",size:"lg",resolve:{items:function(){return Generator.get_form({url:"crud",form_params:{model:scope.form.title,cmd:"add"}})}}});modalInstance.result.then(function(childmodel,key){Generator.submit(scope)})})}}}),form_generator.directive("editModalForLinkedModel",function($modal,Generator){return{link:function(scope,element){element.on("click",function(){var modalInstance=$modal.open({animation:!1,templateUrl:"shared/templates/linkedModelModalContent.html",controller:"ModalCtrl",size:"lg",resolve:{items:function(){return Generator.get_form({url:"crud",form_params:{model:scope.form.title,cmd:"add"}})}}});modalInstance.result.then(function(childmodel,key){Generator.submit(scope)})})}}});var general=angular.module("general",[]);general.factory("FormDiff",function(){var formDiff={};return formDiff.get_diff=function(obj1,obj2){var result={};for(key in obj1)obj2[key]!=obj1[key]&&(result[key]=obj1[key]),"array"==typeof obj2[key]&&"array"==typeof obj1[key]&&(result[key]=arguments.callee(obj1[key],obj2[key])),"object"==typeof obj2[key]&&"object"==typeof obj1[key]&&(result[key]=arguments.callee(obj1[key],obj2[key]));return result},formDiff}),app.config(["$httpProvider",function($httpProvider){$httpProvider.interceptors.push(function($q,$rootScope,$location){return{request:function(config){return"POST"==config.method&&(config.headers["Content-Type"]="text/plain"),config},response:function(response){return response.data.is_login===!0&&($rootScope.loggedInUser=response.data.is_login,"/login"===$location.path()&&$location.path("/dashboard")),response.data.client_cmd&&console.log(response.data.client_cmd),response},responseError:function(rejection){return 400===rejection.status&&$location.reload(),401===rejection.status&&($rootScope.loggedInUser=!1,"/login"===$location.path()?console.log("show errors on login form"):$location.path("/login")),$q.reject(rejection)}}})}]),$(function(){$("#side-menu").metisMenu()}),$(function(){$(window).bind("load resize",function(){topOffset=50,width=this.window.innerWidth>0?this.window.innerWidth:this.screen.width,width<768?($("div.navbar-collapse").addClass("collapse"),topOffset=100):$("div.navbar-collapse").removeClass("collapse"),height=(this.window.innerHeight>0?this.window.innerHeight:this.screen.height)-1,height-=topOffset,height<1&&(height=1),height>topOffset&&$("#page-wrapper").css("min-height",height+"px")});var url=window.location,element=$("ul.nav a").filter(function(){return this.href==url||0==url.href.indexOf(this.href)}).addClass("active").parent().parent().addClass("in").parent();element.is("li")&&element.addClass("active")}),app.directive("logout",function($http,$location){return{link:function($scope,$element,$rootScope){$element.on("click",function(){$http.post("http://"+window.location.hostname+":9001/logout",{}).then(function(){$rootScope.loggedInUser=!1,console.log($rootScope.loggedInUser),$location.path("/login"),$scope.$apply()})})}}}),app.directive("headerNotification",function(){return{templateUrl:"shared/templates/directives/header-notification.html",restrict:"E",replace:!0}}),app.directive("headerSubMenu",function(){return{templateUrl:"shared/templates/directives/header-sub-menu.html",restrict:"E",controller:"CRUDAddEditCtrl",replace:!0,link:function($scope){$scope.triggerSubmit=function(){angular.element($("#submitbutton")).triggerHandler("click"),angular.element($("#submitbutton")).triggerHandler("click")}}}}),app.directive("headerBreadcrumb",function($location){return{templateUrl:"shared/templates/directives/header-breadcrumb.html",restrict:"E",replace:!0,link:function($scope){$scope.$watch("$routeUpdate",function(){$scope.links=$location.path().split("/")})}}}),app.directive("sidebar",["$location",function(){return{templateUrl:"shared/templates/directives/sidebar.html",restrict:"E",replace:!0,scope:{},controller:function($scope,$http,RESTURL){$http.post(RESTURL.url+"crud").success(function(data){$scope.menuItems=data.models}),$scope.selectedMenu="dashboard",$scope.collapseVar=0,$scope.multiCollapseVar=0,$scope.check=function(x){x==$scope.collapseVar?$scope.collapseVar=0:$scope.collapseVar=x},$scope.multiCheck=function(y){y==$scope.multiCollapseVar?$scope.multiCollapseVar=0:$scope.multiCollapseVar=y}}}}]),app.directive("stats",function(){return{templateUrl:"shared/templates/directives/stats.html",restrict:"E",replace:!0,scope:{model:"=",comments:"@",number:"@",name:"@",colour:"@",details:"@",type:"@","goto":"@"}}}),app.directive("notifications",function(){return{templateUrl:"shared/templates/directives/notifications.html",restrict:"E",replace:!0}}),app.directive("sidebarSearch",function(){return{templateUrl:"shared/templates/directives/sidebar-search.html",restrict:"E",replace:!0,scope:{},controller:function($scope){$scope.selectedMenu="home"}}}),app.directive("timeline",function(){return{templateUrl:"shared/templates/directives/timeline.html",restrict:"E",replace:!0}}),app.directive("chat",function(){return{templateUrl:"shared/templates/directives/chat.html",restrict:"E",replace:!0}});var auth=angular.module("ulakbus.auth",["ngRoute","schemaForm","ngCookies","general"]);auth.controller("LoginCtrl",function($scope,$q,$timeout,$routeParams,Generator,LoginService){$scope.url="login",$scope.form_params={},$scope.form_params.clear_wf=1,Generator.get_form($scope).then(function(data){$scope.form=["*",{key:"password",type:"password"},{type:"submit",title:"Save"}]}),$scope.onSubmit=function(form){$scope.$broadcast("schemaFormValidate"),form.$valid?LoginService.login($scope.url,$scope.model).error(function(data){$scope.message=data.title}):console.log("not valid")}}),auth.factory("LoginService",function($http,$rootScope,$location,$log,$cookies,$window,Session,RESTURL){var loginService={};return loginService.login=function(url,credentials){return credentials={login_crd:credentials,cmd:"do"},$http.post(RESTURL.url+url,credentials).success(function(data,status,headers,config){$rootScope.loggedInUser=!0}).error(function(data,status,headers,config){return data})},loginService.logout=function(){console.log("logout"),$http.post(RESTURL.url+"logout",{}).then(function(){$rootScope.loggedInUser=!1,$location.path("/login")}),console.log("loggedout")},loginService.isAuthenticated=function(){return!!Session.userId},loginService.isAuthorized=function(authorizedRoles){return angular.isArray(authorizedRoles)||(authorizedRoles=[authorizedRoles]),loginService.isAuthenticated()&&-1!==loginService.indexOf(Session.userRole)},loginService.isValidEmail=function(email){var re=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;return re.test(email)},loginService}),auth.service("Session",function(){this.create=function(sessionId,userId,userRole){this.id=sessionId,this.userId=userId,this.userRole=userRole},this.destroy=function(){this.id=null,this.userId=null,this.userRole=null}});var crud=angular.module("ulakbus.crud",["ngRoute","schemaForm","formService","ui.bootstrap"]);crud.controller("CRUDAddEditCtrl",function($scope,$rootScope,$location,$http,$log,$modal,$timeout,Generator,$routeParams){$scope.url="crud",$scope.form_params={model:$routeParams.model},$routeParams.id?($scope.form_params.object_id=$routeParams.id,$scope.form_params.cmd="edit"):$scope.form_params.cmd="add",$routeParams.model&&Generator.get_form($scope),$scope.onSubmit=function(form){$scope.$broadcast("schemaFormValidate"),form.$valid&&Generator.submit($scope).success(function(data){$location.path("/crud")}).error(function(data){$scope.message=data.title})}}),crud.controller("CRUDListCtrl",function($scope,$rootScope,Generator,$routeParams){$scope.url="crud",$scope.form_params={model:$routeParams.model},Generator.get_list($scope).then(function(res){var data=res.data.objects;for(var item in data)delete data[item].data.deleted,delete data[item].data.timestamp;$scope.objects=data,$scope.model=$routeParams.model})}),crud.controller("CRUDShowCtrl",function($scope,$rootScope,Generator,$routeParams){$scope.url="crud",$scope.form_params={object_id:$routeParams.id,cmd:"show",model:$routeParams.model},Generator.get_single_item($scope).then(function(res){$scope.object=res.data.object,$scope.model=$routeParams.model})}),angular.module("ulakbus.dashboard",["ngRoute"]).controller("DashCtrl",function($scope,$rootScope,$location){$rootScope.loggedInUser||$location.path("/login"),$scope.testData="<h1>This is main Dashboard</h1>"}),angular.module("ulakbus.pinfo",["ngRoute"]).controller("PCtrl",function($scope){$scope.testData="<h1>This is main Dashboard</h1>"});var staff=angular.module("ulakbus.staff",["ngRoute","schemaForm","formService","ui.bootstrap"]);staff.controller("StaffAddEditCtrl",function($scope,$rootScope,$location,$http,$log,$modal,Generator,$routeParams){$scope.url="personel_duzenle_basitlestirilmis",$scope.form_params={},$routeParams.id?($scope.form_params.object_id=$routeParams.id,$scope.form_params.cmd="edit_object"):$scope.form_params.cmd="add_object",$scope.form_params.clear_wf=1,Generator.get_form($scope),$scope.onSubmit=function(form){$scope.$broadcast("schemaFormValidate"),form.$valid&&Generator.submit($scope).success(function(data){$location.path("/staffs")}).error(function(data){$scope.message=data.title})}}),staff.controller("StaffListCtrl",function($scope,$rootScope,Generator){$scope.url="personel_duzenle_basitlestirilmis",$scope.form_params={clear_wf:1},Generator.get_list($scope).then(function(res){var data=res.data.employees;for(var item in data)delete data[item].data.deleted,delete data[item].data.timestamp;$scope.staffs=data})}),staff.controller("StaffShowCtrl",function($scope,$rootScope,Generator,$routeParams){$scope.url="personel_duzenle_basitlestirilmis",$scope.form_params={object_id:$routeParams.id,clear_wf:1},Generator.get_single_item($scope).then(function(res){$scope.staff=res.data.employees[0].data})});var student=angular.module("ulakbus.student",["ngRoute","schemaForm","formService","general"]);student.controller("StudentAddEditCtrl",function($scope,$http,$log,Generator,$routeParams){Generator.get_form("add_student",$routeParams).then(function(d){$scope.schema=d.schema,$scope.form=d.form,$scope.model=d.model?d.model:{},$scope.initialModel=angular.copy(d.model),$scope.form[0].$asyncValidators=Generator.asyncValidators,$scope.form.push({type:"submit",title:"Save"})}),$scope.onSubmit=function(form){$scope.$broadcast("schemaFormValidate"),form.$valid&&Generator.submit("add_staff",$scope)}}),student.controller("StudentListCtrl",function($scope,$http){$http.get("http://127.0.0.1:3000/api/list_student").then(function(res){$scope.students=res.data})});var staff=angular.module("ulakbus.types",["ngRoute","schemaForm","formService"]);staff.controller("TypeCtrl",function($scope,$http,$log,Generator,$routeParams){Generator.get_form("input_types",$routeParams).then(function(d){$scope.congressFilter="Choice",$scope.schema=d.schema,$scope.form=d.form,$scope.model={},$scope.form[0].$asyncValidators=Generator.asyncValidators,$scope.form.push({type:"submit",title:"Save"})}),$scope.onSubmit=function(form){$scope.$broadcast("schemaFormValidate"),form.$valid&&$log.info($scope)}}),auth.factory("LoginService",function($http,$rootScope,$location,$log,$cookies,$window,Session,RESTURL){var loginService={};return loginService.login=function(url,credentials){return credentials.cmd="do",$http.post(RESTURL.url+url,credentials).success(function(data,status,headers,config){$rootScope.loggedInUser=!0}).error(function(data,status,headers,config){return data})},loginService.logout=function(){console.log("logout"),$http.post(RESTURL.url+"logout",{}).then(function(){$rootScope.loggedInUser=!1,$location.path("/login")}),console.log("loggedout")},loginService.isAuthenticated=function(){return!!Session.userId},loginService.isAuthorized=function(authorizedRoles){return angular.isArray(authorizedRoles)||(authorizedRoles=[authorizedRoles]),loginService.isAuthenticated()&&-1!==loginService.indexOf(Session.userRole)},loginService.isValidEmail=function(email){var re=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;return re.test(email)},loginService}),auth.service("Session",function(){this.create=function(sessionId,userId,userRole){this.id=sessionId,this.userId=userId,this.userRole=userRole},this.destroy=function(){this.id=null,this.userId=null,this.userRole=null}});
\ No newline at end of file
/* Include this file in your html if you are using the CSP mode. */
.ng-animate.item:not(.left):not(.right) {
-webkit-transition: 0s ease-in-out left;
transition: 0s ease-in-out left
}
/*!
* Bootstrap v3.3.5 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
......
......@@ -104,107 +104,107 @@ angular.module("components/dashboard/dashboard.html", []).run(["$templateCache",
" <div class=\"starter-template\">\n" +
"\n" +
" <!-- table view -->\n" +
" <table class=\"table table-bordered\" style=\"background-color:#fff;\">\n" +
" <thead>\n" +
" <tr>\n" +
" <th colspan=\"2\">\n" +
" <label>\n" +
" <input type=\"checkbox\" style=\"zoom:1.5; margin:5px 0 0 8px;\">\n" +
" Hepsini Seç\n" +
" </label>\n" +
" </th>\n" +
" <th>First Name</th>\n" +
" <th>Last Name</th>\n" +
" <th>Username</th>\n" +
" </tr>\n" +
" </thead>\n" +
" <tbody>\n" +
" <tr>\n" +
" <td width=\"60\">\n" +
" <label>\n" +
" <input type=\"checkbox\" style=\"zoom:1.5; margin:5px 0 0 8px;\">\n" +
" </label>\n" +
" </td>\n" +
" <th scope=\"row\" style=\"text-align:center\">1</th>\n" +
" <td>Mark</td>\n" +
" <td>Otto</td>\n" +
" <td>@mdo</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>\n" +
" <label>\n" +
" <input type=\"checkbox\" style=\"zoom:1.5; margin:5px 0 0 8px;\">\n" +
" </label>\n" +
" </td>\n" +
" <th scope=\"row\" style=\"text-align:center\">2</th>\n" +
" <td>Jacob</td>\n" +
" <td>Thornton</td>\n" +
" <td>@fat</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>\n" +
" <label>\n" +
" <input type=\"checkbox\" style=\"zoom:1.5; margin:5px 0 0 8px;\">\n" +
" </label>\n" +
" </td>\n" +
" <th scope=\"row\" style=\"text-align:center\">3</th>\n" +
" <td>Larry</td>\n" +
" <td>the Bird</td>\n" +
" <td>@twitter</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td width=\"60\">\n" +
" <label>\n" +
" <input type=\"checkbox\" style=\"zoom:1.5; margin:5px 0 0 8px;\">\n" +
" </label>\n" +
" </td>\n" +
" <th scope=\"row\" style=\"text-align:center\">4</th>\n" +
" <td>Mark</td>\n" +
" <td>Otto</td>\n" +
" <td>@mdo</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>\n" +
" <label>\n" +
" <input type=\"checkbox\" style=\"zoom:1.5; margin:5px 0 0 8px;\">\n" +
" </label>\n" +
" </td>\n" +
" <th scope=\"row\" style=\"text-align:center\">5</th>\n" +
" <td>Jacob</td>\n" +
" <td>Thornton</td>\n" +
" <td>@fat</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>\n" +
" <label>\n" +
" <input type=\"checkbox\" style=\"zoom:1.5; margin:5px 0 0 8px;\">\n" +
" </label>\n" +
" </td>\n" +
" <th scope=\"row\" style=\"text-align:center\">6</th>\n" +
" <td>Larry</td>\n" +
" <td>the Bird</td>\n" +
" <td>@twitter</td>\n" +
" </tr>\n" +
" </tbody>\n" +
" </table>\n" +
" <!-- end of table view -->\n" +
" <!--<table class=\"table table-bordered\" style=\"background-color:#fff;\">-->\n" +
" <!--<thead>-->\n" +
" <!--<tr>-->\n" +
" <!--<th colspan=\"2\">-->\n" +
" <!--<label>-->\n" +
" <!--<input type=\"checkbox\" style=\"zoom:1.5; margin:5px 0 0 8px;\">-->\n" +
" <!--Hepsini Seç-->\n" +
" <!--</label>-->\n" +
" <!--</th>-->\n" +
" <!--<th>First Name</th>-->\n" +
" <!--<th>Last Name</th>-->\n" +
" <!--<th>Username</th>-->\n" +
" <!--</tr>-->\n" +
" <!--</thead>-->\n" +
" <!--<tbody>-->\n" +
" <!--<tr>-->\n" +
" <!--<td width=\"60\">-->\n" +
" <!--<label>-->\n" +
" <!--<input type=\"checkbox\" style=\"zoom:1.5; margin:5px 0 0 8px;\">-->\n" +
" <!--</label>-->\n" +
" <!--</td>-->\n" +
" <!--<th scope=\"row\" style=\"text-align:center\">1</th>-->\n" +
" <!--<td>Mark</td>-->\n" +
" <!--<td>Otto</td>-->\n" +
" <!--<td>@mdo</td>-->\n" +
" <!--</tr>-->\n" +
" <!--<tr>-->\n" +
" <!--<td>-->\n" +
" <!--<label>-->\n" +
" <!--<input type=\"checkbox\" style=\"zoom:1.5; margin:5px 0 0 8px;\">-->\n" +
" <!--</label>-->\n" +
" <!--</td>-->\n" +
" <!--<th scope=\"row\" style=\"text-align:center\">2</th>-->\n" +
" <!--<td>Jacob</td>-->\n" +
" <!--<td>Thornton</td>-->\n" +
" <!--<td>@fat</td>-->\n" +
" <!--</tr>-->\n" +
" <!--<tr>-->\n" +
" <!--<td>-->\n" +
" <!--<label>-->\n" +
" <!--<input type=\"checkbox\" style=\"zoom:1.5; margin:5px 0 0 8px;\">-->\n" +
" <!--</label>-->\n" +
" <!--</td>-->\n" +
" <!--<th scope=\"row\" style=\"text-align:center\">3</th>-->\n" +
" <!--<td>Larry</td>-->\n" +
" <!--<td>the Bird</td>-->\n" +
" <!--<td>@twitter</td>-->\n" +
" <!--</tr>-->\n" +
" <!--<tr>-->\n" +
" <!--<td width=\"60\">-->\n" +
" <!--<label>-->\n" +
" <!--<input type=\"checkbox\" style=\"zoom:1.5; margin:5px 0 0 8px;\">-->\n" +
" <!--</label>-->\n" +
" <!--</td>-->\n" +
" <!--<th scope=\"row\" style=\"text-align:center\">4</th>-->\n" +
" <!--<td>Mark</td>-->\n" +
" <!--<td>Otto</td>-->\n" +
" <!--<td>@mdo</td>-->\n" +
" <!--</tr>-->\n" +
" <!--<tr>-->\n" +
" <!--<td>-->\n" +
" <!--<label>-->\n" +
" <!--<input type=\"checkbox\" style=\"zoom:1.5; margin:5px 0 0 8px;\">-->\n" +
" <!--</label>-->\n" +
" <!--</td>-->\n" +
" <!--<th scope=\"row\" style=\"text-align:center\">5</th>-->\n" +
" <!--<td>Jacob</td>-->\n" +
" <!--<td>Thornton</td>-->\n" +
" <!--<td>@fat</td>-->\n" +
" <!--</tr>-->\n" +
" <!--<tr>-->\n" +
" <!--<td>-->\n" +
" <!--<label>-->\n" +
" <!--<input type=\"checkbox\" style=\"zoom:1.5; margin:5px 0 0 8px;\">-->\n" +
" <!--</label>-->\n" +
" <!--</td>-->\n" +
" <!--<th scope=\"row\" style=\"text-align:center\">6</th>-->\n" +
" <!--<td>Larry</td>-->\n" +
" <!--<td>the Bird</td>-->\n" +
" <!--<td>@twitter</td>-->\n" +
" <!--</tr>-->\n" +
" <!--</tbody>-->\n" +
" <!--</table>-->\n" +
" <!--&lt;!&ndash; end of table view &ndash;&gt;-->\n" +
"\n" +
" <div class=\"btn-group\">\n" +
" <button type=\"button\" class=\"btn btn-default dropdown-toggle\" data-toggle=\"dropdown\" aria-haspopup=\"true\"\n" +
" aria-expanded=\"false\">\n" +
" İşlemler <span class=\"caret\"></span>\n" +
" </button>\n" +
" <ul class=\"dropdown-menu\">\n" +
" <li><a href=\"\">İşlem 1</a></li>\n" +
" <li><a href=\"\">İşlem 2</a></li>\n" +
" <li><a href=\"\">İşlem 3</a></li>\n" +
" <li role=\"separator\" class=\"divider\"></li>\n" +
" <li><a href=\"\">İşlem 4</a></li>\n" +
" </ul>\n" +
" </div>\n" +
" <!--<div class=\"btn-group\">-->\n" +
" <!--<button type=\"button\" class=\"btn btn-default dropdown-toggle\" data-toggle=\"dropdown\" aria-haspopup=\"true\"-->\n" +
" <!--aria-expanded=\"false\">-->\n" +
" <!--İşlemler <span class=\"caret\"></span>-->\n" +
" <!--</button>-->\n" +
" <!--<ul class=\"dropdown-menu\">-->\n" +
" <!--<li><a href=\"\">İşlem 1</a></li>-->\n" +
" <!--<li><a href=\"\">İşlem 2</a></li>-->\n" +
" <!--<li><a href=\"\">İşlem 3</a></li>-->\n" +
" <!--<li role=\"separator\" class=\"divider\"></li>-->\n" +
" <!--<li><a href=\"\">İşlem 4</a></li>-->\n" +
" <!--</ul>-->\n" +
" <!--</div>-->\n" +
"\n" +
"\n" +
" <hr>\n" +
" <!--<hr>-->\n" +
"\n" +
" </div>\n" +
"</div>");
......@@ -469,7 +469,7 @@ angular.module("shared/templates/add.html", []).run(["$templateCache", function(
" </a>\n" +
" </span>\n" +
" </h3>\n" +
" <ng-include src=\"'shared/templates/nodeTable.html'\" ng-if=\"node.lengthModels > 0\"></ng-include>\n" +
" <ng-include src=\"'shared/templates/nodeTable.html'\"></ng-include>\n" +
" <hr>\n" +
"</div>\n" +
"<div ng-repeat=\"node in ListNode\">\n" +
......@@ -480,7 +480,7 @@ angular.module("shared/templates/add.html", []).run(["$templateCache", function(
" </a>\n" +
" </span>\n" +
" </h3>\n" +
" <ng-include src=\"'shared/templates/nodeTable.html'\" ng-if=\"node.lengthModels > 0\" ng-bind=\"node.lengthModels\"></ng-include>\n" +
" <ng-include src=\"'shared/templates/nodeTable.html'\"></ng-include>\n" +
" <hr>\n" +
"</div>\n" +
"\n" +
......@@ -1003,17 +1003,17 @@ angular.module("shared/templates/directives/sidebar.html", []).run(["$templateCa
" <ul class=\"nav in\" 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> Dashboard</a>\n" +
" <a href=\"#/dashboard\"><i class=\"fa fa-dashboard fa-fw\"></i> Panel</a>\n" +
" </li>\n" +
" <li ng-repeat=\"(key, item) in menuItems\" ng-class=\"{active: collapseVar == key}\">\n" +
" <a href=\"\" ng-click=\"check(key)\"><i class=\"fa fa-wrench fa-fw\"></i> {{ item }}<span\n" +
" <a href=\"\" ng-click=\"check(key)\"><i class=\"fa fa-wrench fa-fw\"></i> {{ item[0] }}<span\n" +
" class=\"fa arrow\"></span></a>\n" +
" <ul class=\"nav nav-second-level\" collapse=\"collapseVar!={{key}}\">\n" +
" <li ui-sref-active=\"active\">\n" +
" <a href=\"#/{{item}}\">List</a>\n" +
" <a href=\"#/{{item[1]}}\">Listele</a>\n" +
" </li>\n" +
" <li ui-sref-active=\"active\">\n" +
" <a href=\"#/{{item}}/add\">Add</a>\n" +
" <a href=\"#/{{item[1]}}/add\">Ekle</a>\n" +
" </li>\n" +
" </ul>\n" +
" <!-- /.nav-second-level -->\n" +
......@@ -1183,16 +1183,16 @@ angular.module("shared/templates/foreignKey.html", []).run(["$templateCache", fu
" </label>\n" +
"\n" +
" <select ng-model=\"$$value$$\"\n" +
" value=\"$$value$$\"\n" +
" ng-model-options=\"form.ngModelOptions\"\n" +
" ng-disabled=\"form.readonly\"\n" +
" sf-changed=\"form\"\n" +
" class=\"form-control {{form.fieldHtmlClass}}\"\n" +
" schema-validate=\"form\"\n" +
" ng-options=\"item.value as item.name group by item.group for item in form.titleMap\"\n" +
" ng-options=\"item.value as item.name for item in form.titleMap\"\n" +
" name=\"{{form.key.slice(-1)[0]}}\">\n" +
" </select>\n" +
"\n" +
"\n" +
" <div class=\"help-block\" sf-message=\"form.description\"></div>\n" +
" </div>\n" +
" <div class=\"col-md-4\">\n" +
......@@ -1237,12 +1237,17 @@ angular.module("shared/templates/nodeTable.html", []).run(["$templateCache", fun
"<table class=\"table table-bordered\" style=\"background-color:#fff;\">\n" +
" <thead>\n" +
" <tr>\n" +
" <th colspan=\"2\">#</th>\n" +
" <th ng-repeat=\"(key,value) in node.fields\">{{ value.title }}</th>\n" +
" <th colspan=\"2\">\n" +
" <label>\n" +
" <input type=\"checkbox\" style=\"zoom:1.5; margin:5px 0 0 8px;\">\n" +
" Hepsini Seç\n" +
" </label>\n" +
" </th>\n" +
" <th ng-repeat=\"(key,value) in node.form\">{{ value }}</th>\n" +
" <th>action</th>\n" +
" </tr>\n" +
" </thead>\n" +
" <tbody>\n" +
" <tbody ng-class=\"{true: '', false: 'hidden'}[node.lengthModels > 0]\">\n" +
" <tr>\n" +
" <td width=\"60\">\n" +
" <label>\n" +
......@@ -1250,11 +1255,11 @@ angular.module("shared/templates/nodeTable.html", []).run(["$templateCache", fun
" </label>\n" +
" </td>\n" +
" <th scope=\"row\" style=\"text-align:center\">1</th>\n" +
" <td ng-repeat=\"(key,value) in node.models\">{{ value.value }}</td>\n" +
" <td ng-repeat=\"value in node.model\">{{ value }}</td>\n" +
" <td>\n" +
" <a ng-href=\"#/crud/{{model}}/edit/{{object.key}}\">Edit</a><br>\n" +
" <a ng-href=\"#/crud/{{model}}/{{object.key}}\">Show</a>\n" +
" <a ng-href=\"#/crud/{{model}}/{{object.key}}\">Delete</a>\n" +
" <button modal-for-nodes=\"{{node.title}},ListNode\">Edit</button><br>\n" +
" <button>Show</button>\n" +
" <button>Delete</button>\n" +
" </td>\n" +
" </tr>\n" +
" </tbody>\n" +
......
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