Commit e696a566 authored by Evren Kutar's avatar Evren Kutar

v0.0.3.1 dist login logout fix

parent 90a47357
...@@ -88,31 +88,44 @@ module.exports = function (grunt) { ...@@ -88,31 +88,44 @@ module.exports = function (grunt) {
}, },
js: { js: {
src: [ src: [
'app/app.js', //'app/app.js',
'app/app_routes.js', //'app/app_routes.js',
'app/zetalib/**/*service.js', //'app/zetalib/**/*service.js',
'app/zetalib/general.js', //'app/zetalib/general.js',
'app/zetalib/interceptors.js', //'app/zetalib/interceptors.js',
'app/shared/scripts/theme.js', //'app/shared/scripts/theme.js',
'app/shared/directives.js', //'app/shared/directives.js',
'app/components/**/*controller.js', //'app/components/**/*controller.js',
'app/components/**/*service.js' //'app/components/**/*service.js',
"app/app.js",
"app/app_routes.js",
"app/zetalib/interceptors.js",
"app/zetalib/general.js",
"app/zetalib/forms/form_service.js",
"app/shared/scripts/theme.js",
"app/shared/directives.js",
"app/components/auth/auth_controller.js",
"app/components/auth/auth_service.js",
"app/components/dashboard/dashboard_controller.js",
"app/components/crud/crud_controller.js",
], ],
dest: 'dist/app.js' dest: 'dist/app.js'
}, },
components: { components: {
src: [ src: [
"app/bower_components/jquery/dist/jquery.min.js",
"app/bower_components/bootstrap/dist/js/bootstrap.min.js",
"app/bower_components/angular-route/angular-route.min.js", "app/bower_components/angular-route/angular-route.min.js",
"app/bower_components/angular-cookies/angular-cookies.min.js", "app/bower_components/angular-cookies/angular-cookies.min.js",
"app/bower_components/angular-resource/angular-resource.min.js", "app/bower_components/angular-resource/angular-resource.min.js",
"app/bower_components/angular-bootstrap/ui-bootstrap.min.js", "app/bower_components/angular-bootstrap/ui-bootstrap.min.js",
"app/bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js", "app/bower_components/angular-bootstrap/ui-bootstrap-tpls.js",
"app/bower_components/angular-sanitize/angular-sanitize.min.js", "app/bower_components/angular-sanitize/angular-sanitize.min.js",
"app/bower_components/tv4/tv4.js", "app/bower_components/tv4/tv4.js",
"app/bower_components/objectpath/lib/ObjectPath.js", "app/bower_components/objectpath/lib/ObjectPath.js",
"app/bower_components/angular-schema-form/dist/schema-form.min.js", "app/bower_components/angular-schema-form/dist/schema-form.min.js",
"app/bower_components/angular-schema-form/dist/bootstrap-decorator.min.js", "app/bower_components/angular-schema-form/dist/bootstrap-decorator.min.js",
"app/bower_components/angular-schema-form-datepicker/bootstrap-datepicker.min.js",
"app/bower_components/angular-gettext/dist/angular-gettext.min.js", "app/bower_components/angular-gettext/dist/angular-gettext.min.js",
"app/bower_components/json3/lib/json3.min.js", "app/bower_components/json3/lib/json3.min.js",
"app/bower_components/angular-loading-bar/build/loading-bar.min.js", "app/bower_components/angular-loading-bar/build/loading-bar.min.js",
......
...@@ -18,8 +18,8 @@ var app = angular.module( ...@@ -18,8 +18,8 @@ var app = angular.module(
'formService', 'formService',
'ulakbus.dashboard', 'ulakbus.dashboard',
'ulakbus.auth', 'ulakbus.auth',
'ulakbus.staff', //'ulakbus.staff',
'ulakbus.student', //'ulakbus.student',
'ulakbus.crud', 'ulakbus.crud',
//'ulakbus.version', //'ulakbus.version',
'schemaForm', 'schemaForm',
......
...@@ -18,6 +18,7 @@ auth.factory('LoginService', function ($http, $rootScope, $location, $log, $cook ...@@ -18,6 +18,7 @@ auth.factory('LoginService', function ($http, $rootScope, $location, $log, $cook
.post(RESTURL.url + url, credentials) .post(RESTURL.url + url, credentials)
.success(function (data, status, headers, config) { .success(function (data, status, headers, config) {
//$window.sessionStorage.token = data.token; //$window.sessionStorage.token = data.token;
$rootScope.loggedInUser = true; $rootScope.loggedInUser = true;
}) })
.error(function (data, status, headers, config) { .error(function (data, status, headers, config) {
......
<div class="starter-template"> <div class="starter-template">
<h1>{{model}}</h1> <h1>{{model}}</h1>
<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>
...@@ -20,7 +21,7 @@ ...@@ -20,7 +21,7 @@
<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">1</th> <th scope="row" style="text-align:center">{{$index + 1}}</th>
<td ng-repeat="(key,value) in object.data">{{value}}</td> <td ng-repeat="(key,value) in object.data">{{value}}</td>
<td> <td>
<a ng-href="#/{{model}}/edit/{{object.key}}">Edit</a><br> <a ng-href="#/{{model}}/edit/{{object.key}}">Edit</a><br>
...@@ -29,6 +30,7 @@ ...@@ -29,6 +30,7 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div>
<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"
......
...@@ -8,11 +8,11 @@ ...@@ -8,11 +8,11 @@
/** /**
* logout directive * logout directive
*/ */
app.directive('logout', function ($http, $location) { app.directive('logout', function ($http, $location, RESTURL) {
return { return {
link: function ($scope, $element, $rootScope) { link: function ($scope, $element, $rootScope) {
$element.on('click', function () { $element.on('click', function () {
$http.post('http://' + window.location.hostname + ':9001/logout', {}).then(function () { $http.post(RESTURL.url + 'logout', {}).then(function () {
$rootScope.loggedInUser = false; $rootScope.loggedInUser = false;
console.log($rootScope.loggedInUser); console.log($rootScope.loggedInUser);
$location.path("/login"); $location.path("/login");
......
...@@ -50,6 +50,13 @@ app.config(['$httpProvider', function ($httpProvider) { ...@@ -50,6 +50,13 @@ app.config(['$httpProvider', function ($httpProvider) {
$location.path('/login'); $location.path('/login');
} }
} }
if(rejection.status === 403) {
if (rejection.data.is_login == true){
if($location.path()==="/login"){
$location.path("/dashboard");
}
}
}
return $q.reject(rejection); return $q.reject(rejection);
} }
}; };
......
/*! ulakbus-ui 2015-09-17 */ /*! 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)],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}("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,console.log(scope[k.type][k.title].lengthModels))}),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){var 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&&(console.log("record fin"),$location.path($scope.form_params.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}}); "use strict";var app=angular.module("ulakbus",["ui.bootstrap","angular-loading-bar","ngRoute","ngSanitize","ngCookies","general","formService","ulakbus.dashboard","ulakbus.auth","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}),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")),403===rejection.status&&1==rejection.data.is_login&&"/login"===$location.path()&&$location.path("/dashboard"),$q.reject(rejection)}}})}]);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});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}("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,console.log(scope[k.type][k.title].lengthModels))}),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){var 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&&(console.log("record fin"),$location.path($scope.form_params.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)})})}}}),$(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,RESTURL){return{link:function($scope,$element,$rootScope){$element.on("click",function(){$http.post(RESTURL.url+"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}}),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}}),angular.module("ulakbus.dashboard",["ngRoute"]).controller("DashCtrl",function($scope,$rootScope,$location){$rootScope.loggedInUser||$location.path("/login"),$scope.testData="<h1>This is main Dashboard</h1>"});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})});
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<script src="bower_components/jquery.min.js"></script> <script src="bower_components/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.17/angular.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.18/angular.min.js"></script>
<script src="bower_components/components.js"></script> <script src="bower_components/components.js"></script>
<script src="shared/translations.js"></script> <script src="shared/translations.js"></script>
<script src="templates.js"></script> <script src="templates.js"></script>
......
...@@ -40,6 +40,7 @@ angular.module("components/crud/templates/list.html", []).run(["$templateCache", ...@@ -40,6 +40,7 @@ angular.module("components/crud/templates/list.html", []).run(["$templateCache",
$templateCache.put("components/crud/templates/list.html", $templateCache.put("components/crud/templates/list.html",
"<div class=\"starter-template\">\n" + "<div class=\"starter-template\">\n" +
" <h1>{{model}}</h1>\n" + " <h1>{{model}}</h1>\n" +
" <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" +
...@@ -60,7 +61,7 @@ angular.module("components/crud/templates/list.html", []).run(["$templateCache", ...@@ -60,7 +61,7 @@ angular.module("components/crud/templates/list.html", []).run(["$templateCache",
" <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\">1</th>\n" + " <th scope=\"row\" style=\"text-align:center\">{{$index + 1}}</th>\n" +
" <td ng-repeat=\"(key,value) in object.data\">{{value}}</td>\n" + " <td ng-repeat=\"(key,value) in object.data\">{{value}}</td>\n" +
" <td>\n" + " <td>\n" +
" <a ng-href=\"#/{{model}}/edit/{{object.key}}\">Edit</a><br>\n" + " <a ng-href=\"#/{{model}}/edit/{{object.key}}\">Edit</a><br>\n" +
...@@ -69,6 +70,7 @@ angular.module("components/crud/templates/list.html", []).run(["$templateCache", ...@@ -69,6 +70,7 @@ angular.module("components/crud/templates/list.html", []).run(["$templateCache",
" </tr>\n" + " </tr>\n" +
" </tbody>\n" + " </tbody>\n" +
" </table>\n" + " </table>\n" +
" </div>\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" +
......
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
<!-- @if NODE_ENV == 'PRODUCTION' --> <!-- @if NODE_ENV == 'PRODUCTION' -->
<script src="bower_components/jquery.min.js"></script> <script src="bower_components/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.17/angular.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.18/angular.min.js"></script>
<script src="bower_components/components.js"></script> <script src="bower_components/components.js"></script>
<script src="shared/translations.js"></script> <script src="shared/translations.js"></script>
<script src="templates.js"></script> <script src="templates.js"></script>
......
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