Project

General

Profile

« Previous | Next » 

Revision 52744

Initial commit of production portal folder

View differences:

modules/uoa-services-portal/trunk/services/cache/mecache/package.json
4 4
  "description": "Caching in memory",
5 5
  "main": "cache.js",
6 6
  "scripts": {
7
    "start": "PORT=3000 node cache.js"
7
    "start": "PORT=3200 node cache.js"
8 8
  },
9 9
  "dependencies": {
10 10
    "cors": "^2.8.4",
modules/uoa-services-portal/trunk/services/cache/mecache/cache.js
30 30
}
31 31

  
32 32

  
33
app.get('/get',cache(10), cors(), (req, res) => {
33
app.get('/get',cache(20), cors(), (req, res) => {
34 34
  setTimeout(() => {
35 35
    const url = (req.query)?req.query.url:null;
36 36
    if (!url){
37
        res.status(404).send('Not Found'); //not found
37
        res.status(404).send(getResponse(404,"Not Found " +url)) //not found
38 38

  
39 39
    }else{
40 40
     request.get(url, function (err, response) {
......
43 43
       res.header("Access-Control-Allow-Methods", "GET,  OPTIONS");
44 44
       res.header("Access-Control-Allow-Methods", "GET,  OPTIONS");
45 45
       res.header("Content-Type","application/json");
46
          if (!response && err){
47
            res.status(500).send(getResponse(500,"An error occured for " +url))
48
            return;
49
          }
46 50

  
47
          if (err) throw err;
48
          res.send(response.body);
51
          res.status(response.status).send(response.body);
49 52
    })
50 53
  }
51 54
})
52 55
});
53 56

  
54 57
app.use((req, res) => {
55
  res.status(404).send('Not Found') //not found
58
  res.status(404).send(getResponse(404,"Not Found " +url)) //not found
56 59
})
57 60

  
58
app.listen(process.env.PORT, function () {
61
app.listen((process.env.PORT)?process.env.PORT:3000, function () {
59 62
  console.log(`Example app listening on port ${process.env.PORT}!`)
60 63
})
64

  
65
function getResponse(code, message){
66
  var response ={};
67
  response["code"]=code;
68
  response["message"]=message;
69
  return response;
70

  
71
}
modules/uoa-services-portal/trunk/services/cache/mecache/npm-debug.log
9 9
8 verbose lifecycle memcache-cache@1.0.0~start: unsafe-perm in lifecycle true
10 10
9 verbose lifecycle memcache-cache@1.0.0~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/home/argirok/projects/openaire/uoa-services-portal/trunk/services/cache/mecache/node_modules/.bin:/home/argirok/bin:/home/argirok/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin
11 11
10 verbose lifecycle memcache-cache@1.0.0~start: CWD: /home/argirok/projects/openaire/uoa-services-portal/trunk/services/cache/mecache
12
11 silly lifecycle memcache-cache@1.0.0~start: Args: [ '-c', 'PORT=3000 node cache.js' ]
12
11 silly lifecycle memcache-cache@1.0.0~start: Args: [ '-c', 'PORT=3200 node cache.js' ]
13 13
12 silly lifecycle memcache-cache@1.0.0~start: Returned: code: 1  signal: null
14 14
13 info lifecycle memcache-cache@1.0.0~start: Failed to exec start script
15
14 verbose stack Error: memcache-cache@1.0.0 start: `PORT=3000 node cache.js`
15
14 verbose stack Error: memcache-cache@1.0.0 start: `PORT=3200 node cache.js`
16 16
14 verbose stack Exit status 1
17 17
14 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
18 18
14 verbose stack     at emitTwo (events.js:106:13)
......
24 24
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
25 25
15 verbose pkgid memcache-cache@1.0.0
26 26
16 verbose cwd /home/argirok/projects/openaire/uoa-services-portal/trunk/services/cache/mecache
27
17 error Linux 4.4.0-97-generic
27
17 error Linux 4.4.0-104-generic
28 28
18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
29 29
19 error node v7.6.0
30 30
20 error npm  v4.1.2
31 31
21 error code ELIFECYCLE
32
22 error memcache-cache@1.0.0 start: `PORT=3000 node cache.js`
32
22 error memcache-cache@1.0.0 start: `PORT=3200 node cache.js`
33 33
22 error Exit status 1
34
23 error Failed at the memcache-cache@1.0.0 start script 'PORT=3000 node cache.js'.
34
23 error Failed at the memcache-cache@1.0.0 start script 'PORT=3200 node cache.js'.
35 35
23 error Make sure you have the latest version of node.js and npm installed.
36 36
23 error If you do, this is most likely a problem with the memcache-cache package,
37 37
23 error not with npm itself.
38 38
23 error Tell the author that this fails on your system:
39
23 error     PORT=3000 node cache.js
39
23 error     PORT=3200 node cache.js
40 40
23 error You can get information on how to open an issue for this project with:
41 41
23 error     npm bugs memcache-cache
42 42
23 error Or if that isn't available, you can get their info via:
modules/uoa-services-portal/trunk/services/upload/uploadService.js
2 2
var bodyParser = require("body-parser");
3 3
var multer = require("multer");
4 4
var app = express();
5
var cors = require('cors')
6
app.use(cors());
5 7

  
6 8
app.use(bodyParser.json());
7 9
app.use(bodyParser.urlencoded({ extended: true }));
......
12 14
    next();
13 15
});
14 16

  
15
app.post("/upload", multer({dest: "./uploads/"}).array("uploads[]", 12), function(req, res) {
16
  var filepath = __dirname+"/"+req.files[0].path;
17
  console.info(req.files[0]);
18
  console.info("PAth:::::::"+filepath);
19

  
20
  // var responseData;
21
  // fs = require('fs')
22
  // fs.readFile(__dirname+"/"+req.files[0].path, 'utf8', function (err,data) {
23
  //   if (err) {
24
  //     responseData= "error";
25
  //      console.log(err);
26
  //   }
27
  //   console.log(data);
28
  //   responseData=data;
29
  // });
30
  // req.files[0].data=responseData;
31
  // res.send(req.files);
17
app.post("/upload", multer({dest: "/home/argirok/projects/openaire/uoa-services-portal/trunk/services/upload/uploads/"}).array("uploads[]", 12), function(req, res) {
18
  var filepath ="/"+req.files[0].path;
19
  console.log(req.files[0]);
20
  if (req.files[0].mimetype != 'text/csv') {
21
      console.error("No proper file type");
22
      res.status(500).send(getResponse(500,"No proper file type")) ;
23
  }else{
24
    //send file
32 25
    res.sendFile(filepath);
26
  }
33 27
  var fs = require('fs');
34 28
  fs.stat(filepath, function (err, stats) {
35 29
  console.log(stats);//here we got all information of file in stats variable
......
51 45
var server = app.listen(8000, function() {
52 46
    console.log("Listening on port %s...", server.address().port);
53 47
});
48
function getResponse(code, message){
49
  var response ={};
50
  response["code"]=code;
51
  response["message"]=message;
52
  return response;
53

  
54
}
modules/uoa-services-portal/trunk/services/upload/package.json
11 11
  "license": "ISC",
12 12
  "dependencies": {
13 13
    "body-parser": "^1.15.2",
14
    "cors": "^2.8.4",
14 15
    "express": "^4.14.0",
15 16
    "multer": "^1.1.0"
16 17
  }
modules/uoa-services-portal/trunk/sample-components/sampleComponent-2/package.json
38 38
    "@angular/platform-browser-dynamic": "2.0.0",
39 39
    "@angular/platform-server": "2.0.0",
40 40
    "@angular/router": "3.0.0",
41
    "angular2-express-engine": "~2.0.11",
41 42
    "angular2-platform-node": "~2.0.11",
42 43
    "angular2-universal": "~2.0.11",
43 44
    "angular2-universal-polyfills": "~2.0.11",
44
    "angular2-express-engine": "~2.0.11",
45 45
    "body-parser": "^1.15.2",
46 46
    "express": "^4.14.0",
47
    "jquery": "^3.1.1",
47 48
    "methods": "~1.1.2",
48 49
    "rxjs": "5.0.0-beta.12",
50
    "uikit": "^3.0.0-beta.18",
49 51
    "zone.js": "0.6.21"
50 52
  },
51 53
  "devDependencies": {
......
70 72
    "ts-loader": "^0.8.2",
71 73
    "ts-node": "^1.3.0",
72 74
    "typescript": "2.0.0",
73
    "webpack": "2.1.0-beta.22",
75
    "webpack": "^2.1.0-beta.22",
74 76
    "webpack-dev-middleware": "^1.6.1",
75 77
    "webpack-dev-server": "^2.1.0-beta.0",
76 78
    "webpack-merge": "^0.13.0"
modules/uoa-services-portal/trunk/sample-components/sampleComponent-2/webpack.config.ts
39 39
    __dirname: true,
40 40
    __filename: true,
41 41
    process: true,
42
    Buffer: false
42
    Buffer: false,
43
    fs: "empty",
44
    module: "empty",
45
    child_process: "empty",
46
    net: "empty",
47
    tls: "empty"
48

  
43 49
  }
44 50
};
45 51

  
......
83 89
    __dirname: true,
84 90
    __filename: true,
85 91
    process: true,
86
    Buffer: true
92
    Buffer: true,
93
    fs: "empty",
94
    module: "empty",
95
    child_process: "empty",
96
    net: "empty",
97
    tls: "empty"
98

  
87 99
  }
88 100
};
89 101

  
modules/uoa-services-portal/trunk/sample-components/sampleComponent-2/src/app/app.ts
1 1
import { Component } from '@angular/core';
2
// import UIkit from 'uikit';
3
// import Icons from 'uikit/dist/js/uikit-icons';
2 4

  
5

  
3 6
import 'rxjs/Rx';
4 7
@Component({
5 8
  selector: 'app',
......
39 42
export class App {
40 43

  
41 44
    constructor() {
45
      // loads the Icon plugin
46
          if(typeof document !== undefined) {
42 47

  
48
      // UIkit.use(Icons);
49
      //
50
      // // components can be called from the imported UIkit reference
51
      // UIkit.notification('Hello world.');
43 52
    }
53
    }
44 54

  
45 55
}
modules/uoa-services-portal/trunk/sample-components/sampleComponent-2/src/app/home/home.component.html
13 13
    </form>
14 14
  </div>
15 15
</div>
16

  
17
          <div class="citationDownloader ">
18

  
19
							<select class="select" id="citations" name="citeselect" [(ngModel)]="selectedStyle">
20
								<option *ngFor=" let  style of styles let i = index" [value]="style">{{style}}</option>
21
							</select>
22
							<div id="citation" class="box-content"></div>
23
						</div>
24
            {{citation}}
modules/uoa-services-portal/trunk/sample-components/sampleComponent-2/src/app/home/home.component.ts
2 2
import {Router} from '@angular/router';
3 3
import {Observable}       from 'rxjs/Observable';
4 4
import {Location} from '@angular/common';
5
declare var Cite:CiteType;
6
declare var fs:any;
7
declare var module:any;
8
declare var child_process:any;
9
declare var simpleSys:Function;
5 10

  
11
interface CiteType {
12
    set:Function;
13
    get:Function;
14
    setOptions:Function;
15
}
6 16
@Component({
7 17
    selector: 'home',
8 18
    templateUrl: 'home.component.html',
9 19
 })
10 20

  
11 21
export class HomeComponent {
12
  constructor ( private _router: Router, private location: Location) {}
13 22

  
14 23

  
24
  styles:string[]=["bibtex","chicago","ieee","science","apa","cell","harvard","mla","nature","acm"];
25
  selectedStyle:string = "bibtex";
26

  
27
  citation:string="";
28
  constructor ( private _router: Router, private location: Location) {
29
    // var fs = require('fs');
30
//     if(typeof document !== undefined) {
31
//     var citeproc = require("citeproc-js-node");
32
//
33
//     var sys = citeproc.simpleSys();
34
//     // Wherever your locale and style files are. None are included with the package.
35
//     var enUS = '<?xml version="1.0" encoding="utf-8"?> <locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0" xml:lang="en-US"> <info> <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights> <updated>2015-10-10T23:31:02+00:00</updated> </info> <style-options punctuation-in-quote="true"/> <date form="text"> <date-part name="month" suffix=" "/> <date-part name="day" suffix=", "/> <date-part name="year"/> </date> <date form="numeric"> <date-part name="month" form="numeric-leading-zeros" suffix="/"/> <date-part name="day" form="numeric-leading-zeros" suffix="/"/> <date-part name="year"/> </date> <terms> <term name="accessed">accessed</term> <term name="and">and</term> <term name="and others">and others</term> <term name="anonymous">anonymous</term> <term name="anonymous" form="short">anon.</term> <term name="at">at</term> <term name="available at">available at</term> <term name="by">by</term> <term name="circa">circa</term> <term name="circa" form="short">c.</term> <term name="cited">cited</term> <term name="edition"> <single>edition</single> <multiple>editions</multiple> </term> <term name="edition" form="short">ed.</term> <term name="et-al">et al.</term> <term name="forthcoming">forthcoming</term> <term name="from">from</term> <term name="ibid">ibid.</term> <term name="in">in</term> <term name="in press">in press</term> <term name="internet">internet</term> <term name="interview">interview</term> <term name="letter">letter</term> <term name="no date">no date</term> <term name="no date" form="short">n.d.</term> <term name="online">online</term> <term name="presented at">presented at the</term> <term name="reference"> <single>reference</single> <multiple>references</multiple> </term> <term name="reference" form="short"> <single>ref.</single> <multiple>refs.</multiple> </term> <term name="retrieved">retrieved</term> <term name="scale">scale</term> <term name="version">version</term> <!-- ANNO DOMINI; BEFORE CHRIST --> <term name="ad">AD</term> <term name="bc">BC</term> <!-- PUNCTUATION --> <term name="open-quote">“</term> <term name="close-quote">”</term> <term name="open-inner-quote">‘</term> <term name="close-inner-quote">’</term> <term name="page-range-delimiter">–</term> <!-- ORDINALS --> <term name="ordinal">th</term> <term name="ordinal-01">st</term> <term name="ordinal-02">nd</term> <term name="ordinal-03">rd</term> <term name="ordinal-11">th</term> <term name="ordinal-12">th</term> <term name="ordinal-13">th</term> <!-- LONG ORDINALS --> <term name="long-ordinal-01">first</term> <term name="long-ordinal-02">second</term> <term name="long-ordinal-03">third</term> <term name="long-ordinal-04">fourth</term> <term name="long-ordinal-05">fifth</term> <term name="long-ordinal-06">sixth</term> <term name="long-ordinal-07">seventh</term> <term name="long-ordinal-08">eighth</term> <term name="long-ordinal-09">ninth</term> <term name="long-ordinal-10">tenth</term> <!-- LONG LOCATOR FORMS --> <term name="book"> <single>book</single> <multiple>books</multiple> </term> <term name="chapter"> <single>chapter</single> <multiple>chapters</multiple> </term> <term name="column"> <single>column</single> <multiple>columns</multiple> </term> <term name="figure"> <single>figure</single> <multiple>figures</multiple> </term> <term name="folio"> <single>folio</single> <multiple>folios</multiple> </term> <term name="issue"> <single>number</single> <multiple>numbers</multiple> </term> <term name="line"> <single>line</single> <multiple>lines</multiple> </term> <term name="note"> <single>note</single> <multiple>notes</multiple> </term> <term name="opus"> <single>opus</single> <multiple>opera</multiple> </term> <term name="page"> <single>page</single> <multiple>pages</multiple> </term> <term name="number-of-pages"> <single>page</single> <multiple>pages</multiple> </term> <term name="paragraph"> <single>paragraph</single> <multiple>paragraphs</multiple> </term> <term name="part"> <single>part</single> <multiple>parts</multiple> </term> <term name="section"> <single>section</single> <multiple>sections</multiple> </term> <term name="sub verbo"> <single>sub verbo</single> <multiple>sub verbis</multiple> </term> <term name="verse"> <single>verse</single> <multiple>verses</multiple> </term> <term name="volume"> <single>volume</single> <multiple>volumes</multiple> </term> <!-- SHORT LOCATOR FORMS --> <term name="book" form="short"> <single>bk.</single> <multiple>bks.</multiple> </term> <term name="chapter" form="short"> <single>chap.</single> <multiple>chaps.</multiple> </term> <term name="column" form="short"> <single>col.</single> <multiple>cols.</multiple> </term> <term name="figure" form="short"> <single>fig.</single> <multiple>figs.</multiple> </term> <term name="folio" form="short"> <single>fol.</single> <multiple>fols.</multiple> </term> <term name="issue" form="short"> <single>no.</single> <multiple>nos.</multiple> </term> <term name="line" form="short"> <single>l.</single> <multiple>ll.</multiple> </term> <term name="note" form="short"> <single>n.</single> <multiple>nn.</multiple> </term> <term name="opus" form="short"> <single>op.</single> <multiple>opp.</multiple> </term> <term name="page" form="short"> <single>p.</single> <multiple>pp.</multiple> </term> <term name="number-of-pages" form="short"> <single>p.</single> <multiple>pp.</multiple> </term> <term name="paragraph" form="short"> <single>para.</single> <multiple>paras.</multiple> </term> <term name="part" form="short"> <single>pt.</single> <multiple>pts.</multiple> </term> <term name="section" form="short"> <single>sec.</single> <multiple>secs.</multiple> </term> <term name="sub verbo" form="short"> <single>s.v.</single> <multiple>s.vv.</multiple> </term> <term name="verse" form="short"> <single>v.</single> <multiple>vv.</multiple> </term> <term name="volume" form="short"> <single>vol.</single> <multiple>vols.</multiple> </term> <!-- SYMBOL LOCATOR FORMS --> <term name="paragraph" form="symbol"> <single>¶</single> <multiple>¶¶</multiple> </term> <term name="section" form="symbol"> <single>§</single> <multiple>§§</multiple> </term> <!-- LONG ROLE FORMS --> <term name="director"> <single>director</single> <multiple>directors</multiple> </term> <term name="editor"> <single>editor</single> <multiple>editors</multiple> </term> <term name="editorial-director"> <single>editor</single> <multiple>editors</multiple> </term> <term name="illustrator"> <single>illustrator</single> <multiple>illustrators</multiple> </term> <term name="translator"> <single>translator</single> <multiple>translators</multiple> </term> <term name="editortranslator"> <single>editor &amp; translator</single> <multiple>editors &amp; translators</multiple> </term> <!-- SHORT ROLE FORMS --> <term name="director" form="short"> <single>dir.</single> <multiple>dirs.</multiple> </term> <term name="editor" form="short"> <single>ed.</single> <multiple>eds.</multiple> </term> <term name="editorial-director" form="short"> <single>ed.</single> <multiple>eds.</multiple> </term> <term name="illustrator" form="short"> <single>ill.</single> <multiple>ills.</multiple> </term> <term name="translator" form="short"> <single>tran.</single> <multiple>trans.</multiple> </term> <term name="editortranslator" form="short"> <single>ed. &amp; tran.</single> <multiple>eds. &amp; trans.</multiple> </term> <!-- VERB ROLE FORMS --> <term name="container-author" form="verb">by</term> <term name="director" form="verb">directed by</term> <term name="editor" form="verb">edited by</term> <term name="editorial-director" form="verb">edited by</term> <term name="illustrator" form="verb">illustrated by</term> <term name="interviewer" form="verb">interview by</term> <term name="recipient" form="verb">to</term> <term name="reviewed-author" form="verb">by</term> <term name="translator" form="verb">translated by</term> <term name="editortranslator" form="verb">edited &amp; translated by</term> <!-- SHORT VERB ROLE FORMS --> <term name="director" form="verb-short">dir. by</term> <term name="editor" form="verb-short">ed. by</term> <term name="editorial-director" form="verb-short">ed. by</term> <term name="illustrator" form="verb-short">illus. by</term> <term name="translator" form="verb-short">trans. by</term> <term name="editortranslator" form="verb-short">ed. &amp; trans. by</term> <!-- LONG MONTH FORMS --> <term name="month-01">January</term> <term name="month-02">February</term> <term name="month-03">March</term> <term name="month-04">April</term> <term name="month-05">May</term> <term name="month-06">June</term> <term name="month-07">July</term> <term name="month-08">August</term> <term name="month-09">September</term> <term name="month-10">October</term> <term name="month-11">November</term> <term name="month-12">December</term> <!-- SHORT MONTH FORMS --> <term name="month-01" form="short">Jan.</term> <term name="month-02" form="short">Feb.</term> <term name="month-03" form="short">Mar.</term> <term name="month-04" form="short">Apr.</term> <term name="month-05" form="short">May</term> <term name="month-06" form="short">Jun.</term> <term name="month-07" form="short">Jul.</term> <term name="month-08" form="short">Aug.</term> <term name="month-09" form="short">Sep.</term> <term name="month-10" form="short">Oct.</term> <term name="month-11" form="short">Nov.</term> <term name="month-12" form="short">Dec.</term> <!-- SEASONS --> <term name="season-01">Spring</term> <term name="season-02">Summer</term> <term name="season-03">Autumn</term> <term name="season-04">Winter</term> </terms> </locale> ';//fs.readFileSync('../home/locales-en-US.xml', 'utf8');
36
//     sys.addLocale('en-US', enUS);
37
//     var styleString = '<?xml version="1.0" encoding="utf-8"?> <style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-US"> <info> <title>BibTeX generic citation style</title> <id>http://www.zotero.org/styles/bibtex</id> <link href="http://www.zotero.org/styles/bibtex" rel="self"/> <link href="http://www.bibtex.org/" rel="documentation"/> <author> <name>Markus Schaffner</name> </author> <contributor> <name>Richard Karnesky</name> <email>karnesky+zotero@gmail.com</email> <uri>http://arc.nucapt.northwestern.edu/Richard_Karnesky</uri> </contributor> <category citation-format="author-date"/> <category field="generic-base"/> <updated>2012-09-14T21:22:32+00:00</updated> <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights> </info> <macro name="zotero2bibtexType"> <choose> <if type="bill book graphic legal_case legislation motion_picture report song" match="any"> <text value="book"/> </if> <else-if type="chapter paper-conference" match="any"> <text value="inbook"/> </else-if> <else-if type="article article-journal article-magazine article-newspaper" match="any"> <text value="article"/> </else-if> <else-if type="thesis" match="any"> <text value="phdthesis"/> </else-if> <else-if type="manuscript" match="any"> <text value="unpublished"/> </else-if> <else-if type="paper-conference" match="any"> <text value="inproceedings"/> </else-if> <else-if type="report" match="any"> <text value="techreport"/> </else-if> <else> <text value="misc"/> </else> </choose> </macro> <macro name="citeKey"> <group delimiter="_"> <text macro="author-short" text-case="lowercase"/> <text macro="issued-year"/> </group> </macro> <macro name="author-short"> <names variable="author"> <name form="short" delimiter="_" delimiter-precedes-last="always"/> <substitute> <names variable="editor"/> <names variable="translator"/> <choose> <if type="bill book graphic legal_case legislation motion_picture report song" match="any"> <text variable="title" form="short"/> </if> <else> <text variable="title" form="short"/> </else> </choose> </substitute> </names> </macro> <macro name="issued-year"> <date variable="issued"> <date-part name="year"/> </date> </macro> <macro name="issued-month"> <date variable="issued"> <date-part name="month" form="short" strip-periods="true"/> </date> </macro> <macro name="author"> <names variable="author"> <name sort-separator=", " delimiter=" and " delimiter-precedes-last="always" name-as-sort-order="all"/> <label form="long" text-case="capitalize-first"/> </names> </macro> <macro name="editor-translator"> <names variable="editor translator" delimiter=", "> <name sort-separator=", " delimiter=" and " delimiter-precedes-last="always" name-as-sort-order="all"/> <label form="long" text-case="capitalize-first"/> </names> </macro> <macro name="title"> <text variable="title"/> </macro> <macro name="number"> <text variable="issue"/> <text variable="number"/> </macro> <macro name="container-title"> <choose> <if type="chapter paper-conference" match="any"> <text variable="container-title" prefix=" booktitle={" suffix="}"/> </if> <else> <text variable="container-title" prefix=" journal={" suffix="}"/> </else> </choose> </macro> <macro name="publisher"> <choose> <if type="thesis"> <text variable="publisher" prefix=" school={" suffix="}"/> </if> <else-if type="report"> <text variable="publisher" prefix=" institution={" suffix="}"/> </else-if> <else> <text variable="publisher" prefix=" publisher={" suffix="}"/> </else> </choose> </macro> <macro name="pages"> <text variable="page"/> </macro> <macro name="edition"> <text variable="edition"/> </macro> <citation et-al-min="10" et-al-use-first="10" disambiguate-add-year-suffix="true" disambiguate-add-names="false" disambiguate-add-givenname="false" collapse="year"> <sort> <key macro="author"/> <key variable="issued"/> </sort> <layout delimiter="_"> <text macro="citeKey"/> </layout> </citation> <bibliography hanging-indent="false" et-al-min="10" et-al-use-first="10"> <sort> <key macro="author"/> <key variable="issued"/> </sort> <layout> <text macro="zotero2bibtexType" prefix=" @"/> <group prefix="{" suffix="}" delimiter=", "> <text macro="citeKey"/> <text variable="publisher-place" prefix=" place={" suffix="}"/> <!--Fix This--> <text variable="chapter-number" prefix=" chapter={" suffix="}"/> <!--Fix This--> <text macro="edition" prefix=" edition={" suffix="}"/> <!--Is this in CSL? <text variable="type" prefix=" type={" suffix="}"/>--> <text variable="collection-title" prefix=" series={" suffix="}"/> <text macro="title" prefix=" title={" suffix="}"/> <text variable="volume" prefix=" volume={" suffix="}"/> <!--Not in CSL<text variable="rights" prefix=" rights={" suffix="}"/>--> <text variable="ISBN" prefix=" ISBN={" suffix="}"/> <text variable="ISSN" prefix=" ISSN={" suffix="}"/> <!--Not in CSL <text variable="LCCN" prefix=" callNumber={" suffix="}"/>--> <text variable="archive_location" prefix=" archiveLocation={" suffix="}"/> <text variable="URL" prefix=" url={" suffix="}"/> <text variable="DOI" prefix=" DOI={" suffix="}"/> <text variable="abstract" prefix=" abstractNote={" suffix="}"/> <text variable="note" prefix=" note={" suffix="}"/> <text macro="number" prefix=" number={" suffix="}"/> <text macro="container-title"/> <text macro="publisher"/> <text macro="author" prefix=" author={" suffix="}"/> <text macro="editor-translator" prefix=" editor={" suffix="}"/> <text macro="issued-year" prefix=" year={" suffix="}"/> <text macro="issued-month" prefix=" month={" suffix="}"/> <text macro="pages" prefix=" pages={" suffix="}"/> <text variable="collection-title" prefix=" collection={" suffix="}"/> </group> </layout> </bibliography> </style>';//fs.readFileSync('../home/bibtex.csl', 'utf8');
38
//     var engine = sys.newEngine(styleString, 'en-US', null);
39
//
40
//     var items = {"14058/RN9M5BF3":{"accessed":{"month":"9","year":"2010","day":"10"},"id":"14058/RN9M5BF3","author":[{"given":"Adel","family":"Hendaoui"},{"given":"Moez","family":"Limayem"},{"given":"Craig W.","family":"Thompson"}],"title":"3D Social Virtual Worlds: <i>Research Issues and Challenges</i>","type":"article-journal","versionNumber":6816},"14058/NSBERGDK":{"accessed":{"month":"9","year":"2010","day":"10"},"issued":{"month":"6","year":"2009"},"event-place":"Istanbul","type":"paper-conference","DOI":"10.1109/DEST.2009.5276761","page-first":"151","id":"14058/NSBERGDK","title-short":"3D virtual worlds as collaborative communities enriching human endeavours","publisher-place":"Istanbul","author":[{"given":"C.","family":"Dreher"},{"given":"T.","family":"Reiners"},{"given":"N.","family":"Dreher"},{"given":"H.","family":"Dreher"}],"title":"3D virtual worlds as collaborative communities enriching human endeavours: Innovative applications in e-Learning","shortTitle":"3D virtual worlds as collaborative communities enriching human endeavours","page":"151-156","event":"2009 3rd IEEE International Conference on Digital Ecosystems and Technologies (DEST)","URL":"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=5276761","versionNumber":1}};
41
//
42
//     sys.items = items;
43
//
44
//     var clusters = [
45
//     {
46
//     	citationItems: ["14058/RN9M5BF3"],
47
//     	properties: {
48
//     		note:0
49
//     	}
50
//     },
51
//     {
52
//     	citationItems: ["14058/NSBERGDK"],
53
//     	properties: {
54
//     		note:0
55
//     	}
56
//     },
57
//     ];
58
//
59
//     engine.updateItems(Object.keys(items));
60
//     var bib = engine.makeBibliography();
61
//     console.log(bib[1]);
62
//     this.citation =bib[1];
63
// }
64

  
65

  
66

  
67
    var data= '[ { "id": "Q23571040", "type": "article-journal", "title": "Correlation of the Base Strengths of Amines 1", "DOI": "10.1021/ja01577a030", "author": [ { "given": "H. K.", "family": "Hall" } ], "issued": [ { "date-parts": [ "1957", "1", "1" ] } ], "container-title": "Journal of the American Chemical Society", "volume": "79", "issue": "20", "page": "5441-5444" } ]';
68
    var Cite = require('../home/citation-0.2.js');
69
    var opt = {
70
      format: 'string',
71
      type  : 'string',
72
      style : 'citation-apa',
73
      lang  : 'en-US'
74
    };
75
    // var Cite = require('citation-js');
76
    var cite = new Cite(data, opt);
77
    console.log("APA:"+cite.get());
78

  
79
    opt = {
80
      format: 'string',
81
      type  : 'string',
82
      style : 'citation-harvard1',
83
      lang  : 'en-US'
84
    };
85
    cite = new Cite(data, opt);
86
    // cite.set(data);
87
    console.log("harvard1: "+cite.get());
88

  
89

  
90

  
91
    var opt_template = {
92
      format: 'string',
93
      type  : 'string',
94
      style : 'citation-ieee',
95
      lang  : 'en-US',
96
      template : '<?xml version="1.0" encoding="utf-8"?> <style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only"> <info> <title>IEEE (with URL)</title> <id>http://www.zotero.org/styles/ieee-with-url</id> <link href="http://www.zotero.org/styles/ieee-with-url" rel="self"/> <link href="http://www.ieee.org/documents/style_manual.pdf" rel="documentation"/> <link href="http://www.ieee.org/documents/auinfo07.pdf" rel="documentation"/> <author> <name>Michael Berkowitz</name> <email>mberkowi@gmu.edu</email> </author> <contributor> <name>Julian Onions</name> <email>julian.onions@gmail.com</email> </contributor> <contributor> <name>Rintze Zelle</name> <uri>http://twitter.com/rintzezelle</uri> </contributor> <contributor> <name>Stephen Frank</name> <uri>http://www.zotero.org/sfrank</uri> </contributor> <contributor> <name>Sebastian Karcher</name> </contributor> <category citation-format="numeric"/> <category field="engineering"/> <category field="generic-base"/> <updated>2012-10-18T22:38:43+00:00</updated> <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights> </info> <locale xml:lang="en"> <terms> <term name="chapter" form="short">ch.</term> <term name="presented at">presented at the</term> <term name="available at">available</term> </terms> </locale> <!-- Macros --> <macro name="edition"> <choose> <if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any"> <choose> <if is-numeric="edition"> <group delimiter=" "> <number variable="edition" form="ordinal"/> <text term="edition" form="short"/> </group> </if> <else> <text variable="edition" text-case="capitalize-first" suffix="."/> </else> </choose> </if> </choose> </macro> <macro name="issued"> <choose> <if type="article-journal report" match="any"> <date variable="issued"> <date-part name="month" form="short" suffix=" "/> <date-part name="year" form="long"/> </date> </if> <else-if type=" bill book chapter graphic legal_case legislation motion_picture paper-conference song thesis" match="any"> <date variable="issued"> <date-part name="year" form="long"/> </date> </else-if> <else> <date variable="issued"> <date-part name="day" form="numeric-leading-zeros" suffix="-"/> <date-part name="month" form="short" suffix="-" strip-periods="true"/> <date-part name="year" form="long"/> </date> </else> </choose> </macro> <macro name="author"> <names variable="author"> <name initialize-with=". " delimiter=", " and="text"/> <label form="short" prefix=", " text-case="capitalize-first"/> <substitute> <names variable="editor"/> <names variable="translator"/> </substitute> </names> </macro> <macro name="editor"> <names variable="editor"> <name initialize-with=". " delimiter=", " and="text"/> <label form="short" prefix=", " text-case="capitalize-first"/> </names> </macro> <macro name="locators"> <group delimiter=", "> <text macro="edition"/> <group delimiter=" "> <text term="volume" form="short"/> <number variable="volume" form="numeric"/> </group> <group delimiter=" "> <number variable="number-of-volumes" form="numeric"/> <text term="volume" form="short" plural="true"/> </group> <group delimiter=" "> <text term="issue" form="short"/> <number variable="issue" form="numeric"/> </group> </group> </macro> <macro name="title"> <choose> <if type="bill book graphic legal_case legislation motion_picture song" match="any"> <text variable="title" font-style="italic"/> </if> <else> <text variable="title" quotes="true"/> </else> </choose> </macro> <macro name="publisher"> <choose> <if type=" bill book chapter graphic legal_case legislation motion_picture paper-conference song" match="any"> <group delimiter=": "> <text variable="publisher-place"/> <text variable="publisher"/> </group> </if> <else> <group delimiter=", "> <text variable="publisher"/> <text variable="publisher-place"/> </group> </else> </choose> </macro> <macro name="event"> <choose> <if type="paper-conference speech" match="any"> <choose> <!-- Published Conference Paper --> <if variable="container-title"> <group delimiter=", "> <group delimiter=" "> <text term="in"/> <text variable="container-title" font-style="italic"/> </group> <text variable="event-place"/> </group> </if> <!-- Unpublished Conference Paper --> <else> <group delimiter=", "> <group delimiter=" "> <text term="presented at"/> <text variable="event"/> </group> <text variable="event-place"/> </group> </else> </choose> </if> </choose> </macro> <macro name="access"> <choose> <if variable="URL"> <group delimiter=". "> <group delimiter=": "> <text term="available at" text-case="capitalize-first"/> <text variable="URL"/> </group> <group prefix="[" suffix="]" delimiter=": "> <text term="accessed" text-case="capitalize-first"/> <date variable="accessed"> <date-part name="day" form="numeric-leading-zeros" suffix="-"/> <date-part name="month" form="short" suffix="-" strip-periods="true"/> <date-part name="year" form="long"/> </date> </group> </group> </if> </choose> </macro> <macro name="page"> <group> <label variable="page" form="short" suffix=" "/> <text variable="page"/> </group> </macro> <macro name="citation-locator"> <group delimiter=" "> <choose> <if locator="page"> <label variable="locator" form="short"/> </if> <else> <label variable="locator" form="short" text-case="capitalize-first"/> </else> </choose> <text variable="locator"/> </group> </macro> <!-- Citation --> <citation collapse="citation-number"> <sort> <key variable="citation-number"/> </sort> <layout delimiter=", "> <group prefix="[" suffix="]" delimiter=", "> <text variable="citation-number"/> <text macro="citation-locator"/> </group> </layout> </citation> <!-- Bibliography --> <bibliography entry-spacing="0" second-field-align="flush"> <layout> <!-- Citation Number --> <text variable="citation-number" prefix="[" suffix="]"/> <!-- Author(s) --> <text macro="author" suffix=", "/> <!-- Rest of Citation --> <group suffix=". "> <choose> <!-- Specific Formats --> <if type="article-journal"> <group delimiter=", "> <text macro="title"/> <text variable="container-title" font-style="italic" form="short"/> <text macro="locators"/> <text macro="page"/> <text macro="issued"/> </group> </if> <else-if type="paper-conference"> <group delimiter=", "> <text macro="title"/> <text macro="event"/> <text macro="issued"/> <text macro="locators"/> <text macro="page"/> </group> </else-if> <else-if type="report"> <group delimiter=", "> <text macro="title"/> <text macro="publisher"/> <group delimiter=" "> <text variable="genre"/> <text variable="number"/> </group> <text macro="issued"/> </group> </else-if> <else-if type="thesis"> <group delimiter=", "> <text macro="title"/> <text variable="genre"/> <text macro="publisher"/> <text macro="issued"/> </group> </else-if> <else-if type="webpage"> <group delimiter=", " suffix=". "> <text macro="title"/> <text variable="container-title" font-style="italic"/> <text macro="issued"/> </group> </else-if> <else-if type="patent"> <text macro="title" suffix=", "/> <text variable="number"/> <text macro="issued"/> </else-if> <!-- Generic/Fallback Formats --> <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any"> <group delimiter=", " suffix=". "> <text macro="title"/> <text macro="locators"/> </group> <group delimiter=", "> <text macro="publisher"/> <text macro="issued"/> <text macro="page"/> </group> </else-if> <else-if type="article-magazine article-newspaper broadcast interview manuscript map patent personal_communication song speech thesis webpage" match="any"> <group delimiter=", "> <text macro="title"/> <text variable="container-title" font-style="italic"/> <text macro="locators"/> <text macro="publisher"/> <text macro="page"/> <text macro="issued"/> </group> </else-if> <else-if type="chapter paper-conference" match="any"> <group delimiter=", " suffix=", "> <text macro="title"/> <group delimiter=" "> <text term="in"/> <text variable="container-title" font-style="italic"/> </group> <text macro="locators"/> </group> <text macro="editor" suffix=" "/> <group delimiter=", "> <text macro="publisher"/> <text macro="issued"/> <text macro="page"/> </group> </else-if> <else> <group delimiter=", " suffix=". "> <text macro="title"/> <text variable="container-title" font-style="italic"/> <text macro="locators"/> </group> <group delimiter=", "> <text macro="publisher"/> <text macro="page"/> <text macro="issued"/> </group> </else> </choose> <choose> <if variable="URL"> <text value=" [Online]"/> </if> </choose> </group> <text macro="access"/> </layout> </bibliography> </style> '
97
    };
98

  
99
    // var opt = { format: 'string', type : 'string', style : 'citation-<NAME>', lang : 'en-US', template : <XML_CSL> };
100
    var cite_template = new Cite(data, opt_template);
101
    cite_template.set(data);
102
    console.log("IEEE: "+cite_template.get());
103

  
104

  
105
  }
106
 bibtex:string =`<?xml version="1.0" encoding="utf-8"?> <style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-US"> <info> <title>BibTeX generic citation style</title> <id>http://www.zotero.org/styles/bibtex</id> <link href="http://www.zotero.org/styles/bibtex" rel="self"/> <link href="http://www.bibtex.org/" rel="documentation"/> <author> <name>Markus Schaffner</name> </author> <contributor> <name>Richard Karnesky</name> <email>karnesky+zotero@gmail.com</email> <uri>http://arc.nucapt.northwestern.edu/Richard_Karnesky</uri> </contributor> <category citation-format="author-date"/> <category field="generic-base"/> <updated>2012-09-14T21:22:32+00:00</updated> <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights> </info> <macro name="zotero2bibtexType"> <choose> <if type="bill book graphic legal_case legislation motion_picture report song" match="any"> <text value="book"/> </if> <else-if type="chapter paper-conference" match="any"> <text value="inbook"/> </else-if> <else-if type="article article-journal article-magazine article-newspaper" match="any"> <text value="article"/> </else-if> <else-if type="thesis" match="any"> <text value="phdthesis"/> </else-if> <else-if type="manuscript" match="any"> <text value="unpublished"/> </else-if> <else-if type="paper-conference" match="any"> <text value="inproceedings"/> </else-if> <else-if type="report" match="any"> <text value="techreport"/> </else-if> <else> <text value="misc"/> </else> </choose> </macro> <macro name="citeKey"> <group delimiter="_"> <text macro="author-short" text-case="lowercase"/> <text macro="issued-year"/> </group> </macro> <macro name="author-short"> <names variable="author"> <name form="short" delimiter="_" delimiter-precedes-last="always"/> <substitute> <names variable="editor"/> <names variable="translator"/> <choose> <if type="bill book graphic legal_case legislation motion_picture report song" match="any"> <text variable="title" form="short"/> </if> <else> <text variable="title" form="short"/> </else> </choose> </substitute> </names> </macro> <macro name="issued-year"> <date variable="issued"> <date-part name="year"/> </date> </macro> <macro name="issued-month"> <date variable="issued"> <date-part name="month" form="short" strip-periods="true"/> </date> </macro> <macro name="author"> <names variable="author"> <name sort-separator=", " delimiter=" and " delimiter-precedes-last="always" name-as-sort-order="all"/> <label form="long" text-case="capitalize-first"/> </names> </macro> <macro name="editor-translator"> <names variable="editor translator" delimiter=", "> <name sort-separator=", " delimiter=" and " delimiter-precedes-last="always" name-as-sort-order="all"/> <label form="long" text-case="capitalize-first"/> </names> </macro> <macro name="title"> <text variable="title"/> </macro> <macro name="number"> <text variable="issue"/> <text variable="number"/> </macro> <macro name="container-title"> <choose> <if type="chapter paper-conference" match="any"> <text variable="container-title" prefix=" booktitle={" suffix="}"/> </if> <else> <text variable="container-title" prefix=" journal={" suffix="}"/> </else> </choose> </macro> <macro name="publisher"> <choose> <if type="thesis"> <text variable="publisher" prefix=" school={" suffix="}"/> </if> <else-if type="report"> <text variable="publisher" prefix=" institution={" suffix="}"/> </else-if> <else> <text variable="publisher" prefix=" publisher={" suffix="}"/> </else> </choose> </macro> <macro name="pages"> <text variable="page"/> </macro> <macro name="edition"> <text variable="edition"/> </macro> <citation et-al-min="10" et-al-use-first="10" disambiguate-add-year-suffix="true" disambiguate-add-names="false" disambiguate-add-givenname="false" collapse="year"> <sort> <key macro="author"/> <key variable="issued"/> </sort> <layout delimiter="_"> <text macro="citeKey"/> </layout> </citation> <bibliography hanging-indent="false" et-al-min="10" et-al-use-first="10"> <sort> <key macro="author"/> <key variable="issued"/> </sort> <layout> <text macro="zotero2bibtexType" prefix=" @"/> <group prefix="{" suffix="}" delimiter=", "> <text macro="citeKey"/> <text variable="publisher-place" prefix=" place={" suffix="}"/> <!--Fix This--> <text variable="chapter-number" prefix=" chapter={" suffix="}"/> <!--Fix This--> <text macro="edition" prefix=" edition={" suffix="}"/> <!--Is this in CSL? <text variable="type" prefix=" type={" suffix="}"/>--> <text variable="collection-title" prefix=" series={" suffix="}"/> <text macro="title" prefix=" title={" suffix="}"/> <text variable="volume" prefix=" volume={" suffix="}"/> <!--Not in CSL<text variable="rights" prefix=" rights={" suffix="}"/>--> <text variable="ISBN" prefix=" ISBN={" suffix="}"/> <text variable="ISSN" prefix=" ISSN={" suffix="}"/> <!--Not in CSL <text variable="LCCN" prefix=" callNumber={" suffix="}"/>--> <text variable="archive_location" prefix=" archiveLocation={" suffix="}"/> <text variable="URL" prefix=" url={" suffix="}"/> <text variable="DOI" prefix=" DOI={" suffix="}"/> <text variable="abstract" prefix=" abstractNote={" suffix="}"/> <text variable="note" prefix=" note={" suffix="}"/> <text macro="number" prefix=" number={" suffix="}"/> <text macro="container-title"/> <text macro="publisher"/> <text macro="author" prefix=" author={" suffix="}"/> <text macro="editor-translator" prefix=" editor={" suffix="}"/> <text macro="issued-year" prefix=" year={" suffix="}"/> <text macro="issued-month" prefix=" month={" suffix="}"/> <text macro="pages" prefix=" pages={" suffix="}"/> <text variable="collection-title" prefix=" collection={" suffix="}"/> </group> </layout> </bibliography> </style> `;
107
 ieee_csl:string =`<?xml version="1.0" encoding="utf-8"?> <style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only"> <info> <title>IEEE</title> <id>http://www.zotero.org/styles/ieee</id> <link href="http://www.zotero.org/styles/ieee" rel="self"/> <link href="http://www.ieee.org/documents/style_manual.pdf" rel="documentation"/> <link href="http://www.ieee.org/documents/auinfo07.pdf" rel="documentation"/> <author> <name>Michael Berkowitz</name> <email>mberkowi@gmu.edu</email> </author> <contributor> <name>Julian Onions</name> <email>julian.onions@gmail.com</email> </contributor> <contributor> <name>Rintze Zelle</name> <uri>http://twitter.com/rintzezelle</uri> </contributor> <contributor> <name>Stephen Frank</name> <uri>http://www.zotero.org/sfrank</uri> </contributor> <contributor> <name>Sebastian Karcher</name> </contributor> <category citation-format="numeric"/> <category field="engineering"/> <category field="generic-base"/> <updated>2016-10-06T15:32:30+00:00</updated> <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights> </info> <locale xml:lang="en"> <terms> <term name="chapter" form="short">ch.</term> <term name="presented at">presented at the</term> <term name="available at">available</term> </terms> </locale> <!-- Macros --> <macro name="edition"> <choose> <if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any"> <choose> <if is-numeric="edition"> <group delimiter=" "> <number variable="edition" form="ordinal"/> <text term="edition" form="short"/> </group> </if> <else> <text variable="edition" text-case="capitalize-first" suffix="."/> </else> </choose> </if> </choose> </macro> <macro name="issued"> <choose> <if type="article-journal report" match="any"> <date variable="issued"> <date-part name="month" form="short" suffix=" "/> <date-part name="year" form="long"/> </date> </if> <else-if type=" bill book chapter graphic legal_case legislation motion_picture paper-conference song thesis" match="any"> <date variable="issued"> <date-part name="year" form="long"/> </date> </else-if> <else> <date variable="issued"> <date-part name="day" form="numeric-leading-zeros" suffix="-"/> <date-part name="month" form="short" suffix="-" strip-periods="true"/> <date-part name="year" form="long"/> </date> </else> </choose> </macro> <macro name="author"> <names variable="author"> <name and="text" et-al-min="7" et-al-use-first="1" initialize-with=". "/> <label form="short" prefix=", " text-case="capitalize-first"/> <et-al font-style="italic"/> <substitute> <names variable="editor"/> <names variable="translator"/> </substitute> </names> </macro> <macro name="editor"> <names variable="editor"> <name initialize-with=". " delimiter=", " and="text"/> <label form="short" prefix=", " text-case="capitalize-first"/> </names> </macro> <macro name="locators"> <group delimiter=", "> <text macro="edition"/> <group delimiter=" "> <text term="volume" form="short"/> <number variable="volume" form="numeric"/> </group> <group delimiter=" "> <number variable="number-of-volumes" form="numeric"/> <text term="volume" form="short" plural="true"/> </group> <group delimiter=" "> <text term="issue" form="short"/> <number variable="issue" form="numeric"/> </group> </group> </macro> <macro name="title"> <choose> <if type="bill book graphic legal_case legislation motion_picture song" match="any"> <text variable="title" font-style="italic"/> </if> <else> <text variable="title" quotes="true"/> </else> </choose> </macro> <macro name="publisher"> <choose> <if type=" bill book chapter graphic legal_case legislation motion_picture paper-conference song" match="any"> <group delimiter=": "> <text variable="publisher-place"/> <text variable="publisher"/> </group> </if> <else> <group delimiter=", "> <text variable="publisher"/> <text variable="publisher-place"/> </group> </else> </choose> </macro> <macro name="event"> <choose> <if type="paper-conference speech" match="any"> <choose> <!-- Published Conference Paper --> <if variable="container-title"> <group delimiter=", "> <group delimiter=" "> <text term="in"/> <text variable="container-title" font-style="italic"/> </group> <text variable="event-place"/> </group> </if> <!-- Unpublished Conference Paper --> <else> <group delimiter=", "> <group delimiter=" "> <text term="presented at"/> <text variable="event"/> </group> <text variable="event-place"/> </group> </else> </choose> </if> </choose> </macro> <macro name="access"> <choose> <if type="webpage"> <choose> <if variable="URL"> <group delimiter=". "> <text term="online" prefix="[" suffix="]" text-case="capitalize-first"/> <group delimiter=": "> <text term="available at" text-case="capitalize-first"/> <text variable="URL"/> </group> <group prefix="[" suffix="]" delimiter=": "> <text term="accessed" text-case="capitalize-first"/> <date variable="accessed"> <date-part name="day" form="numeric-leading-zeros" suffix="-"/> <date-part name="month" form="short" suffix="-" strip-periods="true"/> <date-part name="year" form="long"/> </date> </group> </group> </if> </choose> </if> </choose> </macro> <macro name="page"> <group> <label variable="page" form="short" suffix=" "/> <text variable="page"/> </group> </macro> <macro name="citation-locator"> <group delimiter=" "> <choose> <if locator="page"> <label variable="locator" form="short"/> </if> <else> <label variable="locator" form="short" text-case="capitalize-first"/> </else> </choose> <text variable="locator"/> </group> </macro> <!-- Citation --> <citation collapse="citation-number"> <sort> <key variable="citation-number"/> </sort> <layout delimiter=", "> <group prefix="[" suffix="]" delimiter=", "> <text variable="citation-number"/> <text macro="citation-locator"/> </group> </layout> </citation> <!-- Bibliography --> <bibliography entry-spacing="0" second-field-align="flush"> <layout suffix="."> <!-- Citation Number --> <text variable="citation-number" prefix="[" suffix="]"/> <!-- Author(s) --> <text macro="author" suffix=", "/> <!-- Rest of Citation --> <choose> <!-- Specific Formats --> <if type="article-journal"> <group delimiter=", "> <text macro="title"/> <text variable="container-title" font-style="italic" form="short"/> <text macro="locators"/> <text macro="page"/> <text macro="issued"/> </group> </if> <else-if type="paper-conference speech" match="any"> <group delimiter=", "> <text macro="title"/> <text macro="event"/> <text macro="issued"/> <text macro="locators"/> <text macro="page"/> </group> </else-if> <else-if type="report"> <group delimiter=", "> <text macro="title"/> <text macro="publisher"/> <group delimiter=" "> <text variable="genre"/> <text variable="number"/> </group> <text macro="issued"/> </group> </else-if> <else-if type="thesis"> <group delimiter=", "> <text macro="title"/> <text variable="genre"/> <text macro="publisher"/> <text macro="issued"/> </group> </else-if> <else-if type="webpage post-weblog" match="any"> <group delimiter=", " suffix=". "> <text macro="title"/> <text variable="container-title" font-style="italic"/> <text macro="issued"/> </group> <text macro="access"/> </else-if> <else-if type="patent"> <group delimiter=", "> <text macro="title"/> <text variable="number"/> <text macro="issued"/> </group> </else-if> <!-- Generic/Fallback Formats --> <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any"> <group delimiter=", " suffix=". "> <text macro="title"/> <text macro="locators"/> </group> <group delimiter=", "> <text macro="publisher"/> <text macro="issued"/> <text macro="page"/> </group> </else-if> <else-if type="article-magazine article-newspaper broadcast interview manuscript map patent personal_communication song speech thesis webpage" match="any"> <group delimiter=", "> <text macro="title"/> <text variable="container-title" font-style="italic"/> <text macro="locators"/> <text macro="publisher"/> <text macro="page"/> <text macro="issued"/> </group> </else-if> <else-if type="chapter paper-conference" match="any"> <group delimiter=", " suffix=", "> <text macro="title"/> <group delimiter=" "> <text term="in"/> <text variable="container-title" font-style="italic"/> </group> <text macro="locators"/> </group> <text macro="editor" suffix=" "/> <group delimiter=", "> <text macro="publisher"/> <text macro="issued"/> <text macro="page"/> </group> </else-if> <else> <group delimiter=", " suffix=". "> <text macro="title"/> <text variable="container-title" font-style="italic"/> <text macro="locators"/> </group> <group delimiter=", "> <text macro="publisher"/> <text macro="page"/> <text macro="issued"/> </group> </else> </choose> </layout> </bibliography> </style> `;
15 108
}
modules/uoa-services-portal/trunk/sample-components/sampleComponent-2/src/index.html
11 11
    <!--link rel="stylesheet" href="bootstrap/dist/css/bootstrap.min.css"-->
12 12
	<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
13 13
    <link rel="icon" href="data:;base64,iVBORw0KGgo=">
14
    <script src="assets/lib/citeprocnode.js" type="text/javascript"></script>
14 15
    <!-- Temporarily add here custom style -->
15 16
    <style>
16 17
      .custom-hidden-dropdown-menu {position:static !important;}

Also available in: Unified diff