Commit 8012a2fb authored by Maxime Chaillet's avatar Maxime Chaillet

Merge branch 'issue35' into 'master'

Issue35

See merge request !33
parents 1391e540 b3de161c
......@@ -11,8 +11,8 @@ module.exports = function(grunt) {
},
watch: {
files: ['<%= jshint.files %>', 'templates/**js'],
tasks: [ 'uglify','dustjs','cssmin','wiredep']
files: ['src/*.js', 'templates/*.js', 'css/*.css'],
tasks: [ 'jshint','uglify','dustjs','cssmin','wiredep:dev']
},
uglify: {
......
......@@ -71,8 +71,8 @@ body {
/* ######################## For doi landing page ######### */
.myBorder-left{
border-left-color: #132577;
border-left-width: 8px;
border-left-color: #cfd1d2;
border-left-width: 4px;
border-left-style: solid;
padding-left:10px;
}
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -140,25 +140,16 @@ function findRegExpInText(regExp, text) {
function extractFieldsFromCategories(data) {
var catArray = data.categories;
var index;
// extract beamline from data.categories
for (index in catArray) {
if ((findRegExpInText(/id/, catArray[index]) == 0) || (findRegExpInText(/bm/, catArray[index]) == 0)) {
for (index in catArray) {
// extract beamline from data.categories
if ((findRegExpInText(/^id/, catArray[index]) == 0) || (findRegExpInText(/^bm/, catArray[index]) == 0)) {
data.beamline = catArray[index];
}
}
// extract proposal from data.categories
for (index in catArray) {
if (findRegExpInText(/\D+-/, catArray[index]) == 0) {
} else if (findRegExpInText(/^\D+-/, catArray[index]) == 0) {
// extract proposal number from data.categories
data.proposalNumber = catArray[index];
}
}
// extract proposal type from data.categories
for (index in catArray) {
if (findRegExpInText(/\s/, catArray[index]) != -1) {
data.proposalType = catArray[index];
} else {
// catArray[index] is the proposal type. Note that proposal type can be composed of several words separated by spaces or a single word.
data.proposalType = catArray[index];
}
}
}
......
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