Skip to content

Instantly share code, notes, and snippets.

@ppillip
Created November 22, 2013 05:43
Show Gist options
  • Save ppillip/7595386 to your computer and use it in GitHub Desktop.
Save ppillip/7595386 to your computer and use it in GitHub Desktop.
제 헤더입니다.
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta http-equiv='cache-control' content='no-cache'>
<title>한국지역난방공사</title>
<link rel="stylesheet" href="/kdweb/lib/bootstrap/css/common.css" type="text/css"/>
<script src="/kdweb/lib/requestParameters.js"></script>
<script src="/kdweb/lib/jquery-1.10.2.min.js"></script>
<script src="/kdweb/lib/bootstrap/js/bootstrap.js"></script>
<script src="/kdweb/lib/Highcharts-3.0.4/js/highcharts.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular-animate.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular-route.min.js"></script>
<script src="./helper/helpers.js"></script>
<script src="./filter/filters.js"></script>
<script src="./directive/directives.js"></script>
<script src="./directive/ui-bootstrap-custom-0.6.0.js"></script>
<script src="./directive/ui-bootstrap-custom-tpls-0.6.0.js"></script>
<script src="./service/project.js"></script>
<script src="./helper/menuData.js"></script><!--메뉴데이터-->
<script src="TopMenuCtrl.js"></script><!--탑메뉴컨트롤러-->
<script src="LeftMenuCtrl.js"></script><!--왼쪽메뉴-->
<script src="TestCtrl.js"></script><!--테스트-->
<script src="LoadStandardCtrl.js"></script>
<script src="EstimateHeatLoadCtrl.js"></script>
<script>
angular.module('directive',[]).directive('contenteditable', directives.contentEditable );
app = angular.module('KDHEC', ['ngRoute','ui.bootstrap']);
app.config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) {
//뒷쪽라인에 -View 지켜야함 그래야 서버에서 다시 뒤로 보내줌
console.log("app.config");
var menu = getMenuData("KDHEC");
console.log( helpers.requestParameters._id );
// index.html 을 호출하거나 마땅한 값이 없이 호출 할때
$routeProvider.otherwise({
redirectTo : '/kdweb/estimate/EstimateHeatLoad-View/'+helpers.requestParameters._id
/*redirectTo : '/kdweb/estimate/LoadStandard-View/'+helpers.requestParameters._id*/
});
menu.menus.forEach(function(obj,idx){
obj.subMenus.forEach(function(obj,idx){
$routeProvider
.when('/kdweb/estimate/'+obj.action +'/:id', {
templateUrl: '/kdweb/estimate/' + obj.link
});
});
});
$locationProvider.html5Mode(true);
}]);
app.filter('orderObjectBy', filters.orderObjectBy);
app.factory('project',['$http',project]);
//초기셋팅
app.run(['$http', '$rootScope','project' , function($http, $rootScope , project) {
console.log("app.run");
$rootScope.dataStore = {
project : {}
,user : {}
,menu : {}
,project_id : helpers.requestParameters._id
};
//초기데이터 셋팅합니다.
project.getProject(helpers.requestParameters._id,function(data,stat){
$rootScope.dataStore.project = data.row;
if(!$rootScope.dataStore.project.loadStandard){
console.log("부하기준로딩");
project.getMasterLoadStdValues(function(data,stat){
$rootScope.dataStore.project.loadStandard = data.row.data;
});
}
});
$rootScope.dataStore.menu = getMenuData("KDHEC");
$rootScope.$on("$routeChangeStart", function (event, next, current) {
//console.log(next);
});
}]);
app.controller('LeftMenuCtrl', ['$rootScope' , '$scope' , '$filter' , LeftMenuCtrl]);
app.controller('TopMenuCtrl', ['$rootScope' , '$scope' , '$filter' , TopMenuCtrl]);
app.controller('TestCtrl', ['$rootScope' , '$scope' , '$filter' , TestCtrl]);
app.controller('LoadStandardCtrl', [ '$rootScope' , '$scope' ,'$http', '$filter' , 'project' , LoadStandardCtrl]);
//document.location.href = "/kdweb/estimate/LoadStandard-View/acf9b8de-444e-401a-b6ca-1e75570d69e5";
</script>
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment