1. Luciano Ramalho
  2. lilcouch

Commits

Luciano Ramalho  committed bb1c12f

created index page; removed commented code from map functions

  • Participants
  • Parent commits 8efd58e
  • Branches default

Comments (0)

Files changed (4)

File lilacs/_attachments/index.html

View file
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>LILACS CouchApp</title>
+    <link rel="stylesheet" href="main.css" type="text/css">
+  </head>
+  <body>
+    <h1>LILACS CouchApp</h1>
+
+    <div id="links">
+      <dl>
+        <dt>Countries</dt>
+           <dd>JSON dump: <a href="_view/countries?reduce=false">map</a> <a href="_view/countries?group=true">reduce</a></dd>
+        <dt>Institutions</dt>
+           <dd>JSON dump: <a href="_view/affiliation?reduce=false">map</a> <a href="_view/affiliation?group=true">reduce</a></dd>
+        <dt>Tests</dt>
+           <dd><a href="tests.html">QUnit tests</a> for field and subfield access</dd>
+      </dl>
+      
+    </div>
+
+</html>

File lilacs/_attachments/main.css

View file
+/* add styles here */
+
+body {
+  font:1em Helvetica, sans-serif;
+  padding:4px;
+}
+
+h1 {
+  margin-top:0;
+}
+
+#account {
+  float:right;
+}
+
+#profile {
+  border:4px solid #edd;
+  background:#fee;
+  padding:8px;
+  margin-bottom:8px;
+}
+
+#items {
+  border:4px solid #dde;
+  background:#eef;
+  padding:8px;
+  width:60%;
+  float:left;
+}
+
+#sidebar {
+  border:4px solid #dfd;
+  padding:8px;
+  float:right;
+  width:30%;
+}
+
+#items li {
+  border:4px solid #f5f5ff;
+  background:#fff;
+  padding:8px;
+  margin:4px 0;
+}
+
+form {
+  padding:4px;
+  margin:6px;
+  background-color:#ddd;  
+}
+
+div.avatar {
+  padding:2px;
+  padding-bottom:0;
+  margin-right:4px;
+  float:left;
+  font-size:0.78em;
+  width : 60px;
+  height : 60px;
+  text-align: center;
+}
+
+div.avatar .name {
+  padding-top:2px;
+}
+
+div.avatar img {
+  margin:0 auto;
+  padding:0;
+  width : 40px;
+  height : 40px;
+}
+
+#items ul {
+  list-style: none;
+}

File lilacs/views/affiliation/map.js

View file
     var i, occurs = getallsub(doc, 10, 1, '??');
 
     for (i=0; i<occurs.length; i++) {
-        emit(occurs[i], 1);
+        emit(occurs[i].trim(), 1);
     }
-
-    // before using getallsub.js, the body of this function was:
-    /*
-    var occur, subf;
-    if (doc.hasOwnProperty('10')) {
-        for (occur=0; occur<doc['10'].length; occur++) {
-            for (subf=0; subf<doc['10'][occur].length; subf++) {
-                if (doc['10'][occur][subf][0] === '1') {
-                    emit(doc['10'][occur][subf][1], 1);
-                    break;
-                }
-            }
-        }
-    } else {
-        emit('??', 1);
-    }
-    */
-
-    /* however, there is a difference in the treatment of missing values
-
-    $ diff aff aff2
-    6c6
-    < {"key":"??","value":81},
-    ---
-    > {"key":"??","value":2},
-
-    */
 }

File lilacs/views/countries/map.js

View file
     // !code vendor/isisdm_t2/_attachments/get.js
 
     emit(get(doc, 67, '??'), 1);
-
-    // before using get.js, the body of this function was:
-
-    /* if (doc.hasOwnProperty('67')) {
-        emit(doc['67'][0][0][1], 1);
-    } else {
-        emit('??', 1);
-    }
-    */
 }