split database name in own file and variable
authorDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 19 Nov 2010 17:18:44 +0000 (18:18 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 19 Nov 2010 17:18:44 +0000 (18:18 +0100)
public/angular
public/app/conference/database.js [new file with mode: 0644]
public/app/conference/registration.html
public/app/conference/registration.js
public/app/conference/symposiums.html
public/app/conference/symposiums.js

index 5f0af2c..9b53b25 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 5f0af2cd0e76e641927e06b5a2a80fdc6cfdf365
+Subproject commit 9b53b25f15d8c1e28b7bda6331d4a26b54025ccd
diff --git a/public/app/conference/database.js b/public/app/conference/database.js
new file mode 100644 (file)
index 0000000..140a082
--- /dev/null
@@ -0,0 +1 @@
+var database='conference';
index 801bfa4..0ef7967 100644 (file)
@@ -6,6 +6,7 @@
 
 <title>Conference registration</title>
 
+<script src="database.js"></script>
 <script src="registration.js"></script>
 
 <style type="text/css">
index 1551a95..488b129 100644 (file)
@@ -14,10 +14,11 @@ function Registration($resource,$xhr){
                },
                symposium: { organizers: [ {name:'', surname:'', inst:'', email:'' } ], work_nr: 1 }
        };
-       this.Registration = $resource( '/data/conference/Registration/:id', { id:'' } );
+       this.Registration = $resource( '/data/:database/Registration/:id', { id:'', database: database } );
        this.reset();
        this.$watch('$location.hashPath', this.hash_change);
        this.$xhr = $xhr;
+       console.debug( 'database', database );
 }
 Registration.$inject=['$resource','$xhr'];
 
index 2be88a4..ff5f18c 100644 (file)
@@ -4,13 +4,20 @@
 <meta charset="utf-8">
 <script src="angular.js" ng:autobind></script>
 
-<title>Conference registration</title>
+<script type="text/javascript" src="database.js"></script> 
 <script type="text/javascript" src="symposiums.js"></script> 
 
+<title>Conference registration</title>
+
+</head>
+<body>
+
 <div ng:controller="Symposiums"> 
 
+<h1>Submitted symposiums</h1>
+
 <div ng:repeat="s in data.response.rows">
-<h1 ng:show="s.key[1] == 1">{{s.key[0]}}</h1>
+<h2 ng:show="s.key[1] == 1">{{s.key[0]}}</h2>
 {{s.key[1]}}. {{s.value}}
 </div>
 
@@ -21,6 +28,7 @@ data={{data}}
 
 </div> 
 
+<a href="registration.html">registration</a>
 
 </body>
 </html>
index 3713664..b89510e 100644 (file)
@@ -10,7 +10,7 @@ function Symposiums(xhr, route){
        this.data = data;
 
        this.xhr("JSON"
-               , "/conference/_design/symposium/_view/work_nr%2Ctitle?callback=JSON_CALLBACK"
+               , "/"+database+"/_design/symposium/_view/work_nr%2Ctitle?callback=JSON_CALLBACK"
                , function(code, response){ 
                        console.log(code, response, data);
                        data.response = response;