Commit 4ec688a8 authored by Evren Kutar's avatar Evren Kutar

Merge branch 'Feature/#143/Formsets'

parents 3dc0b101 e4ab66b6
......@@ -32,6 +32,7 @@ var app = angular.module(
*/
constant("RESTURL", (function () {
return {url: "http://" + window.location.hostname + ":9001/"};
//return {url: "http://api.ulakbus.net/"};
})()).
/**
* USER_ROLES and AUTH_EVENTS are constant for auth functions
......
......@@ -10,19 +10,19 @@ app.config(['$routeProvider', function ($routeProvider) {
templateUrl: 'components/dashboard/dashboard.html',
controller: 'DashCtrl'
})
.when('/crud/:model/add', {
.when('/:model/add', {
templateUrl: 'components/crud/templates/add.html',
controller: 'CRUDAddEditCtrl'
})
.when('/crud/:model/edit/:id', {
.when('/:model/edit/:id', {
templateUrl: 'components/crud/templates/add.html',
controller: 'CRUDAddEditCtrl'
})
.when('/crud/:model', {
.when('/:model', {
templateUrl: 'components/crud/templates/list.html',
controller: 'CRUDListCtrl'
})
.when('/crud/:model/:id', {
.when('/:model/:id', {
templateUrl: 'components/crud/templates/show.html',
controller: 'CRUDShowCtrl'
})
......
......@@ -33,8 +33,6 @@ crud.controller('CRUDAddEditCtrl', function ($scope, $rootScope, $location, $htt
$scope.onSubmit = function (form) {
$scope.$broadcast('schemaFormValidate');
debugger;
if (form.$valid) {
Generator.submit($scope)
.success(function(data){
......
......@@ -3,7 +3,12 @@
<table class="table table-bordered" style="background-color:#fff;">
<thead>
<tr>
<th colspan="2">#</th>
<th colspan="2">
<label>
<input type="checkbox" style="zoom:1.5; margin:5px 0 0 8px;">
Hepsini Seç
</label>
</th>
<th ng-repeat="(key,value) in objects[0].data">{{ key }}</th>
<th>action</th>
</tr>
......@@ -18,10 +23,27 @@
<th scope="row" style="text-align:center">1</th>
<td ng-repeat="(key,value) in object.data">{{value}}</td>
<td>
<a ng-href="#/crud/{{model}}/edit/{{object.key}}">Edit</a><br>
<a ng-href="#/crud/{{model}}/{{object.key}}">Show</a>
<a ng-href="#/{{model}}/edit/{{object.key}}">Edit</a><br>
<a ng-href="#/{{model}}/{{object.key}}">Show</a>
</td>
</tr>
</tbody>
</table>
<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>
</div>
\ No newline at end of file
......@@ -64,6 +64,7 @@
<script src="bower_components/angular/angular.min.js"></script>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="bower_components/angular-route/angular-route.min.js"></script>
<script src="bower_components/angular-cookies/angular-cookies.min.js"></script>
<script src="bower_components/angular-resource/angular-resource.min.js"></script>
......
......@@ -45,19 +45,23 @@ app.directive('headerSubMenu', function () {
// todo: double make it but single not solve this!
angular.element($('#submitbutton')).triggerHandler('click');
angular.element($('#submitbutton')).triggerHandler('click');
//$scope.$broadcast('schemaFormValidate');
//$scope.onSubmit(angular.element($('#submitbutton')).scope().formgenerated);
}
}
}
});
// todo: unused delete
app.directive('headerSubMenuButtons', function () {
app.directive('headerBreadcrumb', function ($location) {
return {
templateUrl: 'shared/templates/directives/header-sub-menu-buttons.html',
templateUrl: 'shared/templates/directives/header-breadcrumb.html',
restrict: 'E',
replace: true
replace: true,
link: function($scope){
$scope.$watch('$routeUpdate', function(){
// todo: create actual links
//debugger;
$scope.links = $location.path().split('/');
});
}
}
});
......
<h1>{{ schema.title }}</h1>
<form id="formgenerated" name="formgenerated" sf-schema="schema" sf-form="form" sf-model="model"></form>
<div ng-repeat="node in listnodes">
<div ng-repeat="node in Node">
<h3>{{ node.title }}
<span ng-if="node.lengthModels < 1">
<a href="javascript:void(0);" modal-for-nodes="{{node.title}},Node">
<i class="fa fa-plus-circle fa-fw"></i>
</a>
</span>
</h3>
<ng-include src="'shared/templates/nodeTable.html'" ng-if="node.lengthModels > 0"></ng-include>
<hr>
</div>
<div ng-repeat="node in ListNode">
<h3>{{ node.title }}
<span>
<a href="javascript:void(0);" add-modal-for-list-node={{node.title}}>
<a href="javascript:void(0);" modal-for-nodes="{{node.title}},ListNode">
<i class="fa fa-plus-circle fa-fw"></i>
</a>
</span>
</h3>
<table class="table table-bordered" style="background-color:#fff;">
<thead>
<tr>
<th colspan="2">#</th>
<th ng-repeat="(key,value) in node.fields">{{ value.title }}</th>
<th>action</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 ng-repeat="(key,value) in node.models">{{ value.value }}</td>
<td>
<a ng-href="#/crud/{{model}}/edit/{{object.key}}">Edit</a><br>
<a ng-href="#/crud/{{model}}/{{object.key}}">Show</a>
<a ng-href="#/crud/{{model}}/{{object.key}}">Delete</a>
</td>
</tr>
</tbody>
</table>
<ng-include src="'shared/templates/nodeTable.html'" ng-if="node.lengthModels > 0"></ng-include>
<hr>
</div>
<button id="submitbutton" type="button" class="btn btn-primary" ng-click="onSubmit(formgenerated)">Kaydet</button>
<button type="button" class="btn btn-warning">Düzenle</button> <!-- todo: make it conditional -->
<button type="button" class="btn btn-danger">İptal</button> <!-- todo: turn back to previous page -->
\ No newline at end of file
<!-- <button type="button" class="btn btn-warning">Düzenle</button> todo: make it conditional -->
<!-- <button type="button" class="btn btn-danger">İptal</button> todo: turn back to previous page -->
\ No newline at end of file
<ul class="breadcrumb">
<li ng-repeat="link in links" ng-class="{'active':$last}">
<a href="#" ng-if="!$last">{{link}}</a>
<span ng-if="$last">{{link}}</span>
</li>
</ul>
\ No newline at end of file
......@@ -194,13 +194,12 @@
<i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="#"><i class="fa fa-user fa-fw"></i> User Profile</a>
<li><a href="#"><i class="fa fa-user fa-fw"></i> Profil</a>
</li>
<li><a href="#"><i class="fa fa-gear fa-fw"></i> Settings</a>
<li><a href="#"><i class="fa fa-gear fa-fw"></i> Ayarlar</a>
</li>
<li><a href="http://www.strapui.com/"><i class="fa fa-eye fa-fw"></i> Premium Angular Themes</a></li>
<li class="divider"></li>
<li><a ui-sref="login" href="javascript:void(0);" logout><i class="fa fa-sign-out fa-fw"></i> Logout</a>
<li><a ui-sref="login" href="javascript:void(0);" logout><i class="fa fa-sign-out fa-fw"></i> Çıkış</a>
</li>
</ul>
<!-- /.dropdown-user -->
......
<button type="button" class="btn btn-primary" ng-click="onSubmit(formgenerated)">Kaydet</button>
<button type="button" class="btn btn-warning">Düzenle</button>
<button type="button" class="btn btn-danger">İptal</button>
\ No newline at end of file
<div class="manager-view-header container-fluid">
<ul class="breadcrumb">
<li><a href="#">Personeller</a></li>
<li><a href="#">Liste</a></li>
<li class="active">Tablo</li>
</ul>
<!--<header-sub-menu-buttons></header-sub-menu-buttons>-->
<header-breadcrumb></header-breadcrumb>
<div id="header-buttons">
<button type="button" class="btn btn-primary" ng-click="triggerSubmit()">Kaydet</button>
<button type="button" class="btn btn-warning">Düzenle</button>
<button type="button" class="btn btn-danger">İptal</button>
<!--<button type="button" class="btn btn-warning">Düzenle</button>-->
<!--<button type="button" class="btn btn-danger">İptal</button>-->
</div>
</div>
\ No newline at end of file
......@@ -13,10 +13,10 @@
class="fa arrow"></span></a>
<ul class="nav nav-second-level" collapse="collapseVar!={{key}}">
<li ui-sref-active="active">
<a href="#/crud/{{item}}">List</a>
<a href="#/{{item}}">List</a>
</li>
<li ui-sref-active="active">
<a href="#/crud/{{item}}/add">Add</a>
<a href="#/{{item}}/add">Add</a>
</li>
</ul>
<!-- /.nav-second-level -->
......
......@@ -19,7 +19,7 @@
<div class="help-block" sf-message="form.description"></div>
</div>
<div class="col-md-4">
<a href="javascript:void(0);" add-modal>
<a href="javascript:void(0);" add-modal-for-linked-model>
<i class="fa fa-plus-circle fa-fw"></i>
</a>
</div>
......
<table class="table table-bordered" style="background-color:#fff;">
<thead>
<tr>
<th colspan="2">#</th>
<th ng-repeat="(key,value) in node.fields">{{ value.title }}</th>
<th>action</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 ng-repeat="(key,value) in node.models">{{ value.value }}</td>
<td>
<a ng-href="#/crud/{{model}}/edit/{{object.key}}">Edit</a><br>
<a ng-href="#/crud/{{model}}/{{object.key}}">Show</a>
<a ng-href="#/crud/{{model}}/{{object.key}}">Delete</a>
</td>
</tr>
</tbody>
</table>
\ No newline at end of file
......@@ -7,49 +7,56 @@
var form_generator = angular.module('formService', ['general']);
form_generator.factory('Generator', function ($http, $q, $log, $modal, $timeout, RESTURL, FormDiff) {
form_generator.factory('Generator', function ($http, $q, $log, $location, $modal, $timeout, RESTURL, FormDiff) {
var generator = {};
generator.makeUrl = function (url) {
return RESTURL.url + url;
};
generator.generate = function (scope, forms) {
generator.generate = function (scope, data) {
// if no form in response (in case of list and single item request) return scope
if (!forms) {
return scope;
}
for (var key in forms)
scope[key] = forms[key];
if (!data.forms) { return scope; }
// prepare scope form, schema and model from response object
angular.forEach(data.forms, function (value, key) {
scope[key] = data.forms[key];
});
scope.token = data.token;
// initialModel will be used in formDiff when submiting the form to submit only
scope.initialModel = angular.copy(scope.model);
// if fieldset in form, make it collapsable with template
//scope.listnodeform = {};
//scope.isCollapsed = true;
generator.prepareFormItems(scope);
scope.object_id = scope.form_params['object_id'];
return generator.group(scope);
};
generator.group = function (formObject) {
return formObject;
};
generator.prepareFormItems = function(scope) {
angular.forEach(scope.schema.properties, function (k, v) {
// check if type is date and if type date found change it to string
// and give it 'type':'template' property and load it with template
if (k.type == 'date') {
k.title = k.title;
scope.form[scope.form.indexOf(v)] = {
"type": "template",
"templateUrl": "shared/templates/datefield.html",
"title": k.title,
"key": k.name
};
debugger;
scope.model[k.name] = generator.dateformatter(scope.model[k.name]);
k.type = 'string';
// seek for datepicker field and initialize datepicker
scope.$watch(angular.element($('.datepickerfield')), function(){
console.log('date field initialized');
$('.datepickerfield').datepicker();
scope.$watch($('#'+v), function(){
$timeout(function () {
jQuery('#' + v).datepicker();
});
});
}
if (k.type == 'int') {
k.type = 'number'
k.type = 'number';
}
// if type is model use foreignKey.html template to show them
......@@ -61,11 +68,11 @@ form_generator.factory('Generator', function ($http, $q, $log, $modal, $timeout,
formitem = {
"type": "template",
"templateUrl": "shared/templates/foreignKey.html",
"title": k.model_name,
"title": k.title
};
k.title = k.model_name;
var modelscope = {"url": scope.url, "form_params": {model: k.model_name}};
var modelscope = {"url": scope.url, "form_params": {model: k.title}};
// get model objects from db and add to select list
generator.get_list(modelscope).then(function (res) {
......@@ -82,41 +89,47 @@ form_generator.factory('Generator', function ($http, $q, $log, $modal, $timeout,
scope.form[scope.form.indexOf(v)] = formitem;
}
if (k.type == 'ListNode') {
scope.form.splice([scope.form.indexOf(v)], 1);
scope.listnodes = scope.listnodes ? scope.listnodes : {};
scope.listnodes[k.title] = (k);
scope.listnodes[k.title]['fields'] = scope.model[k.title][0].fields;
scope.listnodes[k.title]['models'] = scope.model[k.title][0].models;
scope.listnodes[k.title]['lengthModels'] = scope.listnodes[k.title]['models'].length;
scope.listnodes[k.title]['lengthModels'] = 1;
//scope.model[k.title] = [];
debugger;
if (k.type == 'ListNode' || k.type == 'Node') {
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"},
model: {}
};
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;
// prepare required fields
if (item.required == true) {
scope[k.type][k.title].schema.required.push(item.name);
}
if (k.type == 'Node') {
scope.form.splice([scope.form.indexOf(v)], 1);
scope.nodes = scope.nodes ? scope.nodes : {};
scope.nodes[k.title] = (k);
// todo: learn what node model will be?
//scope.model[k.title] = [];
// idx field must be hidden
if (item.name == 'idx') {
scope[k.type][k.title].form.push({type: 'string', key: item.name, htmlClass: 'hidden'});
} else {
scope[k.type][k.title].form.push(item.name);
}
});
scope.isCollapsed = true;
// lengthModels is length of the listnode models. if greater than 0 show records on template
scope[k.type][k.title]['lengthModels'] = scope.model[k.title] ? 1 : 0;
}
scope.object_id = scope.form_params['object_id'];
});
return generator.group(scope);
};
generator.group = function (formObject) {
return formObject;
return scope;
};
generator.dateformatter = function (formObject) {
//angular.forEach(formObject.objects, function(k, v) {
// check if date string and convert to date object
// todo: catch date object and convert
//debugger;
//});
return Date(formObject);
};
......@@ -124,11 +137,10 @@ form_generator.factory('Generator', function ($http, $q, $log, $modal, $timeout,
return $http
.post(generator.makeUrl(scope.url), scope.form_params)
.then(function (res) {
return generator.generate(scope, res.data.forms);
return generator.generate(scope, res.data);
// todo: cover all other exceptions (4xx, 5xx)
});
};
generator.get_list = function (scope) {
return $http
.post(generator.makeUrl(scope.url), scope.form_params)
......@@ -166,6 +178,7 @@ form_generator.factory('Generator', function ($http, $q, $log, $modal, $timeout,
};
generator.submit = function ($scope) {
// todo: diff for all submits to recognize form change. if no change returns to view with no submit
data = {
"form": $scope.model,
"cmd": $scope.form_params.cmd,
......@@ -175,12 +188,17 @@ form_generator.factory('Generator', function ($http, $q, $log, $modal, $timeout,
};
if ($scope.object_id) {
var get_diff = FormDiff.get_diff($scope.model, $scope.initialModel);
var data = {
"object_id": $scope.object_id,
"form": get_diff
};
data.object_id = $scope.object_id;
data.form = get_diff;
}
return $http.post(generator.makeUrl($scope.url), data);
debugger;
$http.post(generator.makeUrl($scope.url), data)
.success()
.then(function(res){
if(res.data.client_cmd){
$location.path(data.model);
}
});
};
return generator;
});
......@@ -192,13 +210,21 @@ form_generator.factory('Generator', function ($http, $q, $log, $modal, $timeout,
* @returns: returns value for modal
*/
form_generator.controller('ModalCtrl', function ($scope, $modalInstance, $route, items) {
form_generator.controller('ModalCtrl', function ($scope, $modalInstance, Generator, $route, items) {
angular.forEach(["model", "schema", "form"], function (key) {
$scope[key] = items[key];
});
$scope.onSubmit = function () {
Generator.prepareFormItems($scope);
$scope.onSubmit = function (form) {
$scope.$broadcast('schemaFormValidate');
console.log(form.$valid);
if(form.$valid){
// send form to modalinstance result function
debugger;
$modalInstance.close($scope);
}
};
$scope.cancel = function () {
$modalInstance.dismiss('cancel');
......@@ -206,13 +232,12 @@ form_generator.controller('ModalCtrl', function ($scope, $modalInstance, $route,
});
/**
* modal directive for listnodes and nodes
* @params: $modal, Generator
* add modal directive for nodes
* @params: $modal
* @return: openmodal directive
*/
// todo: use generator.openmodal instead
form_generator.directive('addModalForListNode', function ($modal, Generator) {
form_generator.directive('modalForNodes', function ($modal) {
return {
link: function (scope, element, attributes) {
element.on('click', function () {
......@@ -223,21 +248,55 @@ form_generator.directive('addModalForListNode', function ($modal, Generator) {
size: 'lg',
resolve: {
items: function () {
var attribs = attributes['modalForNodes'].split(',');
// get node from parent scope catch with attribute
var node = angular.copy(scope.$parent.$parent.listnodes[attributes['addModalForListNode']]);
var items = {form: ['*'], schema: {properties: {}, title: node.title, type: "object"}, model: {}};
angular.forEach(node.fields, function (item) {
items.schema.properties[item.name] = item;
items.model[item.name] = item.value;
var node = angular.copy(scope.$parent.$parent[attribs[1]][attribs[0]]);
return node;
}
}
});
modalInstance.result.then(function (childmodel, key) {
// subfix will be removed
//var subfix = scope.schema.title.replace(/([a-z])([A-Z])/g, '$1_$2').toLowerCase();
// todo: run form validator here
scope.$parent.model[childmodel.schema.title] = childmodel.model;
console.log(scope.$parent.model);
});
});
}
}
});
/**
* add modal directive for linked models
* @params: $modal, Generator
* @return: openmodal directive
*/
form_generator.directive('addModalForLinkedModel', function ($modal, Generator) {
return {
link: function (scope, element) {
element.on('click', function () {
var modalInstance = $modal.open({
animation: false,
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"}
});
return Generator.generate(scope, items);
}
}
});
modalInstance.result.then(function (childmodel, key) {
var subfix = scope.schema.title.replace(/([a-z])([A-Z])/g, '$1_$2').toLowerCase();
scope.$parent.model[scope.schema.title].push(scope.model);
// todo: run form validator here
Generator.submit(scope);
});
});
}
......@@ -245,12 +304,12 @@ form_generator.directive('addModalForListNode', function ($modal, Generator) {
});
/**
* modal directive for linked models
* edit modal directive for linked models
* @params: $modal, Generator
* @return: openmodal directive
*/
form_generator.directive('addModal', function ($modal, Generator) {
form_generator.directive('editModalForLinkedModel', function ($modal, Generator) {
return {
link: function (scope, element) {
element.on('click', function () {
......@@ -270,6 +329,7 @@ form_generator.directive('addModal', function ($modal, Generator) {
});
modalInstance.result.then(function (childmodel, key) {
// todo: run form validator here
Generator.submit(scope);
});
});
......
......@@ -31,8 +31,9 @@ app.config(['$httpProvider', function ($httpProvider) {
$location.path("/dashboard");
}
}
if(response.data.screen) {
$location.path(response.data.screen);
if(response.data.client_cmd) {
//$location.path(response.data.screen);
console.log(response.data.client_cmd);
}
return response;
},
......
/*! ulakbus-ui 2015-09-11 */
"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("/crud/:model/add",{templateUrl:"components/crud/templates/add.html",controller:"CRUDAddEditCtrl"}).when("/crud/:model/edit/:id",{templateUrl:"components/crud/templates/add.html",controller:"CRUDAddEditCtrl"}).when("/crud/:model",{templateUrl:"components/crud/templates/list.html",controller:"CRUDListCtrl"}).when("/crud/: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,$modal,$timeout,RESTURL,FormDiff){var generator={};return generator.makeUrl=function(url){return RESTURL.url+url},generator.generate=function(scope,forms){if(!forms)return scope;for(var key in forms)scope[key]=forms[key];return scope.initialModel=angular.copy(scope.model),angular.forEach(scope.schema.properties,function(k,v){if("date"==k.type&&(k.title=k.title,scope.form[scope.form.indexOf(v)]={type:"template",templateUrl:"shared/templates/datefield.html",title:k.title,key:k.name},scope.model[k.name]=generator.dateformatter(scope.model[k.name]),scope.$watch(angular.element($(".datepickerfield")),function(){console.log("date field initialized"),$(".datepickerfield").datepicker()})),"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.model_name},k.title=k.model_name;var modelscope={url:scope.url,form_params:{model:k.model_name}};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&&(scope.form.splice([scope.form.indexOf(v)],1),scope.listnodes=scope.listnodes?scope.listnodes:{},scope.listnodes[k.title]=k,scope.listnodes[k.title].fields=scope.model[k.title][0].fields,scope.listnodes[k.title].models=scope.model[k.title][0].models,scope.listnodes[k.title].lengthModels=scope.listnodes[k.title].models.length,scope.listnodes[k.title].lengthModels=1),"Node"==k.type&&(scope.form.splice([scope.form.indexOf(v)],1),scope.nodes=scope.nodes?scope.nodes:{},scope.nodes[k.title]=k)}),scope.isCollapsed=!0,scope.object_id=scope.form_params.object_id,generator.group(scope)},generator.group=function(formObject){return formObject},generator.dateformatter=function(formObject){return Date(formObject)},generator.get_form=function(scope){return $http.post(generator.makeUrl(scope.url),scope.form_params).then(function(res){return generator.generate(scope,res.data.forms)})},generator.get_list=function(scope){return $http.post(generator.makeUrl(scope.url),scope.form_params).then(function(res){return generator.dateformatter(res),res})},generator.get_single_item=function(scope){return $http.post(generator.makeUrl(scope.url),scope.form_params).then(function(res){return generator.dateformatter(res),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){if(data={form:$scope.model,cmd:$scope.form_params.cmd,subcmd:"do_list",model:$scope.form_params.model,token:$scope.token},$scope.object_id)var get_diff=FormDiff.get_diff($scope.model,$scope.initialModel),data={object_id:$scope.object_id,form:get_diff};return $http.post(generator.makeUrl($scope.url),data)},generator}),form_generator.controller("ModalCtrl",function($scope,$modalInstance,$route,items){angular.forEach(["model","schema","form"],function(key){$scope[key]=items[key]}),$scope.onSubmit=function(){$modalInstance.close($scope)},$scope.cancel=function(){$modalInstance.dismiss("cancel")}}),form_generator.directive("addModalForListNode",function($modal,Generator){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 node=angular.copy(scope.$parent.$parent.listnodes[attributes.addModalForListNode]),items={form:["*"],schema:{properties:{},title:node.title,type:"object"},model:{}};return angular.forEach(node.fields,function(item){items.schema.properties[item.name]=item,items.model[item.name]=item.value}),Generator.generate(scope,items)}}});modalInstance.result.then(function(childmodel,key){scope.schema.title.replace(/([a-z])([A-Z])/g,"$1_$2").toLowerCase();scope.$parent.model[scope.schema.title].push(scope.model)})})}}}),form_generator.directive("addModal",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.screen&&$location.path(response.data.screen),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("headerSubMenuButtons",function(){return{templateUrl:"shared/templates/directives/header-sub-menu-buttons.html",restrict:"E",replace:!0}}),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",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
/*! ulakbus-ui 2015-09-16 */
"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.$watch($("#"+v),function(){$timeout(function(){jQuery("#"+v).datepicker()})})),"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"},model:{}},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&&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){return Date(formObject)},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 generator.dateformatter(res),res})},generator.get_single_item=function(scope){return $http.post(generator.makeUrl(scope.url),scope.form_params).then(function(res){return generator.dateformatter(res),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){if(data={form:$scope.model,cmd:$scope.form_params.cmd,subcmd:"do_list",model:$scope.form_params.model,token:$scope.token},$scope.object_id){var get_diff=FormDiff.get_diff($scope.model,$scope.initialModel);data.object_id=$scope.object_id,data.form=get_diff}$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(["model","schema","form"],function(key){$scope[key]=items[key]}),Generator.prepareFormItems($scope),$scope.onSubmit=function(form){$scope.$broadcast("schemaFormValidate"),console.log(form.$valid),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){scope.$parent.model[childmodel.schema.title]=childmodel.model,console.log(scope.$parent.model)})})}}}),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",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
/*! ulakbus-ui 2015-09-11 */
/*! ulakbus-ui 2015-09-16 */
!function(p,c,C){"use strict";function v(r,h,g){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,f,b,d,y){function z(){k&&(g.cancel(k),k=null),l&&(l.$destroy(),l=null),m&&(k=g.leave(m),k.then(function(){k=null}),m=null)}function x(){var b=r.current&&r.current.locals;if(c.isDefined(b&&b.$template)){var b=a.$new(),d=r.current;m=y(b,function(b){g.enter(b,null,m||f).then(function(){!c.isDefined(t)||t&&!a.$eval(t)||h()}),z()}),l=d.scope=b,l.$emit("$viewContentLoaded"),l.$eval(w)}else z()}var l,m,k,t=b.autoscroll,w=b.onload||"";a.$on("$routeChangeSuccess",x),x()}}}function A(c,h,g){return{restrict:"ECA",priority:-400,link:function(a,f){var b=g.current,d=b.locals;f.html(d.$template);var y=c(f.contents());b.controller&&(d.$scope=a,d=h(b.controller,d),b.controllerAs&&(a[b.controllerAs]=d),f.data("$ngControllerController",d),f.children().data("$ngControllerController",d)),y(a)}}}p=c.module("ngRoute",["ng"]).provider("$route",function(){function r(a,f){return c.extend(Object.create(a),f)}function h(a,c){var b=c.caseInsensitiveMatch,d={originalPath:a,regexp:a},g=d.keys=[];return a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(a,c,b,d){return a="?"===d?d:null,d="*"===d?d:null,g.push({name:b,optional:!!a}),c=c||"",""+(a?"":c)+"(?:"+(a?c:"")+(d&&"(.+?)"||"([^/]+)")+(a||"")+")"+(a||"")}).replace(/([\/$\*])/g,"\\$1"),d.regexp=new RegExp("^"+a+"$",b?"i":""),d}var g={};this.when=function(a,f){var b=c.copy(f);if(c.isUndefined(b.reloadOnSearch)&&(b.reloadOnSearch=!0),c.isUndefined(b.caseInsensitiveMatch)&&(b.caseInsensitiveMatch=this.caseInsensitiveMatch),g[a]=c.extend(b,a&&h(a,b)),a){var d="/"==a[a.length-1]?a.substr(0,a.length-1):a+"/";g[d]=c.extend({redirectTo:a},h(d,b))}return this},this.caseInsensitiveMatch=!1,this.otherwise=function(a){return"string"==typeof a&&(a={redirectTo:a}),this.when(null,a),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(a,f,b,d,h,p,x){function l(b){var e=s.current;(v=(n=k())&&e&&n.$$route===e.$$route&&c.equals(n.pathParams,e.pathParams)&&!n.reloadOnSearch&&!w)||!e&&!n||a.$broadcast("$routeChangeStart",n,e).defaultPrevented&&b&&b.preventDefault()}function m(){var u=s.current,e=n;v?(u.params=e.params,c.copy(u.params,b),a.$broadcast("$routeUpdate",u)):(e||u)&&(w=!1,(s.current=e)&&e.redirectTo&&(c.isString(e.redirectTo)?f.path(t(e.redirectTo,e.params)).search(e.params).replace():f.url(e.redirectTo(e.pathParams,f.path(),f.search())).replace()),d.when(e).then(function(){if(e){var b,f,a=c.extend({},e.resolve);return c.forEach(a,function(b,e){a[e]=c.isString(b)?h.get(b):h.invoke(b,null,null,e)}),c.isDefined(b=e.template)?c.isFunction(b)&&(b=b(e.params)):c.isDefined(f=e.templateUrl)&&(c.isFunction(f)&&(f=f(e.params)),c.isDefined(f)&&(e.loadedTemplateUrl=x.valueOf(f),b=p(f))),c.isDefined(b)&&(a.$template=b),d.all(a)}}).then(function(f){e==s.current&&(e&&(e.locals=f,c.copy(e.params,b)),a.$broadcast("$routeChangeSuccess",e,u))},function(b){e==s.current&&a.$broadcast("$routeChangeError",e,u,b)}))}function k(){var a,b;return c.forEach(g,function(d,g){var q;if(q=!b){var h=f.path();q=d.keys;var l={};if(d.regexp)if(h=d.regexp.exec(h)){for(var k=1,m=h.length;m>k;++k){var n=q[k-1],p=h[k];n&&p&&(l[n.name]=p)}q=l}else q=null;else q=null;q=a=q}q&&(b=r(d,{params:c.extend({},f.search(),a),pathParams:a}),b.$$route=d)}),b||g[null]&&r(g[null],{params:{},pathParams:{}})}function t(a,b){var d=[];return c.forEach((a||"").split(":"),function(a,c){if(0===c)d.push(a);else{var f=a.match(/(\w+)(?:[?*])?(.*)/),g=f[1];d.push(b[g]),d.push(f[2]||""),delete b[g]}}),d.join("")}var n,v,w=!1,s={routes:g,reload:function(){w=!0,a.$evalAsync(function(){l(),m()})},updateParams:function(a){if(!this.current||!this.current.$$route)throw B("norout");a=c.extend({},this.current.params,a),f.path(t(this.current.$$route.originalPath,a)),f.search(a)}};return a.$on("$locationChangeStart",l),a.$on("$locationChangeSuccess",m),s}]});var B=c.$$minErr("ngRoute");p.provider("$routeParams",function(){this.$get=function(){return{}}}),p.directive("ngView",v),p.directive("ngView",A),v.$inject=["$route","$anchorScroll","$animate"],A.$inject=["$compile","$controller","$route"]}(window,window.angular),function(p,g,n){"use strict";g.module("ngCookies",["ng"]).factory("$cookies",["$rootScope","$browser",function(e,b){var h,c={},f={},k=!1,l=g.copy,m=g.isUndefined;return b.addPollFn(function(){var a=b.cookies();h!=a&&(h=a,l(a,f),l(a,c),k&&e.$apply())})(),k=!0,e.$watch(function(){var a,d,e;for(a in f)m(c[a])&&(b.cookies(a,n),delete f[a]);for(a in c)d=c[a],g.isString(d)||(d=""+d,c[a]=d),d!==f[a]&&(b.cookies(a,d),f[a]=d,e=!0);if(e)for(a in d=b.cookies(),c)c[a]!==d[a]&&(m(d[a])?(delete c[a],delete f[a]):c[a]=f[a]=d[a])}),c}]).factory("$cookieStore",["$cookies",function(e){return{get:function(b){return(b=e[b])?g.fromJson(b):b},put:function(b,c){e[b]=g.toJson(c)},remove:function(b){delete e[b]}}}])}(window,window.angular),function(I,d,B){"use strict";function D(f,q){q=q||{},d.forEach(q,function(d,h){delete q[h]});for(var h in f)!f.hasOwnProperty(h)||"$"===h.charAt(0)&&"$"===h.charAt(1)||(q[h]=f[h]);return q}var w=d.$$minErr("$resource"),C=/^(\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/;d.module("ngResource",["ng"]).provider("$resource",function(){var f=this;this.defaults={stripTrailingSlashes:!0,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}},this.$get=["$http","$q",function(q,h){function t(d,g){this.template=d,this.defaults=s({},f.defaults,g),this.urlParams={}}function v(x,g,l,m){function c(b,k){var c={};return k=s({},g,k),r(k,function(a,k){u(a)&&(a=a());var d;if(a&&a.charAt&&"@"==a.charAt(0)){d=b;var e=a.substr(1);if(null==e||""===e||"hasOwnProperty"===e||!C.test("."+e))throw w("badmember",e);for(var e=e.split("."),n=0,g=e.length;g>n&&d!==B;n++){var h=e[n];d=null!==d?d[h]:B}}else d=a;c[k]=d}),c}function F(b){return b.resource}function e(b){D(b||{},this)}var G=new t(x,m);return l=s({},f.defaults.actions,l),e.prototype.toJSON=function(){var b=s({},this);return delete b.$promise,delete b.$resolved,b},r(l,function(b,k){var g=/^(POST|PUT|PATCH)$/i.test(b.method);e[k]=function(a,y,m,x){var f,l,z,n={};switch(arguments.length){case 4:z=x,l=m;case 3:case 2:if(!u(y)){n=a,f=y,l=m;break}if(u(a)){l=a,z=y;break}l=y,z=m;case 1:u(a)?l=a:g?f=a:n=a;break;case 0:break;default:throw w("badargs",arguments.length)}var t=this instanceof e,p=t?f:b.isArray?[]:new e(f),A={},v=b.interceptor&&b.interceptor.response||F,C=b.interceptor&&b.interceptor.responseError||B;return r(b,function(b,a){"params"!=a&&"isArray"!=a&&"interceptor"!=a&&(A[a]=H(b))}),g&&(A.data=f),G.setUrlParams(A,s({},c(f,b.params||{}),n),b.url),n=q(A).then(function(a){var c=a.data,g=p.$promise;if(c){if(d.isArray(c)!==!!b.isArray)throw w("badcfg",k,b.isArray?"array":"object",d.isArray(c)?"array":"object");b.isArray?(p.length=0,r(c,function(a){"object"==typeof a?p.push(new e(a)):p.push(a)})):(D(c,p),p.$promise=g)}return p.$resolved=!0,a.resource=p,a},function(a){return p.$resolved=!0,(z||E)(a),h.reject(a)}),n=n.then(function(a){var b=v(a);return(l||E)(b,a.headers),b},C),t?n:(p.$promise=n,p.$resolved=!1,p)},e.prototype["$"+k]=function(a,b,c){return u(a)&&(c=b,b=a,a={}),a=e[k].call(this,a,this,b,c),a.$promise||a}}),e.bind=function(b){return v(x,s({},g,b),l)},e}var E=d.noop,r=d.forEach,s=d.extend,H=d.copy,u=d.isFunction;return t.prototype={setUrlParams:function(f,g,l){var h,e,m=this,c=l||m.template,q=m.urlParams={};r(c.split(/\W/),function(b){if("hasOwnProperty"===b)throw w("badname");!/^\d+$/.test(b)&&b&&new RegExp("(^|[^\\\\]):"+b+"(\\W|$)").test(c)&&(q[b]=!0)}),c=c.replace(/\\:/g,":"),g=g||{},r(m.urlParams,function(b,k){h=g.hasOwnProperty(k)?g[k]:m.defaults[k],d.isDefined(h)&&null!==h?(e=encodeURIComponent(h).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"%20").replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+"),c=c.replace(new RegExp(":"+k+"(\\W|$)","g"),function(b,a){return e+a})):c=c.replace(new RegExp("(/?):"+k+"(\\W|$)","g"),function(b,a,c){return"/"==c.charAt(0)?c:a+c})}),m.defaults.stripTrailingSlashes&&(c=c.replace(/\/+$/,"")||"/"),c=c.replace(/\/\.(?=\w+($|\?))/,"."),f.url=c.replace(/\/\\\./,"/."),r(g,function(b,c){m.urlParams[c]||(f.params=f.params||{},f.params[c]=b)})}},v}]})}(window,window.angular),angular.module("ui.bootstrap",["ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.bindHtml","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.dropdown","ui.bootstrap.modal","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.transition","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.collapse",[]).directive("collapse",["$animate",function(a){return{link:function(b,c,d){function e(){c.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),a.addClass(c,"in",{to:{height:c[0].scrollHeight+"px"}}).then(f)}function f(){c.removeClass("collapsing"),c.css({height:"auto"})}function g(){return c.hasClass("collapse")||c.hasClass("in")?(c.css({height:c[0].scrollHeight+"px"}).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),void a.removeClass(c,"in",{to:{height:"0"}}).then(h)):h()}function h(){c.css({height:"0"}),c.removeClass("collapsing"),c.addClass("collapse")}b.$watch(d.collapse,function(a){a?g():e()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("accordionConfig",{closeOthers:!0}).controller("AccordionController",["$scope","$attrs","accordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("accordion",function(){return{restrict:"EA",controller:"AccordionController",transclude:!0,replace:!1,templateUrl:"template/accordion/accordion.html"}}).directive("accordionGroup",function(){return{require:"^accordion",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/accordion/accordion-group.html",scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){d.addGroup(a),a.$watch("isOpen",function(b){b&&d.closeOthers(a)}),a.toggleOpen=function(){a.isDisabled||(a.isOpen=!a.isOpen)}}}}).directive("accordionHeading",function(){return{restrict:"EA",transclude:!0,template:"",replace:!0,require:"^accordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("accordionTransclude",function(){return{require:"^accordionGroup",link:function(a,b,c,d){a.$watch(function(){return d[c.accordionTransclude]},function(a){a&&(b.html(""),b.append(a))})}}}),angular.module("ui.bootstrap.alert",[]).controller("AlertController",["$scope","$attrs",function(a,b){a.closeable=!!b.close,this.close=a.close}]).directive("alert",function(){return{restrict:"EA",controller:"AlertController",templateUrl:"template/alert/alert.html",transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}).directive("dismissOnTimeout",["$timeout",function(a){return{require:"alert",link:function(b,c,d,e){a(function(){e.close()},parseInt(d.dismissOnTimeout,10))}}}]),angular.module("ui.bootstrap.bindHtml",[]).value("$bindHtmlUnsafeSuppressDeprecated",!1).directive("bindHtmlUnsafe",["$log","$bindHtmlUnsafeSuppressDeprecated",function(a,b){return function(c,d,e){b||a.warn("bindHtmlUnsafe is now deprecated. Use ngBindHtml instead"),d.addClass("ng-binding").data("$binding",e.bindHtmlUnsafe),c.$watch(e.bindHtmlUnsafe,function(a){d.html(a||"")})}}]),angular.module("ui.bootstrap.buttons",[]).constant("buttonConfig",{activeClass:"active",toggleEvent:"click"}).controller("ButtonsController",["buttonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("btnRadio",function(){return{require:["btnRadio","ngModel"],controller:"ButtonsController",link:function(a,b,c,d){var e=d[0],f=d[1];f.$render=function(){b.toggleClass(e.activeClass,angular.equals(f.$modelValue,a.$eval(c.btnRadio)))},b.bind(e.toggleEvent,function(){var d=b.hasClass(e.activeClass);(!d||angular.isDefined(c.uncheckable))&&a.$apply(function(){f.$setViewValue(d?null:a.$eval(c.btnRadio)),f.$render()})})}}}).directive("btnCheckbox",function(){return{require:["btnCheckbox","ngModel"],controller:"ButtonsController",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){var d=a.$eval(b);return angular.isDefined(d)?d:c}var h=d[0],i=d[1];i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.bind(h.toggleEvent,function(){a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("CarouselController",["$scope","$element","$interval","$animate",function(a,b,c,d){function e(b,c,e){q||(angular.extend(b,{direction:e,active:!0}),angular.extend(l.currentSlide||{},{direction:e,active:!1}),d.enabled()&&!a.noTransition&&!a.$currentTransition&&b.$element&&(b.$element.data(o,b.direction),a.$currentTransition=!0,b.$element.one("$animate:close",function(){a.$currentTransition=null})),l.currentSlide=b,p=c,g())}function f(a){if(angular.isUndefined(m[a].index))return m[a];var b;for(m.length,b=0;b<m.length;++b)if(m[b].index==a)return m[b]}function g(){h();var b=+a.interval;!isNaN(b)&&b>0&&(j=c(i,b))}function h(){j&&(c.cancel(j),j=null)}function i(){var b=+a.interval;k&&!isNaN(b)&&b>0&&m.length?a.next():a.pause()}var j,k,l=this,m=l.slides=a.slides=[],n="uib-noTransition",o="uib-slideDirection",p=-1;l.currentSlide=null;var q=!1;l.select=a.select=function(b,c){var d=l.indexOfSlide(b);void 0===c&&(c=d>l.getCurrentIndex()?"next":"prev"),b&&b!==l.currentSlide&&!a.$currentTransition&&e(b,d,c)},a.$on("$destroy",function(){q=!0}),l.getCurrentIndex=function(){return l.currentSlide&&angular.isDefined(l.currentSlide.index)?+l.currentSlide.index:p},l.indexOfSlide=function(a){return angular.isDefined(a.index)?+a.index:m.indexOf(a)},a.next=function(){var b=(l.getCurrentIndex()+1)%m.length;return 0===b&&a.noWrap()?void a.pause():l.select(f(b),"next")},a.prev=function(){var b=l.getCurrentIndex()-1<0?m.length-1:l.getCurrentIndex()-1;return a.noWrap()&&b===m.length-1?void a.pause():l.select(f(b),"prev")},a.isActive=function(a){return l.currentSlide===a},a.$watch("interval",g),a.$on("$destroy",h),a.play=function(){k||(k=!0,g())},a.pause=function(){a.noPause||(k=!1,h())},l.addSlide=function(b,c){b.$element=c,m.push(b),1===m.length||b.active?(l.select(m[m.length-1]),1==m.length&&a.play()):b.active=!1},l.removeSlide=function(a){angular.isDefined(a.index)&&m.sort(function(a,b){return+a.index>+b.index});var b=m.indexOf(a);m.splice(b,1),m.length>0&&a.active?l.select(b>=m.length?m[b-1]:m[b]):p>b&&p--},a.$watch("noTransition",function(a){b.data(n,a)})}]).directive("carousel",[function(){return{restrict:"EA",transclude:!0,replace:!0,controller:"CarouselController",require:"carousel",templateUrl:"template/carousel/carousel.html",scope:{interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}]).directive("slide",function(){return{require:"^carousel",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/carousel/slide.html",scope:{active:"=?",index:"=?"},link:function(a,b,c,d){d.addSlide(a,b),a.$on("$destroy",function(){d.removeSlide(a)}),a.$watch("active",function(b){b&&d.select(a)})}}}).animation(".item",["$animate",function(a){var b="uib-noTransition",c="uib-slideDirection";return{beforeAddClass:function(d,e,f){if("active"==e&&d.parent()&&!d.parent().data(b)){var g=!1,h=d.data(c),i="next"==h?"left":"right";return d.addClass(h),a.addClass(d,i).then(function(){g||d.removeClass(i+" "+h),f()}),function(){g=!0}}f()},beforeRemoveClass:function(d,e,f){if("active"==e&&d.parent()&&!d.parent().data(b)){var g=!1,h=d.data(c),i="next"==h?"left":"right";return a.addClass(d,i).then(function(){g||d.removeClass(i),f()}),function(){g=!0}}f()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("dateParser",["$locale","orderByFilter",function(a,b){function c(a){var c=[],d=a.split("");return angular.forEach(f,function(b,e){var f=a.indexOf(e);if(f>-1){a=a.split(""),d[f]="("+b.regex+")",a[f]="$";for(var g=f+1,h=f+e.length;h>g;g++)d[g]="",a[g]="$";a=a.join(""),c.push({index:f,apply:b.apply})}}),{regex:new RegExp("^"+d.join("")+"$"),map:b(c,"index")}}function d(a,b,c){return 1>c?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}var e=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.parsers={};var f={yyyy:{regex:"\\d{4}",apply:function(a){this.year=+a}},yy:{regex:"\\d{2}",apply:function(a){this.year=+a+2e3}},y:{regex:"\\d{1,4}",apply:function(a){this.year=+a}},MMMM:{regex:a.DATETIME_FORMATS.MONTH.join("|"),apply:function(b){this.month=a.DATETIME_FORMATS.MONTH.indexOf(b)}},MMM:{regex:a.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(b){this.month=a.DATETIME_FORMATS.SHORTMONTH.indexOf(b)}},MM:{regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1}},M:{regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1}},dd:{regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a}},d:{regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a}},EEEE:{regex:a.DATETIME_FORMATS.DAY.join("|")},EEE:{regex:a.DATETIME_FORMATS.SHORTDAY.join("|")},HH:{regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a}},H:{regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a}},mm:{regex:"[0-5][0-9]",apply:function(a){this.minutes=+a}},m:{regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a}},sss:{regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a}},ss:{regex:"[0-5][0-9]",apply:function(a){this.seconds=+a}},s:{regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a}}};this.parse=function(b,f,g){if(!angular.isString(b)||!f)return b;f=a.DATETIME_FORMATS[f]||f,f=f.replace(e,"\\$&"),this.parsers[f]||(this.parsers[f]=c(f));var h=this.parsers[f],i=h.regex,j=h.map,k=b.match(i);if(k&&k.length){var l,m;l=g?{year:g.getFullYear(),month:g.getMonth(),date:g.getDate(),hours:g.getHours(),minutes:g.getMinutes(),seconds:g.getSeconds(),milliseconds:g.getMilliseconds()}:{year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0};for(var n=1,o=k.length;o>n;n++){var p=j[n-1];p.apply&&p.apply.call(l,k[n])}return d(l.year,l.month,l.date)&&(m=new Date(l.year,l.month,l.date,l.hours,l.minutes,l.seconds,l.milliseconds||0)),m}}}]),angular.module("ui.bootstrap.position",[]).factory("$position",["$document","$window",function(a,b){function c(a,c){return a.currentStyle?a.currentStyle[c]:b.getComputedStyle?b.getComputedStyle(a)[c]:a.style[c]}function d(a){return"static"===(c(a,"position")||"static")}var e=function(b){for(var c=a[0],e=b.offsetParent||c;e&&e!==c&&d(e);)e=e.offsetParent;return e||c};return{position:function(b){var c=this.offset(b),d={top:0,left:0},f=e(b[0]);f!=a[0]&&(d=this.offset(angular.element(f)),d.top+=f.clientTop-f.scrollTop,d.left+=f.clientLeft-f.scrollLeft);var g=b[0].getBoundingClientRect();return{width:g.width||b.prop("offsetWidth"),height:g.height||b.prop("offsetHeight"),top:c.top-d.top,left:c.left-d.left}},offset:function(c){var d=c[0].getBoundingClientRect();return{width:d.width||c.prop("offsetWidth"),height:d.height||c.prop("offsetHeight"),top:d.top+(b.pageYOffset||a[0].documentElement.scrollTop),left:d.left+(b.pageXOffset||a[0].documentElement.scrollLeft)}},positionElements:function(a,b,c,d){var e,f,g,h,i=c.split("-"),j=i[0],k=i[1]||"center";e=d?this.offset(a):this.position(a),f=b.prop("offsetWidth"),g=b.prop("offsetHeight");var l={center:function(){return e.left+e.width/2-f/2},left:function(){return e.left},right:function(){return e.left+e.width}},m={center:function(){return e.top+e.height/2-g/2},top:function(){return e.top},bottom:function(){return e.top+e.height}};switch(j){case"right":h={top:m[k](),left:l[j]()};break;case"left":h={top:m[k](),left:e.left-f};break;case"bottom":h={top:m[j](),left:l[k]()};break;default:h={top:e.top-g,left:l[k]()}}return h}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.position"]).constant("datepickerConfig",{formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",datepickerMode:"day",minMode:"day",maxMode:"year",showWeeks:!0,startingDay:0,yearRange:20,minDate:null,maxDate:null,shortcutPropagation:!1}).controller("DatepickerController",["$scope","$attrs","$parse","$interpolate","$log","dateFilter","datepickerConfig",function(a,b,c,d,e,f,g){var h=this,i={$setViewValue:angular.noop};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","minMode","maxMode","showWeeks","startingDay","yearRange","shortcutPropagation"],function(c,e){h[c]=angular.isDefined(b[c])?8>e?d(b[c])(a.$parent):a.$parent.$eval(b[c]):g[c]}),angular.forEach(["minDate","maxDate"],function(d){b[d]?a.$parent.$watch(c(b[d]),function(a){h[d]=a?new Date(a):null,h.refreshView()}):h[d]=g[d]?new Date(g[d]):null}),a.datepickerMode=a.datepickerMode||g.datepickerMode,a.maxMode=h.maxMode,a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),angular.isDefined(b.initDate)?(this.activeDate=a.$parent.$eval(b.initDate)||new Date,a.$parent.$watch(b.initDate,function(a){a&&(i.$isEmpty(i.$modelValue)||i.$invalid)&&(h.activeDate=a,h.refreshView())})):this.activeDate=new Date,a.isActive=function(b){return 0===h.compare(b.date,h.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(a){i=a,i.$render=function(){h.render()}},this.render=function(){if(i.$viewValue){var a=new Date(i.$viewValue),b=!isNaN(a);b?this.activeDate=a:e.error('Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.'),i.$setValidity("date",b)}this.refreshView()},this.refreshView=function(){if(this.element){this._refreshView();var a=i.$viewValue?new Date(i.$viewValue):null;i.$setValidity("date-disabled",!a||this.element&&!this.isDisabled(a))}},this.createDateObject=function(a,b){var c=i.$viewValue?new Date(i.$viewValue):null;return{date:a,label:f(a,b),selected:c&&0===this.compare(a,c),disabled:this.isDisabled(a),current:0===this.compare(a,new Date),customClass:this.customClass(a)}},this.isDisabled=function(c){return this.minDate&&this.compare(c,this.minDate)<0||this.maxDate&&this.compare(c,this.maxDate)>0||b.dateDisabled&&a.dateDisabled({date:c,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},this.fixTimeZone=function(a){var b=a.getHours();a.setHours(23===b?b+2:0)},a.select=function(b){if(a.datepickerMode===h.minMode){var c=i.$viewValue?new Date(i.$viewValue):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),i.$setViewValue(c),i.$render()}else h.activeDate=b,a.datepickerMode=h.modes[h.modes.indexOf(a.datepickerMode)-1]},a.move=function(a){var b=h.activeDate.getFullYear()+a*(h.step.years||0),c=h.activeDate.getMonth()+a*(h.step.months||0);h.activeDate.setFullYear(b,c,1),h.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===h.maxMode&&1===b||a.datepickerMode===h.minMode&&-1===b||(a.datepickerMode=h.modes[h.modes.indexOf(a.datepickerMode)+b])},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var j=function(){h.element[0].focus()};a.$on("datepicker.focus",j),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey)if(b.preventDefault(),h.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(h.isDisabled(h.activeDate))return;a.select(h.activeDate),j()}else!b.ctrlKey||"up"!==c&&"down"!==c?(h.handleKeyDown(c,b),h.refreshView()):(a.toggleMode("up"===c?1:-1),j())}}]).directive("datepicker",function(){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/datepicker.html",scope:{datepickerMode:"=?",dateDisabled:"&",customClass:"&",shortcutPropagation:"&?"},require:["datepicker","?^ngModel"],controller:"DatepickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f)}}}).directive("daypicker",["dateFilter",function(a){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/day.html",require:"^datepicker",link:function(b,c,d,e){function f(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?i[b]:29}function g(a,b){for(var c,d=new Array(b),f=new Date(a),g=0;b>g;)c=new Date(f),e.fixTimeZone(c),d[g++]=c,f.setDate(f.getDate()+1);return d}function h(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}b.showWeeks=e.showWeeks,e.step={months:1},e.element=c;var i=[31,28,31,30,31,30,31,31,30,31,30,31];e._refreshView=function(){var c=e.activeDate.getFullYear(),d=e.activeDate.getMonth(),f=new Date(c,d,1),i=e.startingDay-f.getDay(),j=i>0?7-i:-i,k=new Date(f);j>0&&k.setDate(-j+1);for(var l=g(k,42),m=0;42>m;m++)l[m]=angular.extend(e.createDateObject(l[m],e.formatDay),{secondary:l[m].getMonth()!==d,uid:b.uniqueId+"-"+m});b.labels=new Array(7);for(var n=0;7>n;n++)b.labels[n]={abbr:a(l[n].date,e.formatDayHeader),full:a(l[n].date,"EEEE")};if(b.title=a(e.activeDate,e.formatDayTitle),b.rows=e.split(l,7),b.showWeeks){b.weekNumbers=[];for(var o=(11-e.startingDay)%7,p=b.rows.length,q=0;p>q;q++)b.weekNumbers.push(h(b.rows[q][o].date))}},e.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},e.handleKeyDown=function(a){var b=e.activeDate.getDate();if("left"===a)b-=1;else if("up"===a)b-=7;else if("right"===a)b+=1;else if("down"===a)b+=7;else if("pageup"===a||"pagedown"===a){var c=e.activeDate.getMonth()+("pageup"===a?-1:1);e.activeDate.setMonth(c,1),b=Math.min(f(e.activeDate.getFullYear(),e.activeDate.getMonth()),b)}else"home"===a?b=1:"end"===a&&(b=f(e.activeDate.getFullYear(),e.activeDate.getMonth()));e.activeDate.setDate(b)},e.refreshView()}}}]).directive("monthpicker",["dateFilter",function(a){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/month.html",require:"^datepicker",link:function(b,c,d,e){e.step={years:1},e.element=c,e._refreshView=function(){for(var c,d=new Array(12),f=e.activeDate.getFullYear(),g=0;12>g;g++)c=new Date(f,g,1),e.fixTimeZone(c),d[g]=angular.extend(e.createDateObject(c,e.formatMonth),{uid:b.uniqueId+"-"+g});b.title=a(e.activeDate,e.formatMonthTitle),b.rows=e.split(d,3)},e.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth())-new Date(b.getFullYear(),b.getMonth())},e.handleKeyDown=function(a){var b=e.activeDate.getMonth();if("left"===a)b-=1;else if("up"===a)b-=3;else if("right"===a)b+=1;else if("down"===a)b+=3;else if("pageup"===a||"pagedown"===a){var c=e.activeDate.getFullYear()+("pageup"===a?-1:1);e.activeDate.setFullYear(c)}else"home"===a?b=0:"end"===a&&(b=11);e.activeDate.setMonth(b)},e.refreshView()}}}]).directive("yearpicker",["dateFilter",function(){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/year.html",require:"^datepicker",link:function(a,b,c,d){function e(a){return parseInt((a-1)/f,10)*f+1}var f=d.yearRange;d.step={years:f},d.element=b,d._refreshView=function(){for(var b,c=new Array(f),g=0,h=e(d.activeDate.getFullYear());f>g;g++)b=new Date(h+g,0,1),d.fixTimeZone(b),c[g]=angular.extend(d.createDateObject(b,d.formatYear),{uid:a.uniqueId+"-"+g});a.title=[c[0].label,c[f-1].label].join(" - "),a.rows=d.split(c,5)},d.compare=function(a,b){return a.getFullYear()-b.getFullYear()},d.handleKeyDown=function(a){var b=d.activeDate.getFullYear();"left"===a?b-=1:"up"===a?b-=5:"right"===a?b+=1:"down"===a?b+=5:"pageup"===a||"pagedown"===a?b+=("pageup"===a?-1:1)*d.step.years:"home"===a?b=e(d.activeDate.getFullYear()):"end"===a&&(b=e(d.activeDate.getFullYear())+f-1),d.activeDate.setFullYear(b)},d.refreshView()}}}]).constant("datepickerPopupConfig",{datepickerPopup:"yyyy-MM-dd",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},currentText:"Today",clearText:"Clear",closeText:"Done",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0}).directive("datepickerPopup",["$compile","$parse","$document","$position","dateFilter","dateParser","datepickerPopupConfig","$timeout",function(a,b,c,d,e,f,g,h){return{restrict:"EA",require:"ngModel",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&",customClass:"&"},link:function(i,j,k,l){function m(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function n(a){if(angular.isNumber(a)&&(a=new Date(a)),a){if(angular.isDate(a)&&!isNaN(a))return a;if(angular.isString(a)){var b=f.parse(a,p,i.date)||new Date(a);return isNaN(b)?void 0:b}return void 0}return null}function o(a,b){var c=a||b;if(angular.isNumber(c)&&(c=new Date(c)),c){if(angular.isDate(c)&&!isNaN(c))return!0;if(angular.isString(c)){var d=f.parse(c,p)||new Date(c);return!isNaN(d)}return!1}return!0}var p,q=angular.isDefined(k.closeOnDateSelection)?i.$parent.$eval(k.closeOnDateSelection):g.closeOnDateSelection,r=angular.isDefined(k.datepickerAppendToBody)?i.$parent.$eval(k.datepickerAppendToBody):g.appendToBody;i.showButtonBar=angular.isDefined(k.showButtonBar)?i.$parent.$eval(k.showButtonBar):g.showButtonBar,i.getText=function(a){return i[a+"Text"]||g[a+"Text"]};var s=!1;if(g.html5Types[k.type]?(p=g.html5Types[k.type],s=!0):(p=k.datepickerPopup||g.datepickerPopup,k.$observe("datepickerPopup",function(a){var b=a||g.datepickerPopup;if(b!==p&&(p=b,l.$modelValue=null,!p))throw new Error("datepickerPopup must have a date format specified.")})),!p)throw new Error("datepickerPopup must have a date format specified.");if(s&&k.datepickerPopup)throw new Error("HTML5 date input types do not support custom formats.");var t=angular.element("<div datepicker-popup-wrap><div datepicker></div></div>");t.attr({"ng-model":"date","ng-change":"dateSelection(date)"});var u=angular.element(t.children()[0]);if(s&&"month"==k.type&&(u.attr("datepicker-mode",'"month"'),u.attr("min-mode","month")),k.datepickerOptions){var v=i.$parent.$eval(k.datepickerOptions);v.initDate&&(i.initDate=v.initDate,u.attr("init-date","initDate"),delete v.initDate),angular.forEach(v,function(a,b){u.attr(m(b),a)})}i.watchData={},angular.forEach(["minDate","maxDate","datepickerMode","initDate","shortcutPropagation"],function(a){if(k[a]){var c=b(k[a]);if(i.$parent.$watch(c,function(b){i.watchData[a]=b}),u.attr(m(a),"watchData."+a),"datepickerMode"===a){var d=c.assign;i.$watch("watchData."+a,function(a,b){angular.isFunction(d)&&a!==b&&d(i.$parent,a)})}}}),k.dateDisabled&&u.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),k.showWeeks&&u.attr("show-weeks",k.showWeeks),k.customClass&&u.attr("custom-class","customClass({ date: date, mode: mode })"),s?l.$formatters.push(function(a){return i.date=a,a}):(l.$$parserName="date",l.$validators.date=o,l.$parsers.unshift(n),l.$formatters.push(function(a){return i.date=a,l.$isEmpty(a)?a:e(a,p)})),i.dateSelection=function(a){angular.isDefined(a)&&(i.date=a);var b=i.date?e(i.date,p):"";j.val(b),l.$setViewValue(b),q&&(i.isOpen=!1,j[0].focus())},l.$viewChangeListeners.push(function(){i.date=f.parse(l.$viewValue,p,i.date)||new Date(l.$viewValue)});var w=function(a){i.isOpen&&a.target!==j[0]&&i.$apply(function(){i.isOpen=!1})},x=function(a){27===a.which&&i.isOpen?(a.preventDefault(),a.stopPropagation(),
i.$apply(function(){i.isOpen=!1}),j[0].focus()):40!==a.which||i.isOpen||(a.preventDefault(),a.stopPropagation(),i.$apply(function(){i.isOpen=!0}))};j.bind("keydown",x),i.keydown=function(a){27===a.which&&(i.isOpen=!1,j[0].focus())},i.$watch("isOpen",function(a){a?(i.position=r?d.offset(j):d.position(j),i.position.top=i.position.top+j.prop("offsetHeight"),c.bind("click",w),h(function(){i.$broadcast("datepicker.focus")},0,!1)):c.unbind("click",w)}),i.select=function(a){if("today"===a){var b=new Date;angular.isDate(i.date)?(a=new Date(i.date),a.setFullYear(b.getFullYear(),b.getMonth(),b.getDate())):a=new Date(b.setHours(0,0,0,0))}i.dateSelection(a)},i.close=function(){i.isOpen=!1,j[0].focus()};var y=a(t)(i);t.remove(),r?c.find("body").append(y):j.after(y),i.$on("$destroy",function(){i.isOpen===!0&&i.$apply(function(){i.isOpen=!1}),y.remove(),j.unbind("keydown",x),c.unbind("click",w)})}}}]).directive("datepickerPopupWrap",function(){return{restrict:"EA",replace:!0,transclude:!0,templateUrl:"template/datepicker/popup.html"}}),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("dropdownConfig",{openClass:"open"}).service("dropdownService",["$document","$rootScope",function(a,b){var c=null;this.open=function(b){c||(a.bind("click",d),a.bind("keydown",e)),c&&c!==b&&(c.isOpen=!1),c=b},this.close=function(b){c===b&&(c=null,a.unbind("click",d),a.unbind("keydown",e))};var d=function(a){if(c&&(!a||"disabled"!==c.getAutoClose())){var d=c.getToggleElement();if(!(a&&d&&d[0].contains(a.target))){var e=c.getDropdownElement();a&&"outsideClick"===c.getAutoClose()&&e&&e[0].contains(a.target)||(c.isOpen=!1,b.$$phase||c.$apply())}}},e=function(a){27===a.which?(c.focusToggleElement(),d()):c.isKeynavEnabled()&&/(38|40)/.test(a.which)&&c.isOpen&&(a.preventDefault(),a.stopPropagation(),c.focusDropdownEntry(a.which))}}]).controller("DropdownController",["$scope","$attrs","$parse","dropdownConfig","dropdownService","$animate","$position","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j){var k,l,m=this,n=a.$new(),o=d.openClass,p=angular.noop,q=b.onToggle?c(b.onToggle):angular.noop,r=!1,s=!1;this.init=function(d){m.$element=d,b.isOpen&&(l=c(b.isOpen),p=l.assign,a.$watch(l,function(a){n.isOpen=!!a})),r=angular.isDefined(b.dropdownAppendToBody),s=angular.isDefined(b.keyboardNav),r&&m.dropdownMenu&&(h.find("body").append(m.dropdownMenu),d.on("$destroy",function(){m.dropdownMenu.remove()}))},this.toggle=function(a){return n.isOpen=arguments.length?!!a:!n.isOpen},this.isOpen=function(){return n.isOpen},n.getToggleElement=function(){return m.toggleElement},n.getAutoClose=function(){return b.autoClose||"always"},n.getElement=function(){return m.$element},n.isKeynavEnabled=function(){return s},n.focusDropdownEntry=function(a){var b=m.dropdownMenu?angular.element(m.dropdownMenu).find("a"):angular.element(m.$element).find("ul").eq(0).find("a");switch(a){case 40:m.selectedOption=angular.isNumber(m.selectedOption)?m.selectedOption===b.length-1?m.selectedOption:m.selectedOption+1:0;break;case 38:if(!angular.isNumber(m.selectedOption))return;m.selectedOption=0===m.selectedOption?0:m.selectedOption-1}b[m.selectedOption].focus()},n.getDropdownElement=function(){return m.dropdownMenu},n.focusToggleElement=function(){m.toggleElement&&m.toggleElement[0].focus()},n.$watch("isOpen",function(b,c){if(r&&m.dropdownMenu){var d=g.positionElements(m.$element,m.dropdownMenu,"bottom-left",!0),h={top:d.top+"px",display:b?"block":"none"},l=m.dropdownMenu.hasClass("dropdown-menu-right");l?(h.left="auto",h.right=window.innerWidth-(d.left+m.$element.prop("offsetWidth"))+"px"):(h.left=d.left+"px",h.right="auto"),m.dropdownMenu.css(h)}if(f[b?"addClass":"removeClass"](m.$element,o).then(function(){angular.isDefined(b)&&b!==c&&q(a,{open:!!b})}),b)m.dropdownMenuTemplateUrl&&j(m.dropdownMenuTemplateUrl).then(function(a){k=n.$new(),i(a.trim())(k,function(a){var b=a;m.dropdownMenu.replaceWith(b),m.dropdownMenu=b})}),n.focusToggleElement(),e.open(n);else{if(m.dropdownMenuTemplateUrl){k&&k.$destroy();var s=angular.element('<ul class="dropdown-menu"></ul>');m.dropdownMenu.replaceWith(s),m.dropdownMenu=s}e.close(n),m.selectedOption=null}p(a,b)}),a.$on("$locationChangeSuccess",function(){"disabled"!==n.getAutoClose()&&(n.isOpen=!1)}),a.$on("$destroy",function(){n.$destroy()})}]).directive("dropdown",function(){return{controller:"DropdownController",link:function(a,b,c,d){d.init(b),b.addClass("dropdown")}}}).directive("dropdownMenu",function(){return{restrict:"AC",require:"?^dropdown",link:function(a,b,c,d){if(d){var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("keyboardNav",function(){return{restrict:"A",require:"?^dropdown",link:function(a,b,c,d){b.bind("keydown",function(a){if(-1!==[38,40].indexOf(a.which)){a.preventDefault(),a.stopPropagation();var c=angular.element(b).find("a");switch(a.keyCode){case 40:d.selectedOption=angular.isNumber(d.selectedOption)?d.selectedOption===c.length-1?d.selectedOption:d.selectedOption+1:0;break;case 38:d.selectedOption=0===d.selectedOption?0:d.selectedOption-1}c[d.selectedOption].focus()}})}}}).directive("dropdownToggle",function(){return{require:"?^dropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.bind("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.unbind("click",e)})}}}}),angular.module("ui.bootstrap.modal",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c<a.length;c++)if(b==a[c].key)return a[c]},keys:function(){for(var b=[],c=0;c<a.length;c++)b.push(a[c].key);return b},top:function(){return a[a.length-1]},remove:function(b){for(var c=-1,d=0;d<a.length;d++)if(b==a[d].key){c=d;break}return a.splice(c,1)[0]},removeTop:function(){return a.splice(a.length-1,1)[0]},length:function(){return a.length}}}}}).directive("modalBackdrop",["$animate","$modalStack",function(a,b){function c(c,d,e){e.modalInClass&&(a.addClass(d,e.modalInClass),c.$on(b.NOW_CLOSING_EVENT,function(b,c){var f=c();a.removeClass(d,e.modalInClass).then(f)}))}return{restrict:"EA",replace:!0,templateUrl:"template/modal/backdrop.html",compile:function(a,b){return a.addClass(b.backdropClass),c}}}]).directive("modalWindow",["$modalStack","$q","$animate",function(a,b,c){return{restrict:"EA",scope:{index:"@"},replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"template/modal/window.html"},link:function(d,e,f){e.addClass(f.windowClass||""),d.size=f.size,d.close=function(b){var c=a.getTop();c&&c.value.backdrop&&"static"!=c.value.backdrop&&b.target===b.currentTarget&&(b.preventDefault(),b.stopPropagation(),a.dismiss(c.key,"backdrop click"))},d.$isRendered=!0;var g=b.defer();f.$observe("modalRender",function(a){"true"==a&&g.resolve()}),g.promise.then(function(){f.modalInClass&&(c.addClass(e,f.modalInClass),d.$on(a.NOW_CLOSING_EVENT,function(a,b){var d=b();c.removeClass(e,f.modalInClass).then(d)}));var b=e[0].querySelectorAll("[autofocus]");b.length?b[0].focus():e[0].focus();var g=a.getTop();g&&a.modalRendered(g.key)})}}}]).directive("modalAnimationClass",[function(){return{compile:function(a,b){b.modalAnimation&&a.addClass(b.modalAnimationClass)}}}]).directive("modalTransclude",function(){return{link:function(a,b,c,d,e){e(a.$parent,function(a){b.empty(),b.append(a)})}}}).factory("$modalStack",["$animate","$timeout","$document","$compile","$rootScope","$q","$$stackedMap",function(a,b,c,d,e,f,g){function h(){for(var a=-1,b=p.keys(),c=0;c<b.length;c++)p.get(b[c]).value.backdrop&&(a=c);return a}function i(a,b){var d=c.find("body").eq(0),e=p.get(a).value;p.remove(a),k(e.modalDomEl,e.modalScope,function(){d.toggleClass(o,p.length()>0),j()}),b&&b.focus?b.focus():d.focus()}function j(){if(m&&-1==h()){var a=n;k(m,n,function(){a=null}),m=void 0,n=void 0}}function k(a,b,c){function d(){d.done||(d.done=!0,a.remove(),b.$destroy(),c&&c())}var e,g=null,h=function(){return e||(e=f.defer(),g=e.promise),function(){e.resolve()}};return b.$broadcast(q.NOW_CLOSING_EVENT,h),f.when(g).then(d)}function l(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}var m,n,o="modal-open",p=g.createNew(),q={NOW_CLOSING_EVENT:"modal.stack.now-closing"};return e.$watch(h,function(a){n&&(n.index=a)}),c.bind("keydown",function(a){var b;27===a.which&&(b=p.top(),b&&b.value.keyboard&&(a.preventDefault(),e.$apply(function(){q.dismiss(b.key,"escape key press")})))}),q.open=function(a,b){var f=c[0].activeElement;p.add(a,{deferred:b.deferred,renderDeferred:b.renderDeferred,modalScope:b.scope,backdrop:b.backdrop,keyboard:b.keyboard});var g=c.find("body").eq(0),i=h();if(i>=0&&!m){n=e.$new(!0),n.index=i;var j=angular.element('<div modal-backdrop="modal-backdrop"></div>');j.attr("backdrop-class",b.backdropClass),b.animation&&j.attr("modal-animation","true"),m=d(j)(n),g.append(m)}var k=angular.element('<div modal-window="modal-window"></div>');k.attr({"template-url":b.windowTemplateUrl,"window-class":b.windowClass,size:b.size,index:p.length()-1,animate:"animate"}).html(b.content),b.animation&&k.attr("modal-animation","true");var l=d(k)(b.scope);p.top().value.modalDomEl=l,p.top().value.modalOpener=f,g.append(l),g.addClass(o)},q.close=function(a,b){var c=p.get(a);return c&&l(c,b,!0)?(c.value.deferred.resolve(b),i(a,c.value.modalOpener),!0):!c},q.dismiss=function(a,b){var c=p.get(a);return c&&l(c,b,!1)?(c.value.deferred.reject(b),i(a,c.value.modalOpener),!0):!c},q.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},q.getTop=function(){return p.top()},q.modalRendered=function(a){var b=p.get(a);b&&b.value.renderDeferred.resolve()},q}]).provider("$modal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$injector","$rootScope","$q","$templateRequest","$controller","$modalStack",function(b,c,d,e,f,g){function h(a){return a.template?d.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}function i(a){var c=[];return angular.forEach(a,function(a){(angular.isFunction(a)||angular.isArray(a))&&c.push(d.when(b.invoke(a)))}),c}var j={};return j.open=function(b){var e=d.defer(),j=d.defer(),k=d.defer(),l={result:e.promise,opened:j.promise,rendered:k.promise,close:function(a){return g.close(l,a)},dismiss:function(a){return g.dismiss(l,a)}};if(b=angular.extend({},a.options,b),b.resolve=b.resolve||{},!b.template&&!b.templateUrl)throw new Error("One of template or templateUrl options is required.");var m=d.all([h(b)].concat(i(b.resolve)));return m.then(function(a){var d=(b.scope||c).$new();d.$close=l.close,d.$dismiss=l.dismiss;var h,i={},j=1;b.controller&&(i.$scope=d,i.$modalInstance=l,angular.forEach(b.resolve,function(b,c){i[c]=a[j++]}),h=f(b.controller,i),b.controllerAs&&(b.bindToController?angular.extend(d,h):d[b.controllerAs]=h)),g.open(l,{scope:d,deferred:e,renderDeferred:k,content:a[0],animation:b.animation,backdrop:b.backdrop,keyboard:b.keyboard,backdropClass:b.backdropClass,windowClass:b.windowClass,windowTemplateUrl:b.windowTemplateUrl,size:b.size})},function(a){e.reject(a)}),m.then(function(){j.resolve(!0)},function(a){j.reject(a)}),l},j}]};return a}),angular.module("ui.bootstrap.pagination",[]).controller("PaginationController",["$scope","$attrs","$parse",function(a,b,c){var d=this,e={$setViewValue:angular.noop},f=b.numPages?c(b.numPages).assign:angular.noop;this.init=function(g,h){e=g,this.config=h,e.$render=function(){d.render()},b.itemsPerPage?a.$parent.$watch(c(b.itemsPerPage),function(b){d.itemsPerPage=parseInt(b,10),a.totalPages=d.calculateTotalPages()}):this.itemsPerPage=h.itemsPerPage,a.$watch("totalItems",function(){a.totalPages=d.calculateTotalPages()}),a.$watch("totalPages",function(b){f(a.$parent,b),a.page>b?a.selectPage(b):e.$render()})},this.calculateTotalPages=function(){var b=this.itemsPerPage<1?1:Math.ceil(a.totalItems/this.itemsPerPage);return Math.max(b||0,1)},this.render=function(){a.page=parseInt(e.$viewValue,10)||1},a.selectPage=function(b,c){var d=!a.ngDisabled||!c;d&&a.page!==b&&b>0&&b<=a.totalPages&&(c&&c.target&&c.target.blur(),e.$setViewValue(b),e.$render())},a.getText=function(b){return a[b+"Text"]||d.config[b+"Text"]},a.noPrevious=function(){return 1===a.page},a.noNext=function(){return a.page===a.totalPages}}]).constant("paginationConfig",{itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0}).directive("pagination",["$parse","paginationConfig",function(a,b){return{restrict:"EA",scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["pagination","?ngModel"],controller:"PaginationController",templateUrl:"template/pagination/pagination.html",replace:!0,link:function(c,d,e,f){function g(a,b,c){return{number:a,text:b,active:c}}function h(a,b){var c=[],d=1,e=b,f=angular.isDefined(k)&&b>k;f&&(l?(d=Math.max(a-Math.floor(k/2),1),e=d+k-1,e>b&&(e=b,d=e-k+1)):(d=(Math.ceil(a/k)-1)*k+1,e=Math.min(d+k-1,b)));for(var h=d;e>=h;h++){var i=g(h,h,h===a);c.push(i)}if(f&&!l){if(d>1){var j=g(d-1,"...",!1);c.unshift(j)}if(b>e){var m=g(e+1,"...",!1);c.push(m)}}return c}var i=f[0],j=f[1];if(j){var k=angular.isDefined(e.maxSize)?c.$parent.$eval(e.maxSize):b.maxSize,l=angular.isDefined(e.rotate)?c.$parent.$eval(e.rotate):b.rotate;c.boundaryLinks=angular.isDefined(e.boundaryLinks)?c.$parent.$eval(e.boundaryLinks):b.boundaryLinks,c.directionLinks=angular.isDefined(e.directionLinks)?c.$parent.$eval(e.directionLinks):b.directionLinks,i.init(j,b),e.maxSize&&c.$parent.$watch(a(e.maxSize),function(a){k=parseInt(a,10),i.render()});var m=i.render;i.render=function(){m(),c.page>0&&c.page<=c.totalPages&&(c.pages=h(c.page,c.totalPages))}}}}}]).constant("pagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("pager",["pagerConfig",function(a){return{restrict:"EA",scope:{totalItems:"=",previousText:"@",nextText:"@"},require:["pager","?ngModel"],controller:"PaginationController",templateUrl:"template/pagination/pager.html",replace:!0,link:function(b,c,d,e){var f=e[0],g=e[1];g&&(b.align=angular.isDefined(d.align)?b.$parent.$eval(d.align):a.align,f.init(g,a))}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).provider("$tooltip",function(){function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",animation:!0,popupDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",focus:"blur"},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$position","$interpolate",function(e,f,g,h,i,j){return function(e,k,l,m){function n(a){var b=a||m.trigger||l,d=c[b]||b;return{show:b,hide:d}}m=angular.extend({},b,d,m);var o=a(e),p=j.startSymbol(),q=j.endSymbol(),r="<div "+o+'-popup title="'+p+"title"+q+'" '+(m.useContentExp?'content-exp="contentExp()" ':'content="'+p+"content"+q+'" ')+'placement="'+p+"placement"+q+'" popup-class="'+p+"popupClass"+q+'" animation="animation" is-open="isOpen"origin-scope="origScope" ></div>';return{restrict:"EA",compile:function(){var a=f(r);return function(b,c,d){function f(){E.isOpen?l():j()}function j(){(!D||b.$eval(d[k+"Enable"]))&&(s(),E.popupDelay?A||(A=g(o,E.popupDelay,!1),A.then(function(a){a()})):o()())}function l(){b.$apply(function(){p()})}function o(){return A=null,z&&(g.cancel(z),z=null),(m.useContentExp?E.contentExp():E.content)?(q(),x.css({top:0,left:0,display:"block"}),E.$digest(),F(),E.isOpen=!0,E.$apply(),F):angular.noop}function p(){E.isOpen=!1,g.cancel(A),A=null,E.animation?z||(z=g(r,500)):r()}function q(){x&&r(),y=E.$new(),x=a(y,function(a){B?h.find("body").append(a):c.after(a)}),y.$watch(function(){g(F,0,!1)}),m.useContentExp&&y.$watch("contentExp()",function(a){!a&&E.isOpen&&p()})}function r(){z=null,x&&(x.remove(),x=null),y&&(y.$destroy(),y=null)}function s(){t(),u(),v()}function t(){E.popupClass=d[k+"Class"]}function u(){var a=d[k+"Placement"];E.placement=angular.isDefined(a)?a:m.placement}function v(){var a=d[k+"PopupDelay"],b=parseInt(a,10);E.popupDelay=isNaN(b)?m.popupDelay:b}function w(){var a=d[k+"Trigger"];G(),C=n(a),C.show===C.hide?c.bind(C.show,f):(c.bind(C.show,j),c.bind(C.hide,l))}var x,y,z,A,B=angular.isDefined(m.appendToBody)?m.appendToBody:!1,C=n(void 0),D=angular.isDefined(d[k+"Enable"]),E=b.$new(!0),F=function(){if(x){var a=i.positionElements(c,x,E.placement,B);a.top+="px",a.left+="px",x.css(a)}};E.origScope=b,E.isOpen=!1,E.contentExp=function(){return b.$eval(d[e])},m.useContentExp||d.$observe(e,function(a){E.content=a,!a&&E.isOpen&&p()}),d.$observe("disabled",function(a){a&&E.isOpen&&p()}),d.$observe(k+"Title",function(a){E.title=a});var G=function(){c.unbind(C.show,j),c.unbind(C.hide,l)};w();var H=b.$eval(d[k+"Animation"]);E.animation=angular.isDefined(H)?!!H:m.animation;var I=b.$eval(d[k+"AppendToBody"]);B=angular.isDefined(I)?I:B,B&&b.$on("$locationChangeSuccess",function(){E.isOpen&&p()}),b.$on("$destroy",function(){g.cancel(z),g.cancel(A),G(),r(),E=null})}}}}}]}).directive("tooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.tooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("tooltipClasses",function(){return{restrict:"A",link:function(a,b,c){a.placement&&b.addClass(a.placement),a.popupClass&&b.addClass(a.popupClass),a.animation()&&b.addClass(c.tooltipAnimationClass)}}}).directive("tooltipPopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html"}}).directive("tooltip",["$tooltip",function(a){return a("tooltip","tooltip","mouseenter")}]).directive("tooltipTemplatePopup",function(){return{restrict:"EA",replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"template/tooltip/tooltip-template-popup.html"}}).directive("tooltipTemplate",["$tooltip",function(a){return a("tooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("tooltipHtmlPopup",function(){return{restrict:"EA",replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-popup.html"}}).directive("tooltipHtml",["$tooltip",function(a){return a("tooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]).directive("tooltipHtmlUnsafePopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-unsafe-popup.html"}}).value("tooltipHtmlUnsafeSuppressDeprecated",!1).directive("tooltipHtmlUnsafe",["$tooltip","tooltipHtmlUnsafeSuppressDeprecated","$log",function(a,b,c){return b||c.warn("tooltip-html-unsafe is now deprecated. Use tooltip-html or tooltip-template instead."),a("tooltipHtmlUnsafe","tooltip","mouseenter")}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("popoverTemplatePopup",function(){return{restrict:"EA",replace:!0,scope:{title:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"template/popover/popover-template.html"}}).directive("popoverTemplate",["$tooltip",function(a){return a("popoverTemplate","popover","click",{useContentExp:!0})}]).directive("popoverPopup",function(){return{restrict:"EA",replace:!0,scope:{title:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html"}}).directive("popover",["$tooltip",function(a){return a("popover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("progressConfig",{animate:!0,max:100}).controller("ProgressController",["$scope","$attrs","progressConfig",function(a,b,c){var d=this,e=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=angular.isDefined(a.max)?a.max:c.max,this.addBar=function(b,c){e||c.css({transition:"none"}),this.bars.push(b),b.max=a.max,b.$watch("value",function(){b.recalculatePercentage()}),b.recalculatePercentage=function(){b.percent=+(100*b.value/b.max).toFixed(2)},b.$on("$destroy",function(){c=null,d.removeBar(b)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1)},a.$watch("max",function(){d.bars.forEach(function(b){b.max=a.max,b.recalculatePercentage()})})}]).directive("progress",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",require:"progress",scope:{max:"=?"},templateUrl:"template/progressbar/progress.html"}}).directive("bar",function(){return{restrict:"EA",replace:!0,transclude:!0,require:"^progress",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b)}}}).directive("progressbar",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",scope:{value:"=",max:"=?",type:"@"},templateUrl:"template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]))}}}),angular.module("ui.bootstrap.rating",[]).constant("ratingConfig",{max:5,stateOn:null,stateOff:null}).controller("RatingController",["$scope","$attrs","ratingConfig",function(a,b,c){var d={$setViewValue:angular.noop};this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff;var f=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(f)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff},a[b]);return a},a.rate=function(b){!a.readonly&&b>=0&&b<=a.range.length&&(d.$setViewValue(d.$viewValue===b?0:b),d.$render())},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue}}]).directive("rating",function(){return{restrict:"EA",require:["rating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"RatingController",templateUrl:"template/rating/rating.html",replace:!0,link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("TabsetController",["$scope",function(a){var b=this,c=b.tabs=a.tabs=[];b.select=function(a){angular.forEach(c,function(b){b.active&&b!==a&&(b.active=!1,b.onDeselect())}),a.active=!0,a.onSelect()},b.addTab=function(a){c.push(a),1===c.length&&a.active!==!1?a.active=!0:a.active?b.select(a):a.active=!1},b.removeTab=function(a){var e=c.indexOf(a);if(a.active&&c.length>1&&!d){var f=e==c.length-1?e-1:e+1;b.select(c[f])}c.splice(e,1)};var d;a.$on("$destroy",function(){d=!0})}]).directive("tabset",function(){return{restrict:"EA",transclude:!0,replace:!0,scope:{type:"@"},controller:"TabsetController",templateUrl:"template/tabs/tabset.html",link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.justified=angular.isDefined(c.justified)?a.$parent.$eval(c.justified):!1}}}).directive("tab",["$parse","$log",function(a,b){return{require:"^tabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},compile:function(c,d,e){return function(c,d,f,g){c.$watch("active",function(a){a&&g.select(c)}),c.disabled=!1,f.disable&&c.$parent.$watch(a(f.disable),function(a){c.disabled=!!a}),f.disabled&&(b.warn('Use of "disabled" attribute has been deprecated, please use "disable"'),c.$parent.$watch(a(f.disabled),function(a){c.disabled=!!a})),c.select=function(){c.disabled||(c.active=!0)},g.addTab(c),c.$on("$destroy",function(){g.removeTab(c)}),c.$transcludeFn=e}}}}]).directive("tabHeadingTransclude",[function(){return{restrict:"A",require:"^tab",link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}]).directive("tabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("tab-heading")||a.hasAttribute("data-tab-heading")||"tab-heading"===a.tagName.toLowerCase()||"data-tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^tabset",link:function(b,c,d){var e=b.$eval(d.tabContentTransclude);e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("timepickerConfig",{hourStep:1,minuteStep:1,showMeridian:!0,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0}).controller("TimepickerController",["$scope","$attrs","$parse","$log","$locale","timepickerConfig",function(a,b,c,d,e,f){function g(){var b=parseInt(a.hours,10),c=a.showMeridian?b>0&&13>b:b>=0&&24>b;return c?(a.showMeridian&&(12===b&&(b=0),a.meridian===p[1]&&(b+=12)),b):void 0}function h(){var b=parseInt(a.minutes,10);return b>=0&&60>b?b:void 0}function i(a){return angular.isDefined(a)&&a.toString().length<2?"0"+a:a.toString()}function j(a){k(),o.$setViewValue(new Date(n)),l(a)}function k(){o.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1}function l(b){var c=n.getHours(),d=n.getMinutes();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:i(c),"m"!==b&&(a.minutes=i(d)),a.meridian=n.getHours()<12?p[0]:p[1]}function m(a){var b=new Date(n.getTime()+6e4*a);n.setHours(b.getHours(),b.getMinutes()),j()}var n=new Date,o={$setViewValue:angular.noop},p=angular.isDefined(b.meridians)?a.$parent.$eval(b.meridians):f.meridians||e.DATETIME_FORMATS.AMPMS;this.init=function(c,d){o=c,o.$render=this.render,o.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),g=d.eq(1),h=angular.isDefined(b.mousewheel)?a.$parent.$eval(b.mousewheel):f.mousewheel;h&&this.setupMousewheelEvents(e,g);var i=angular.isDefined(b.arrowkeys)?a.$parent.$eval(b.arrowkeys):f.arrowkeys;i&&this.setupArrowkeyEvents(e,g),a.readonlyInput=angular.isDefined(b.readonlyInput)?a.$parent.$eval(b.readonlyInput):f.readonlyInput,this.setupInputEvents(e,g)};var q=f.hourStep;b.hourStep&&a.$parent.$watch(c(b.hourStep),function(a){q=parseInt(a,10)});var r=f.minuteStep;b.minuteStep&&a.$parent.$watch(c(b.minuteStep),function(a){r=parseInt(a,10)}),a.showMeridian=f.showMeridian,b.showMeridian&&a.$parent.$watch(c(b.showMeridian),function(b){if(a.showMeridian=!!b,o.$error.time){var c=g(),d=h();angular.isDefined(c)&&angular.isDefined(d)&&(n.setHours(c),j())}else l()}),this.setupMousewheelEvents=function(b,c){var d=function(a){a.originalEvent&&(a=a.originalEvent);var b=a.wheelDelta?a.wheelDelta:-a.deltaY;return a.detail||b>0};b.bind("mousewheel wheel",function(b){a.$apply(d(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.bind("mousewheel wheel",function(b){a.$apply(d(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()})},this.setupArrowkeyEvents=function(b,c){b.bind("keydown",function(b){38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply())}),c.bind("keydown",function(b){38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply())})},this.setupInputEvents=function(b,c){if(a.readonlyInput)return a.updateHours=angular.noop,void(a.updateMinutes=angular.noop);var d=function(b,c){o.$setViewValue(null),o.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c)};a.updateHours=function(){var a=g();angular.isDefined(a)?(n.setHours(a),j("h")):d(!0)},b.bind("blur",function(){!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=i(a.hours)})}),a.updateMinutes=function(){var a=h();angular.isDefined(a)?(n.setMinutes(a),j("m")):d(void 0,!0)},c.bind("blur",function(){!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=i(a.minutes)})})},this.render=function(){var a=o.$viewValue;isNaN(a)?(o.$setValidity("time",!1),d.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(a&&(n=a),k(),l())},a.showSpinners=angular.isDefined(b.showSpinners)?a.$parent.$eval(b.showSpinners):f.showSpinners,a.incrementHours=function(){m(60*q)},a.decrementHours=function(){m(60*-q)},a.incrementMinutes=function(){m(r)},a.decrementMinutes=function(){m(-r)},a.toggleMeridian=function(){m(720*(n.getHours()<12?1:-1))}}]).directive("timepicker",function(){return{restrict:"EA",require:["timepicker","?^ngModel"],controller:"TimepickerController",replace:!0,scope:{},templateUrl:"template/timepicker/timepicker.html",link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}),angular.module("ui.bootstrap.transition",[]).value("$transitionSuppressDeprecated",!1).factory("$transition",["$q","$timeout","$rootScope","$log","$transitionSuppressDeprecated",function(a,b,c,d,e){function f(a){for(var b in a)if(void 0!==h.style[b])return a[b]}e||d.warn("$transition is now deprecated. Use $animate from ngAnimate instead.");var g=function(d,e,f){f=f||{};var h=a.defer(),i=g[f.animation?"animationEndEventName":"transitionEndEventName"],j=function(){c.$apply(function(){d.unbind(i,j),h.resolve(d)})};return i&&d.bind(i,j),b(function(){angular.isString(e)?d.addClass(e):angular.isFunction(e)?e(d):angular.isObject(e)&&d.css(e),i||h.resolve(d)}),h.promise.cancel=function(){i&&d.unbind(i,j),h.reject("Transition cancelled")},h.promise},h=document.createElement("trans"),i={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},j={WebkitTransition:"webkitAnimationEnd",MozTransition:"animationend",OTransition:"oAnimationEnd",transition:"animationend"};return g.transitionEndEventName=f(i),g.animationEndEventName=f(j),g}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).factory("typeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).directive("typeahead",["$compile","$parse","$q","$timeout","$document","$window","$rootScope","$position","typeaheadParser",function(a,b,c,d,e,f,g,h,i){var j=[9,13,27,38,40],k=200;return{require:"ngModel",link:function(l,m,n,o){function p(){E.moveInProgress||(E.moveInProgress=!0,E.$digest()),K&&d.cancel(K),K=d(function(){E.matches.length&&q(),E.moveInProgress=!1,E.$digest()},k)}function q(){E.position=A?h.offset(m):h.position(m),E.position.top+=m.prop("offsetHeight")}var r=l.$eval(n.typeaheadMinLength);
r||0===r||(r=1);var s,t,u=l.$eval(n.typeaheadWaitMs)||0,v=l.$eval(n.typeaheadEditable)!==!1,w=b(n.typeaheadLoading).assign||angular.noop,x=b(n.typeaheadOnSelect),y=angular.isDefined(n.typeaheadSelectOnBlur)?l.$eval(n.typeaheadSelectOnBlur):!1,z=n.typeaheadInputFormatter?b(n.typeaheadInputFormatter):void 0,A=n.typeaheadAppendToBody?l.$eval(n.typeaheadAppendToBody):!1,B=l.$eval(n.typeaheadFocusFirst)!==!1,C=b(n.ngModel).assign,D=i.parse(n.typeahead),E=l.$new();l.$on("$destroy",function(){E.$destroy()});var F="typeahead-"+E.$id+"-"+Math.floor(1e4*Math.random());m.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":F});var G=angular.element("<div typeahead-popup></div>");G.attr({id:F,matches:"matches",active:"activeIdx",select:"select(activeIdx)","move-in-progress":"moveInProgress",query:"query",position:"position"}),angular.isDefined(n.typeaheadTemplateUrl)&&G.attr("template-url",n.typeaheadTemplateUrl);var H=function(){E.matches=[],E.activeIdx=-1,m.attr("aria-expanded",!1)},I=function(a){return F+"-option-"+a};E.$watch("activeIdx",function(a){0>a?m.removeAttr("aria-activedescendant"):m.attr("aria-activedescendant",I(a))});var J=function(a){var b={$viewValue:a};w(l,!0),c.when(D.source(l,b)).then(function(c){var d=a===o.$viewValue;if(d&&s)if(c&&c.length>0){E.activeIdx=B?0:-1,E.matches.length=0;for(var e=0;e<c.length;e++)b[D.itemName]=c[e],E.matches.push({id:I(e),label:D.viewMapper(E,b),model:c[e]});E.query=a,q(),m.attr("aria-expanded",!0)}else H();d&&w(l,!1)},function(){H(),w(l,!1)})};A&&(angular.element(f).bind("resize",p),e.find("body").bind("scroll",p));var K;E.moveInProgress=!1,H(),E.query=void 0;var L,M=function(a){L=d(function(){J(a)},u)},N=function(){L&&d.cancel(L)};o.$parsers.unshift(function(a){return s=!0,0===r||a&&a.length>=r?u>0?(N(),M(a)):J(a):(w(l,!1),N(),H()),v?a:a?void o.$setValidity("editable",!1):(o.$setValidity("editable",!0),a)}),o.$formatters.push(function(a){var b,c,d={};return v||o.$setValidity("editable",!0),z?(d.$model=a,z(l,d)):(d[D.itemName]=a,b=D.viewMapper(l,d),d[D.itemName]=void 0,c=D.viewMapper(l,d),b!==c?b:a)}),E.select=function(a){var b,c,e={};t=!0,e[D.itemName]=c=E.matches[a].model,b=D.modelMapper(l,e),C(l,b),o.$setValidity("editable",!0),o.$setValidity("parse",!0),x(l,{$item:c,$model:b,$label:D.viewMapper(l,e)}),H(),d(function(){m[0].focus()},0,!1)},m.bind("keydown",function(a){if(0!==E.matches.length&&-1!==j.indexOf(a.which)&&(-1!==E.activeIdx||13!==a.which)){if(-1===E.activeIdx&&9===a.which)return H(),void E.$digest();a.preventDefault(),40===a.which?(E.activeIdx=(E.activeIdx+1)%E.matches.length,E.$digest()):38===a.which?(E.activeIdx=(E.activeIdx>0?E.activeIdx:E.matches.length)-1,E.$digest()):13===a.which||9===a.which?E.$apply(function(){E.select(E.activeIdx)}):27===a.which&&(a.stopPropagation(),H(),E.$digest())}}),m.bind("blur",function(){y&&E.matches.length&&-1!==E.activeIdx&&!t&&(t=!0,E.$apply(function(){E.select(E.activeIdx)})),s=!1,t=!1});var O=function(a){m[0]!==a.target&&3!==a.which&&(H(),g.$$phase||E.$digest())};e.bind("click",O),l.$on("$destroy",function(){e.unbind("click",O),A&&P.remove(),G.remove()});var P=a(G)(E);A?e.find("body").append(P):m.after(P)}}}]).directive("typeaheadPopup",function(){return{restrict:"EA",scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&"},replace:!0,templateUrl:"template/typeahead/typeahead-popup.html",link:function(a,b,c){a.templateUrl=c.templateUrl,a.isOpen=function(){return a.matches.length>0},a.isActive=function(b){return a.active==b},a.selectActive=function(b){a.active=b},a.selectMatch=function(b){a.select({activeIdx:b})}}}}).directive("typeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{restrict:"EA",scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"template/typeahead/typeahead-match.html";a(g).then(function(a){b(a.trim())(d,function(a){e.replaceWith(a)})})}}}]).filter("typeaheadHighlight",function(){function a(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(b,c){return c?(""+b).replace(new RegExp(a(c),"gi"),"<strong>$&</strong>"):b}}),!angular.$$csp()&&angular.element(document).find("head").prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>'),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.bindHtml","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.dropdown","ui.bootstrap.modal","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.transition","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["template/accordion/accordion-group.html","template/accordion/accordion.html","template/alert/alert.html","template/carousel/carousel.html","template/carousel/slide.html","template/datepicker/datepicker.html","template/datepicker/day.html","template/datepicker/month.html","template/datepicker/popup.html","template/datepicker/year.html","template/modal/backdrop.html","template/modal/window.html","template/pagination/pager.html","template/pagination/pagination.html","template/tooltip/tooltip-html-popup.html","template/tooltip/tooltip-html-unsafe-popup.html","template/tooltip/tooltip-popup.html","template/tooltip/tooltip-template-popup.html","template/popover/popover-template.html","template/popover/popover.html","template/progressbar/bar.html","template/progressbar/progress.html","template/progressbar/progressbar.html","template/rating/rating.html","template/tabs/tab.html","template/tabs/tabset.html","template/timepicker/timepicker.html","template/typeahead/typeahead-match.html","template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("collapse",["$animate",function(a){return{link:function(b,c,d){function e(){c.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),a.addClass(c,"in",{to:{height:c[0].scrollHeight+"px"}}).then(f)}function f(){c.removeClass("collapsing"),c.css({height:"auto"})}function g(){return c.hasClass("collapse")||c.hasClass("in")?(c.css({height:c[0].scrollHeight+"px"}).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),void a.removeClass(c,"in",{to:{height:"0"}}).then(h)):h()}function h(){c.css({height:"0"}),c.removeClass("collapsing"),c.addClass("collapse")}b.$watch(d.collapse,function(a){a?g():e()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("accordionConfig",{closeOthers:!0}).controller("AccordionController",["$scope","$attrs","accordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("accordion",function(){return{restrict:"EA",controller:"AccordionController",transclude:!0,replace:!1,templateUrl:"template/accordion/accordion.html"}}).directive("accordionGroup",function(){return{require:"^accordion",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/accordion/accordion-group.html",scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){d.addGroup(a),a.$watch("isOpen",function(b){b&&d.closeOthers(a)}),a.toggleOpen=function(){a.isDisabled||(a.isOpen=!a.isOpen)}}}}).directive("accordionHeading",function(){return{restrict:"EA",transclude:!0,template:"",replace:!0,require:"^accordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("accordionTransclude",function(){return{require:"^accordionGroup",link:function(a,b,c,d){a.$watch(function(){return d[c.accordionTransclude]},function(a){a&&(b.html(""),b.append(a))})}}}),angular.module("ui.bootstrap.alert",[]).controller("AlertController",["$scope","$attrs",function(a,b){a.closeable=!!b.close,this.close=a.close}]).directive("alert",function(){return{restrict:"EA",controller:"AlertController",templateUrl:"template/alert/alert.html",transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}).directive("dismissOnTimeout",["$timeout",function(a){return{require:"alert",link:function(b,c,d,e){a(function(){e.close()},parseInt(d.dismissOnTimeout,10))}}}]),angular.module("ui.bootstrap.bindHtml",[]).value("$bindHtmlUnsafeSuppressDeprecated",!1).directive("bindHtmlUnsafe",["$log","$bindHtmlUnsafeSuppressDeprecated",function(a,b){return function(c,d,e){b||a.warn("bindHtmlUnsafe is now deprecated. Use ngBindHtml instead"),d.addClass("ng-binding").data("$binding",e.bindHtmlUnsafe),c.$watch(e.bindHtmlUnsafe,function(a){d.html(a||"")})}}]),angular.module("ui.bootstrap.buttons",[]).constant("buttonConfig",{activeClass:"active",toggleEvent:"click"}).controller("ButtonsController",["buttonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("btnRadio",function(){return{require:["btnRadio","ngModel"],controller:"ButtonsController",link:function(a,b,c,d){var e=d[0],f=d[1];f.$render=function(){b.toggleClass(e.activeClass,angular.equals(f.$modelValue,a.$eval(c.btnRadio)))},b.bind(e.toggleEvent,function(){var d=b.hasClass(e.activeClass);(!d||angular.isDefined(c.uncheckable))&&a.$apply(function(){f.$setViewValue(d?null:a.$eval(c.btnRadio)),f.$render()})})}}}).directive("btnCheckbox",function(){return{require:["btnCheckbox","ngModel"],controller:"ButtonsController",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){var d=a.$eval(b);return angular.isDefined(d)?d:c}var h=d[0],i=d[1];i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.bind(h.toggleEvent,function(){a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("CarouselController",["$scope","$element","$interval","$animate",function(a,b,c,d){function e(b,c,e){q||(angular.extend(b,{direction:e,active:!0}),angular.extend(l.currentSlide||{},{direction:e,active:!1}),d.enabled()&&!a.noTransition&&!a.$currentTransition&&b.$element&&(b.$element.data(o,b.direction),a.$currentTransition=!0,b.$element.one("$animate:close",function(){a.$currentTransition=null})),l.currentSlide=b,p=c,g())}function f(a){if(angular.isUndefined(m[a].index))return m[a];var b;for(m.length,b=0;b<m.length;++b)if(m[b].index==a)return m[b]}function g(){h();var b=+a.interval;!isNaN(b)&&b>0&&(j=c(i,b))}function h(){j&&(c.cancel(j),j=null)}function i(){var b=+a.interval;k&&!isNaN(b)&&b>0&&m.length?a.next():a.pause()}var j,k,l=this,m=l.slides=a.slides=[],n="uib-noTransition",o="uib-slideDirection",p=-1;l.currentSlide=null;var q=!1;l.select=a.select=function(b,c){var d=l.indexOfSlide(b);void 0===c&&(c=d>l.getCurrentIndex()?"next":"prev"),b&&b!==l.currentSlide&&!a.$currentTransition&&e(b,d,c)},a.$on("$destroy",function(){q=!0}),l.getCurrentIndex=function(){return l.currentSlide&&angular.isDefined(l.currentSlide.index)?+l.currentSlide.index:p},l.indexOfSlide=function(a){return angular.isDefined(a.index)?+a.index:m.indexOf(a)},a.next=function(){var b=(l.getCurrentIndex()+1)%m.length;return 0===b&&a.noWrap()?void a.pause():l.select(f(b),"next")},a.prev=function(){var b=l.getCurrentIndex()-1<0?m.length-1:l.getCurrentIndex()-1;return a.noWrap()&&b===m.length-1?void a.pause():l.select(f(b),"prev")},a.isActive=function(a){return l.currentSlide===a},a.$watch("interval",g),a.$on("$destroy",h),a.play=function(){k||(k=!0,g())},a.pause=function(){a.noPause||(k=!1,h())},l.addSlide=function(b,c){b.$element=c,m.push(b),1===m.length||b.active?(l.select(m[m.length-1]),1==m.length&&a.play()):b.active=!1},l.removeSlide=function(a){angular.isDefined(a.index)&&m.sort(function(a,b){return+a.index>+b.index});var b=m.indexOf(a);m.splice(b,1),m.length>0&&a.active?l.select(b>=m.length?m[b-1]:m[b]):p>b&&p--},a.$watch("noTransition",function(a){b.data(n,a)})}]).directive("carousel",[function(){return{restrict:"EA",transclude:!0,replace:!0,controller:"CarouselController",require:"carousel",templateUrl:"template/carousel/carousel.html",scope:{interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}]).directive("slide",function(){return{require:"^carousel",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/carousel/slide.html",scope:{active:"=?",index:"=?"},link:function(a,b,c,d){d.addSlide(a,b),a.$on("$destroy",function(){d.removeSlide(a)}),a.$watch("active",function(b){b&&d.select(a)})}}}).animation(".item",["$animate",function(a){var b="uib-noTransition",c="uib-slideDirection";return{beforeAddClass:function(d,e,f){if("active"==e&&d.parent()&&!d.parent().data(b)){var g=!1,h=d.data(c),i="next"==h?"left":"right";return d.addClass(h),a.addClass(d,i).then(function(){g||d.removeClass(i+" "+h),f()}),function(){g=!0}}f()},beforeRemoveClass:function(d,e,f){if("active"==e&&d.parent()&&!d.parent().data(b)){var g=!1,h=d.data(c),i="next"==h?"left":"right";return a.addClass(d,i).then(function(){g||d.removeClass(i),f()}),function(){g=!0}}f()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("dateParser",["$locale","orderByFilter",function(a,b){function c(a){var c=[],d=a.split("");return angular.forEach(f,function(b,e){var f=a.indexOf(e);if(f>-1){a=a.split(""),d[f]="("+b.regex+")",a[f]="$";for(var g=f+1,h=f+e.length;h>g;g++)d[g]="",a[g]="$";a=a.join(""),c.push({index:f,apply:b.apply})}}),{regex:new RegExp("^"+d.join("")+"$"),map:b(c,"index")}}function d(a,b,c){return 1>c?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}var e=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.parsers={};var f={yyyy:{regex:"\\d{4}",apply:function(a){this.year=+a}},yy:{regex:"\\d{2}",apply:function(a){this.year=+a+2e3}},y:{regex:"\\d{1,4}",apply:function(a){this.year=+a}},MMMM:{regex:a.DATETIME_FORMATS.MONTH.join("|"),apply:function(b){this.month=a.DATETIME_FORMATS.MONTH.indexOf(b)}},MMM:{regex:a.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(b){this.month=a.DATETIME_FORMATS.SHORTMONTH.indexOf(b)}},MM:{regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1}},M:{regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1}},dd:{regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a}},d:{regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a}},EEEE:{regex:a.DATETIME_FORMATS.DAY.join("|")},EEE:{regex:a.DATETIME_FORMATS.SHORTDAY.join("|")},HH:{regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a}},H:{regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a}},mm:{regex:"[0-5][0-9]",apply:function(a){this.minutes=+a}},m:{regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a}},sss:{regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a}},ss:{regex:"[0-5][0-9]",apply:function(a){this.seconds=+a}},s:{regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a}}};this.parse=function(b,f,g){if(!angular.isString(b)||!f)return b;f=a.DATETIME_FORMATS[f]||f,f=f.replace(e,"\\$&"),this.parsers[f]||(this.parsers[f]=c(f));var h=this.parsers[f],i=h.regex,j=h.map,k=b.match(i);if(k&&k.length){var l,m;l=g?{year:g.getFullYear(),month:g.getMonth(),date:g.getDate(),hours:g.getHours(),minutes:g.getMinutes(),seconds:g.getSeconds(),milliseconds:g.getMilliseconds()}:{year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0};for(var n=1,o=k.length;o>n;n++){var p=j[n-1];p.apply&&p.apply.call(l,k[n])}return d(l.year,l.month,l.date)&&(m=new Date(l.year,l.month,l.date,l.hours,l.minutes,l.seconds,l.milliseconds||0)),m}}}]),angular.module("ui.bootstrap.position",[]).factory("$position",["$document","$window",function(a,b){function c(a,c){return a.currentStyle?a.currentStyle[c]:b.getComputedStyle?b.getComputedStyle(a)[c]:a.style[c]}function d(a){return"static"===(c(a,"position")||"static")}var e=function(b){for(var c=a[0],e=b.offsetParent||c;e&&e!==c&&d(e);)e=e.offsetParent;return e||c};return{position:function(b){var c=this.offset(b),d={top:0,left:0},f=e(b[0]);f!=a[0]&&(d=this.offset(angular.element(f)),d.top+=f.clientTop-f.scrollTop,d.left+=f.clientLeft-f.scrollLeft);var g=b[0].getBoundingClientRect();return{width:g.width||b.prop("offsetWidth"),height:g.height||b.prop("offsetHeight"),top:c.top-d.top,left:c.left-d.left}},offset:function(c){var d=c[0].getBoundingClientRect();return{width:d.width||c.prop("offsetWidth"),height:d.height||c.prop("offsetHeight"),top:d.top+(b.pageYOffset||a[0].documentElement.scrollTop),left:d.left+(b.pageXOffset||a[0].documentElement.scrollLeft)}},positionElements:function(a,b,c,d){var e,f,g,h,i=c.split("-"),j=i[0],k=i[1]||"center";e=d?this.offset(a):this.position(a),f=b.prop("offsetWidth"),g=b.prop("offsetHeight");var l={center:function(){return e.left+e.width/2-f/2},left:function(){return e.left},right:function(){return e.left+e.width}},m={center:function(){return e.top+e.height/2-g/2},top:function(){return e.top},bottom:function(){return e.top+e.height}};switch(j){case"right":h={top:m[k](),left:l[j]()};break;case"left":h={top:m[k](),left:e.left-f};break;case"bottom":h={top:m[j](),left:l[k]()};break;default:h={top:e.top-g,left:l[k]()}}return h}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.position"]).constant("datepickerConfig",{formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",datepickerMode:"day",minMode:"day",maxMode:"year",showWeeks:!0,startingDay:0,yearRange:20,minDate:null,maxDate:null,shortcutPropagation:!1}).controller("DatepickerController",["$scope","$attrs","$parse","$interpolate","$log","dateFilter","datepickerConfig",function(a,b,c,d,e,f,g){var h=this,i={$setViewValue:angular.noop};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","minMode","maxMode","showWeeks","startingDay","yearRange","shortcutPropagation"],function(c,e){h[c]=angular.isDefined(b[c])?8>e?d(b[c])(a.$parent):a.$parent.$eval(b[c]):g[c]}),angular.forEach(["minDate","maxDate"],function(d){b[d]?a.$parent.$watch(c(b[d]),function(a){h[d]=a?new Date(a):null,h.refreshView()}):h[d]=g[d]?new Date(g[d]):null}),a.datepickerMode=a.datepickerMode||g.datepickerMode,a.maxMode=h.maxMode,a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),angular.isDefined(b.initDate)?(this.activeDate=a.$parent.$eval(b.initDate)||new Date,a.$parent.$watch(b.initDate,function(a){a&&(i.$isEmpty(i.$modelValue)||i.$invalid)&&(h.activeDate=a,h.refreshView())})):this.activeDate=new Date,a.isActive=function(b){return 0===h.compare(b.date,h.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(a){i=a,i.$render=function(){h.render()}},this.render=function(){if(i.$viewValue){var a=new Date(i.$viewValue),b=!isNaN(a);b?this.activeDate=a:e.error('Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.'),i.$setValidity("date",b)}this.refreshView()},this.refreshView=function(){if(this.element){this._refreshView();var a=i.$viewValue?new Date(i.$viewValue):null;i.$setValidity("date-disabled",!a||this.element&&!this.isDisabled(a))}},this.createDateObject=function(a,b){var c=i.$viewValue?new Date(i.$viewValue):null;return{date:a,label:f(a,b),selected:c&&0===this.compare(a,c),disabled:this.isDisabled(a),current:0===this.compare(a,new Date),customClass:this.customClass(a)}},this.isDisabled=function(c){return this.minDate&&this.compare(c,this.minDate)<0||this.maxDate&&this.compare(c,this.maxDate)>0||b.dateDisabled&&a.dateDisabled({date:c,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},this.fixTimeZone=function(a){var b=a.getHours();a.setHours(23===b?b+2:0)},a.select=function(b){if(a.datepickerMode===h.minMode){var c=i.$viewValue?new Date(i.$viewValue):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),i.$setViewValue(c),i.$render()}else h.activeDate=b,a.datepickerMode=h.modes[h.modes.indexOf(a.datepickerMode)-1]},a.move=function(a){var b=h.activeDate.getFullYear()+a*(h.step.years||0),c=h.activeDate.getMonth()+a*(h.step.months||0);h.activeDate.setFullYear(b,c,1),h.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===h.maxMode&&1===b||a.datepickerMode===h.minMode&&-1===b||(a.datepickerMode=h.modes[h.modes.indexOf(a.datepickerMode)+b])},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var j=function(){h.element[0].focus()};a.$on("datepicker.focus",j),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey)if(b.preventDefault(),h.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(h.isDisabled(h.activeDate))return;a.select(h.activeDate),j()}else!b.ctrlKey||"up"!==c&&"down"!==c?(h.handleKeyDown(c,b),h.refreshView()):(a.toggleMode("up"===c?1:-1),j())}}]).directive("datepicker",function(){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/datepicker.html",scope:{datepickerMode:"=?",dateDisabled:"&",customClass:"&",shortcutPropagation:"&?"},require:["datepicker","?^ngModel"],controller:"DatepickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f)}}}).directive("daypicker",["dateFilter",function(a){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/day.html",require:"^datepicker",link:function(b,c,d,e){function f(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?i[b]:29}function g(a,b){for(var c,d=new Array(b),f=new Date(a),g=0;b>g;)c=new Date(f),e.fixTimeZone(c),d[g++]=c,f.setDate(f.getDate()+1);return d}function h(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}b.showWeeks=e.showWeeks,e.step={months:1},e.element=c;var i=[31,28,31,30,31,30,31,31,30,31,30,31];e._refreshView=function(){var c=e.activeDate.getFullYear(),d=e.activeDate.getMonth(),f=new Date(c,d,1),i=e.startingDay-f.getDay(),j=i>0?7-i:-i,k=new Date(f);j>0&&k.setDate(-j+1);for(var l=g(k,42),m=0;42>m;m++)l[m]=angular.extend(e.createDateObject(l[m],e.formatDay),{secondary:l[m].getMonth()!==d,uid:b.uniqueId+"-"+m});b.labels=new Array(7);for(var n=0;7>n;n++)b.labels[n]={abbr:a(l[n].date,e.formatDayHeader),full:a(l[n].date,"EEEE")};if(b.title=a(e.activeDate,e.formatDayTitle),b.rows=e.split(l,7),b.showWeeks){b.weekNumbers=[];for(var o=(11-e.startingDay)%7,p=b.rows.length,q=0;p>q;q++)b.weekNumbers.push(h(b.rows[q][o].date))}},e.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},e.handleKeyDown=function(a){var b=e.activeDate.getDate();if("left"===a)b-=1;else if("up"===a)b-=7;else if("right"===a)b+=1;else if("down"===a)b+=7;else if("pageup"===a||"pagedown"===a){var c=e.activeDate.getMonth()+("pageup"===a?-1:1);e.activeDate.setMonth(c,1),b=Math.min(f(e.activeDate.getFullYear(),e.activeDate.getMonth()),b)}else"home"===a?b=1:"end"===a&&(b=f(e.activeDate.getFullYear(),e.activeDate.getMonth()));e.activeDate.setDate(b)},e.refreshView()}}}]).directive("monthpicker",["dateFilter",function(a){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/month.html",require:"^datepicker",link:function(b,c,d,e){e.step={years:1},e.element=c,e._refreshView=function(){for(var c,d=new Array(12),f=e.activeDate.getFullYear(),g=0;12>g;g++)c=new Date(f,g,1),e.fixTimeZone(c),d[g]=angular.extend(e.createDateObject(c,e.formatMonth),{uid:b.uniqueId+"-"+g});b.title=a(e.activeDate,e.formatMonthTitle),b.rows=e.split(d,3)},e.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth())-new Date(b.getFullYear(),b.getMonth())},e.handleKeyDown=function(a){var b=e.activeDate.getMonth();if("left"===a)b-=1;else if("up"===a)b-=3;else if("right"===a)b+=1;else if("down"===a)b+=3;else if("pageup"===a||"pagedown"===a){var c=e.activeDate.getFullYear()+("pageup"===a?-1:1);e.activeDate.setFullYear(c)}else"home"===a?b=0:"end"===a&&(b=11);e.activeDate.setMonth(b)},e.refreshView()}}}]).directive("yearpicker",["dateFilter",function(){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/year.html",require:"^datepicker",link:function(a,b,c,d){function e(a){return parseInt((a-1)/f,10)*f+1}var f=d.yearRange;d.step={years:f},d.element=b,d._refreshView=function(){for(var b,c=new Array(f),g=0,h=e(d.activeDate.getFullYear());f>g;g++)b=new Date(h+g,0,1),d.fixTimeZone(b),c[g]=angular.extend(d.createDateObject(b,d.formatYear),{uid:a.uniqueId+"-"+g});a.title=[c[0].label,c[f-1].label].join(" - "),a.rows=d.split(c,5)},d.compare=function(a,b){return a.getFullYear()-b.getFullYear()},d.handleKeyDown=function(a){var b=d.activeDate.getFullYear();"left"===a?b-=1:"up"===a?b-=5:"right"===a?b+=1:"down"===a?b+=5:"pageup"===a||"pagedown"===a?b+=("pageup"===a?-1:1)*d.step.years:"home"===a?b=e(d.activeDate.getFullYear()):"end"===a&&(b=e(d.activeDate.getFullYear())+f-1),d.activeDate.setFullYear(b)},d.refreshView()}}}]).constant("datepickerPopupConfig",{datepickerPopup:"yyyy-MM-dd",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},currentText:"Today",clearText:"Clear",closeText:"Done",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0}).directive("datepickerPopup",["$compile","$parse","$document","$position","dateFilter","dateParser","datepickerPopupConfig","$timeout",function(a,b,c,d,e,f,g,h){return{restrict:"EA",require:"ngModel",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&",customClass:"&"},link:function(i,j,k,l){function m(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function n(a){if(angular.isNumber(a)&&(a=new Date(a)),a){if(angular.isDate(a)&&!isNaN(a))return a;if(angular.isString(a)){var b=f.parse(a,p,i.date)||new Date(a);return isNaN(b)?void 0:b}return void 0}return null}function o(a,b){var c=a||b;if(angular.isNumber(c)&&(c=new Date(c)),c){if(angular.isDate(c)&&!isNaN(c))return!0;if(angular.isString(c)){var d=f.parse(c,p)||new Date(c);return!isNaN(d)}return!1}return!0}var p,q=angular.isDefined(k.closeOnDateSelection)?i.$parent.$eval(k.closeOnDateSelection):g.closeOnDateSelection,r=angular.isDefined(k.datepickerAppendToBody)?i.$parent.$eval(k.datepickerAppendToBody):g.appendToBody;i.showButtonBar=angular.isDefined(k.showButtonBar)?i.$parent.$eval(k.showButtonBar):g.showButtonBar,i.getText=function(a){return i[a+"Text"]||g[a+"Text"]};var s=!1;if(g.html5Types[k.type]?(p=g.html5Types[k.type],s=!0):(p=k.datepickerPopup||g.datepickerPopup,k.$observe("datepickerPopup",function(a){var b=a||g.datepickerPopup;if(b!==p&&(p=b,l.$modelValue=null,!p))throw new Error("datepickerPopup must have a date format specified.")})),!p)throw new Error("datepickerPopup must have a date format specified.");if(s&&k.datepickerPopup)throw new Error("HTML5 date input types do not support custom formats.");var t=angular.element("<div datepicker-popup-wrap><div datepicker></div></div>");t.attr({"ng-model":"date","ng-change":"dateSelection(date)"});var u=angular.element(t.children()[0]);if(s&&"month"==k.type&&(u.attr("datepicker-mode",'"month"'),u.attr("min-mode","month")),k.datepickerOptions){var v=i.$parent.$eval(k.datepickerOptions);v.initDate&&(i.initDate=v.initDate,u.attr("init-date","initDate"),delete v.initDate),angular.forEach(v,function(a,b){u.attr(m(b),a)})}i.watchData={},angular.forEach(["minDate","maxDate","datepickerMode","initDate","shortcutPropagation"],function(a){if(k[a]){var c=b(k[a]);if(i.$parent.$watch(c,function(b){i.watchData[a]=b}),u.attr(m(a),"watchData."+a),"datepickerMode"===a){var d=c.assign;i.$watch("watchData."+a,function(a,b){angular.isFunction(d)&&a!==b&&d(i.$parent,a)})}}}),k.dateDisabled&&u.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),k.showWeeks&&u.attr("show-weeks",k.showWeeks),k.customClass&&u.attr("custom-class","customClass({ date: date, mode: mode })"),s?l.$formatters.push(function(a){return i.date=a,a}):(l.$$parserName="date",l.$validators.date=o,l.$parsers.unshift(n),l.$formatters.push(function(a){return i.date=a,l.$isEmpty(a)?a:e(a,p)})),i.dateSelection=function(a){angular.isDefined(a)&&(i.date=a);var b=i.date?e(i.date,p):"";j.val(b),l.$setViewValue(b),q&&(i.isOpen=!1,j[0].focus())},l.$viewChangeListeners.push(function(){i.date=f.parse(l.$viewValue,p,i.date)||new Date(l.$viewValue)});var w=function(a){i.isOpen&&a.target!==j[0]&&i.$apply(function(){i.isOpen=!1})},x=function(a){27===a.which&&i.isOpen?(a.preventDefault(),a.stopPropagation(),i.$apply(function(){i.isOpen=!1}),j[0].focus()):40!==a.which||i.isOpen||(a.preventDefault(),a.stopPropagation(),i.$apply(function(){i.isOpen=!0}))};j.bind("keydown",x),i.keydown=function(a){27===a.which&&(i.isOpen=!1,j[0].focus())},i.$watch("isOpen",function(a){a?(i.position=r?d.offset(j):d.position(j),i.position.top=i.position.top+j.prop("offsetHeight"),c.bind("click",w),h(function(){i.$broadcast("datepicker.focus")},0,!1)):c.unbind("click",w)}),i.select=function(a){if("today"===a){var b=new Date;angular.isDate(i.date)?(a=new Date(i.date),a.setFullYear(b.getFullYear(),b.getMonth(),b.getDate())):a=new Date(b.setHours(0,0,0,0))}i.dateSelection(a)},i.close=function(){i.isOpen=!1,j[0].focus()};var y=a(t)(i);t.remove(),r?c.find("body").append(y):j.after(y),i.$on("$destroy",function(){i.isOpen===!0&&i.$apply(function(){i.isOpen=!1}),y.remove(),j.unbind("keydown",x),c.unbind("click",w)})}}}]).directive("datepickerPopupWrap",function(){return{restrict:"EA",replace:!0,transclude:!0,templateUrl:"template/datepicker/popup.html"}}),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("dropdownConfig",{openClass:"open"}).service("dropdownService",["$document","$rootScope",function(a,b){var c=null;this.open=function(b){c||(a.bind("click",d),a.bind("keydown",e)),c&&c!==b&&(c.isOpen=!1),c=b},this.close=function(b){c===b&&(c=null,a.unbind("click",d),a.unbind("keydown",e))};var d=function(a){if(c&&(!a||"disabled"!==c.getAutoClose())){var d=c.getToggleElement();if(!(a&&d&&d[0].contains(a.target))){var e=c.getDropdownElement();a&&"outsideClick"===c.getAutoClose()&&e&&e[0].contains(a.target)||(c.isOpen=!1,b.$$phase||c.$apply())}}},e=function(a){27===a.which?(c.focusToggleElement(),d()):c.isKeynavEnabled()&&/(38|40)/.test(a.which)&&c.isOpen&&(a.preventDefault(),a.stopPropagation(),c.focusDropdownEntry(a.which))}}]).controller("DropdownController",["$scope","$attrs","$parse","dropdownConfig","dropdownService","$animate","$position","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j){var k,l,m=this,n=a.$new(),o=d.openClass,p=angular.noop,q=b.onToggle?c(b.onToggle):angular.noop,r=!1,s=!1;this.init=function(d){m.$element=d,b.isOpen&&(l=c(b.isOpen),p=l.assign,a.$watch(l,function(a){n.isOpen=!!a})),r=angular.isDefined(b.dropdownAppendToBody),s=angular.isDefined(b.keyboardNav),r&&m.dropdownMenu&&(h.find("body").append(m.dropdownMenu),d.on("$destroy",function(){m.dropdownMenu.remove()}))},this.toggle=function(a){return n.isOpen=arguments.length?!!a:!n.isOpen},this.isOpen=function(){return n.isOpen},n.getToggleElement=function(){return m.toggleElement},n.getAutoClose=function(){return b.autoClose||"always"},n.getElement=function(){return m.$element},n.isKeynavEnabled=function(){return s},n.focusDropdownEntry=function(a){var b=m.dropdownMenu?angular.element(m.dropdownMenu).find("a"):angular.element(m.$element).find("ul").eq(0).find("a");switch(a){case 40:m.selectedOption=angular.isNumber(m.selectedOption)?m.selectedOption===b.length-1?m.selectedOption:m.selectedOption+1:0;
......
angular.module('templates-prod', ['components/auth/login.html', 'components/crud/templates/add.html', 'components/crud/templates/edit.html', 'components/crud/templates/list.html', 'components/crud/templates/show.html', 'components/dashboard/dashboard.html', 'components/personelinfo/personelinfo.html', 'components/staff/templates/add.html', 'components/staff/templates/edit.html', 'components/staff/templates/list.html', 'components/staff/templates/show.html', 'components/student/student_add_template.html', 'components/student/student_list_template.html', 'components/types/types_template.html', 'shared/templates/add.html', 'shared/templates/datefield.html', 'shared/templates/directives/chat.html', 'shared/templates/directives/header-notification.html', 'shared/templates/directives/header-sub-menu-buttons.html', 'shared/templates/directives/header-sub-menu.html', 'shared/templates/directives/notifications.html', 'shared/templates/directives/sidebar-search.html', 'shared/templates/directives/sidebar.html', 'shared/templates/directives/stats.html', 'shared/templates/directives/timeline.html', 'shared/templates/fieldset.html', 'shared/templates/foreignKey.html', 'shared/templates/linkedModelModalContent.html', 'shared/templates/listnodeModalContent.html', 'shared/templates/modalContent.html']);
angular.module('templates-prod', ['components/auth/login.html', 'components/crud/templates/add.html', 'components/crud/templates/edit.html', 'components/crud/templates/list.html', 'components/crud/templates/show.html', 'components/dashboard/dashboard.html', 'components/personelinfo/personelinfo.html', 'components/staff/templates/add.html', 'components/staff/templates/edit.html', 'components/staff/templates/list.html', 'components/staff/templates/show.html', 'components/student/student_add_template.html', 'components/student/student_list_template.html', 'components/types/types_template.html', 'shared/templates/add.html', 'shared/templates/datefield.html', 'shared/templates/directives/chat.html', 'shared/templates/directives/header-breadcrumb.html', 'shared/templates/directives/header-notification.html', 'shared/templates/directives/header-sub-menu.html', 'shared/templates/directives/notifications.html', 'shared/templates/directives/sidebar-search.html', 'shared/templates/directives/sidebar.html', 'shared/templates/directives/stats.html', 'shared/templates/directives/timeline.html', 'shared/templates/fieldset.html', 'shared/templates/foreignKey.html', 'shared/templates/linkedModelModalContent.html', 'shared/templates/listnodeModalContent.html', 'shared/templates/modalContent.html', 'shared/templates/nodeTable.html']);
angular.module("components/auth/login.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("components/auth/login.html",
......@@ -43,7 +43,12 @@ angular.module("components/crud/templates/list.html", []).run(["$templateCache",
" <table class=\"table table-bordered\" style=\"background-color:#fff;\">\n" +
" <thead>\n" +
" <tr>\n" +
" <th colspan=\"2\">#</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 objects[0].data\">{{ key }}</th>\n" +
" <th>action</th>\n" +
" </tr>\n" +
......@@ -58,12 +63,29 @@ angular.module("components/crud/templates/list.html", []).run(["$templateCache",
" <th scope=\"row\" style=\"text-align:center\">1</th>\n" +
" <td ng-repeat=\"(key,value) in object.data\">{{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=\"#/{{model}}/edit/{{object.key}}\">Edit</a><br>\n" +
" <a ng-href=\"#/{{model}}/{{object.key}}\">Show</a>\n" +
" </td>\n" +
" </tr>\n" +
" </tbody>\n" +
" </table>\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" +
"\n" +
" <hr>\n" +
"\n" +
"</div>");
}]);
......@@ -439,44 +461,32 @@ angular.module("shared/templates/add.html", []).run(["$templateCache", function(
$templateCache.put("shared/templates/add.html",
"<h1>{{ schema.title }}</h1>\n" +
"<form id=\"formgenerated\" name=\"formgenerated\" sf-schema=\"schema\" sf-form=\"form\" sf-model=\"model\"></form>\n" +
"<div ng-repeat=\"node in listnodes\">\n" +
"<div ng-repeat=\"node in Node\">\n" +
" <h3>{{ node.title }}\n" +
" <span ng-if=\"node.lengthModels < 1\">\n" +
" <a href=\"javascript:void(0);\" modal-for-nodes=\"{{node.title}},Node\">\n" +
" <i class=\"fa fa-plus-circle fa-fw\"></i>\n" +
" </a>\n" +
" </span>\n" +
" </h3>\n" +
" <ng-include src=\"'shared/templates/nodeTable.html'\" ng-if=\"node.lengthModels > 0\"></ng-include>\n" +
" <hr>\n" +
"</div>\n" +
"<div ng-repeat=\"node in ListNode\">\n" +
" <h3>{{ node.title }}\n" +
" <span>\n" +
" <a href=\"javascript:void(0);\" add-modal-for-list-node={{node.title}}>\n" +
" <a href=\"javascript:void(0);\" modal-for-nodes=\"{{node.title}},ListNode\">\n" +
" <i class=\"fa fa-plus-circle fa-fw\"></i>\n" +
" </a>\n" +
" </span>\n" +
" </h3>\n" +
" <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>action</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 ng-repeat=\"(key,value) in node.models\">{{ value.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" +
" </td>\n" +
" </tr>\n" +
" </tbody>\n" +
" </table>\n" +
" <ng-include src=\"'shared/templates/nodeTable.html'\" ng-if=\"node.lengthModels > 0\"></ng-include>\n" +
" <hr>\n" +
"</div>\n" +
"\n" +
"<button id=\"submitbutton\" type=\"button\" class=\"btn btn-primary\" ng-click=\"onSubmit(formgenerated)\">Kaydet</button>\n" +
"<button type=\"button\" class=\"btn btn-warning\">Düzenle</button> <!-- todo: make it conditional -->\n" +
"<button type=\"button\" class=\"btn btn-danger\">İptal</button> <!-- todo: turn back to previous page -->");
"<!-- <button type=\"button\" class=\"btn btn-warning\">Düzenle</button> todo: make it conditional -->\n" +
"<!-- <button type=\"button\" class=\"btn btn-danger\">İptal</button> todo: turn back to previous page -->");
}]);
angular.module("shared/templates/datefield.html", []).run(["$templateCache", function($templateCache) {
......@@ -687,6 +697,16 @@ angular.module("shared/templates/directives/chat.html", []).run(["$templateCache
"</div>");
}]);
angular.module("shared/templates/directives/header-breadcrumb.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("shared/templates/directives/header-breadcrumb.html",
"<ul class=\"breadcrumb\">\n" +
" <li ng-repeat=\"link in links\" ng-class=\"{'active':$last}\">\n" +
" <a href=\"#\" ng-if=\"!$last\">{{link}}</a>\n" +
" <span ng-if=\"$last\">{{link}}</span>\n" +
" </li>\n" +
"</ul>");
}]);
angular.module("shared/templates/directives/header-notification.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("shared/templates/directives/header-notification.html",
"<ul class=\"nav navbar-top-links navbar-right\">\n" +
......@@ -885,13 +905,12 @@ angular.module("shared/templates/directives/header-notification.html", []).run([
" <i class=\"fa fa-user fa-fw\"></i> <i class=\"fa fa-caret-down\"></i>\n" +
" </a>\n" +
" <ul class=\"dropdown-menu dropdown-user\">\n" +
" <li><a href=\"#\"><i class=\"fa fa-user fa-fw\"></i> User Profile</a>\n" +
" <li><a href=\"#\"><i class=\"fa fa-user fa-fw\"></i> Profil</a>\n" +
" </li>\n" +
" <li><a href=\"#\"><i class=\"fa fa-gear fa-fw\"></i> Settings</a>\n" +
" <li><a href=\"#\"><i class=\"fa fa-gear fa-fw\"></i> Ayarlar</a>\n" +
" </li>\n" +
" <li><a href=\"http://www.strapui.com/\"><i class=\"fa fa-eye fa-fw\"></i> Premium Angular Themes</a></li>\n" +
" <li class=\"divider\"></li>\n" +
" <li><a ui-sref=\"login\" href=\"javascript:void(0);\" logout><i class=\"fa fa-sign-out fa-fw\"></i> Logout</a>\n" +
" <li><a ui-sref=\"login\" href=\"javascript:void(0);\" logout><i class=\"fa fa-sign-out fa-fw\"></i> Çıkış</a>\n" +
" </li>\n" +
" </ul>\n" +
" <!-- /.dropdown-user -->\n" +
......@@ -902,26 +921,14 @@ angular.module("shared/templates/directives/header-notification.html", []).run([
"");
}]);
angular.module("shared/templates/directives/header-sub-menu-buttons.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("shared/templates/directives/header-sub-menu-buttons.html",
"<button type=\"button\" class=\"btn btn-primary\" ng-click=\"onSubmit(formgenerated)\">Kaydet</button>\n" +
"<button type=\"button\" class=\"btn btn-warning\">Düzenle</button>\n" +
"<button type=\"button\" class=\"btn btn-danger\">İptal</button>");
}]);
angular.module("shared/templates/directives/header-sub-menu.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("shared/templates/directives/header-sub-menu.html",
"<div class=\"manager-view-header container-fluid\">\n" +
" <ul class=\"breadcrumb\">\n" +
" <li><a href=\"#\">Personeller</a></li>\n" +
" <li><a href=\"#\">Liste</a></li>\n" +
" <li class=\"active\">Tablo</li>\n" +
" </ul>\n" +
" <!--<header-sub-menu-buttons></header-sub-menu-buttons>-->\n" +
" <header-breadcrumb></header-breadcrumb>\n" +
" <div id=\"header-buttons\">\n" +
" <button type=\"button\" class=\"btn btn-primary\" ng-click=\"triggerSubmit()\">Kaydet</button>\n" +
" <button type=\"button\" class=\"btn btn-warning\">Düzenle</button>\n" +
" <button type=\"button\" class=\"btn btn-danger\">İptal</button>\n" +
" <!--<button type=\"button\" class=\"btn btn-warning\">Düzenle</button>-->\n" +
" <!--<button type=\"button\" class=\"btn btn-danger\">İptal</button>-->\n" +
" </div>\n" +
"</div>");
}]);
......@@ -1003,10 +1010,10 @@ angular.module("shared/templates/directives/sidebar.html", []).run(["$templateCa
" class=\"fa arrow\"></span></a>\n" +
" <ul class=\"nav nav-second-level\" collapse=\"collapseVar!={{key}}\">\n" +
" <li ui-sref-active=\"active\">\n" +
" <a href=\"#/crud/{{item}}\">List</a>\n" +
" <a href=\"#/{{item}}\">List</a>\n" +
" </li>\n" +
" <li ui-sref-active=\"active\">\n" +
" <a href=\"#/crud/{{item}}/add\">Add</a>\n" +
" <a href=\"#/{{item}}/add\">Add</a>\n" +
" </li>\n" +
" </ul>\n" +
" <!-- /.nav-second-level -->\n" +
......@@ -1189,7 +1196,7 @@ angular.module("shared/templates/foreignKey.html", []).run(["$templateCache", fu
" <div class=\"help-block\" sf-message=\"form.description\"></div>\n" +
" </div>\n" +
" <div class=\"col-md-4\">\n" +
" <a href=\"javascript:void(0);\" add-modal>\n" +
" <a href=\"javascript:void(0);\" add-modal-for-linked-model>\n" +
" <i class=\"fa fa-plus-circle fa-fw\"></i>\n" +
" </a>\n" +
" </div>\n" +
......@@ -1224,3 +1231,32 @@ angular.module("shared/templates/modalContent.html", []).run(["$templateCache",
$templateCache.put("shared/templates/modalContent.html",
"");
}]);
angular.module("shared/templates/nodeTable.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("shared/templates/nodeTable.html",
"<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>action</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 ng-repeat=\"(key,value) in node.models\">{{ value.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" +
" </td>\n" +
" </tr>\n" +
" </tbody>\n" +
"</table>");
}]);
......@@ -72,6 +72,7 @@
<!-- @if NODE_ENV == 'DEVELOPMENT' -->
<script src="bower_components/angular/angular.min.js"></script>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="bower_components/angular-route/angular-route.min.js"></script>
<script src="bower_components/angular-cookies/angular-cookies.min.js"></script>
<script src="bower_components/angular-resource/angular-resource.min.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