Skip to content

Commit

Permalink
Merge branch 'release/1.9.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
muloem committed Nov 4, 2015
2 parents 2d5762f + 8365639 commit aed0e81
Show file tree
Hide file tree
Showing 30 changed files with 1,241 additions and 1,090 deletions.
3 changes: 3 additions & 0 deletions Dashboard/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,6 @@ DEPENDENCIES
sass
uglifier
yui-compressor

BUNDLED WITH
1.10.3
6 changes: 3 additions & 3 deletions Dashboard/app/cljs/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
:description "Standalone apps for the Akvo Flow Dashboard"
:url "http://akvo.org/products/akvoflow/"

:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-2913"]
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.7.145"]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]
[org.omcljs/om "0.8.8"]
[cljs-ajax "0.3.10"]
[sablono "0.3.4"]]

:plugins [[lein-cljsbuild "1.0.5"]
:plugins [[lein-cljsbuild "1.1.0"]
[lein-shell "0.4.0"]]

:source-paths ["src"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@


(comment
usage for dropdown component:
;; usage for dropdown component:

(om/build dropdown
{;; What to show if nothing is selected
Expand Down
29 changes: 13 additions & 16 deletions Dashboard/app/css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4214,7 +4214,7 @@ div.dataCollectedDate label input {
line-height: inherit;
}

#pointDetails dl {
#pointDetails div.mapInfoDetail {
position: relative;
overflow: hidden;
padding: 0.5em 0.25%;
Expand All @@ -4223,41 +4223,38 @@ div.dataCollectedDate label input {
letter-spacing: 0em;
font-family: Verdana, Geneva, sans-serif;
line-height: 1.2em;
h4 {
margin:5px 0 10px 0;
color: $akvoOrange;
}
}

#pointDetails dl div.defListWrap {
#pointDetails div.mapInfoDetail div.defListWrap {
display: table;
margin: 2px auto;
padding: 0.2em 0;
width: 100%;
}

#pointDetails dl div.defListWrap:nth-child(odd) {
#pointDetails div.mapInfoDetail div.defListWrap:nth-child(odd) {
background: rgb(224, 224, 224);
}

#pointDetails dl div.defListWrap dt {
display: table-cell;
float: left;
#pointDetails div.mapInfoDetail div.defListWrap dt {
padding: 5px 0 5px 0.75%;
width: 44.25%;
color: rgb(124, 124, 124);
-webkit-text-shadow: 0px 1px 0 white, 0 -1px 0 rgb(154, 164, 164);
-moz-text-shadow: 0px 1px 0 white, 0 -1px 0 rgb(154, 164, 164);
-o-text-shadow: 0px 1px 0 white, 0 -1px 0 rgb(154, 164, 164);
text-shadow: 0px 1px 0 white, 0 -1px 0 rgb(154, 164, 164);
margin:2px 0 15px 0;
color: rgba($akvoBlack,0.4);
}

#pointDetails dl div.defListWrap dd {
display: table-cell;
float: left;
#pointDetails div.mapInfoDetail div.defListWrap dd {
padding: 5px 0 5px 0.75%;
width: 54.25%;
color: rgb(0, 0, 0);
}

#pointDetails dl dt:nth-of-type(1),
#pointDetails dl dd:nth-of-type(1) {
#pointDetails div.mapInfoDetail dt:nth-of-type(1),
#pointDetails div.mapInfoDetail dd:nth-of-type(1) {
border-top: none;
}

Expand Down
4 changes: 0 additions & 4 deletions Dashboard/app/js/lib/views/data/inspect-data-table-views.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,6 @@ FLOW.inspectDataTableView = FLOW.View.extend({

});

FLOW.QuestionAnswerListView = FLOW.View.extend({
controller: null,
});

FLOW.DataItemView = FLOW.View.extend({
tagName: 'span',
deleteSI: function () {
Expand Down
42 changes: 41 additions & 1 deletion Dashboard/app/js/lib/views/data/question-answer-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ function formatDate(date) {
FLOW.QuestionAnswerView = Ember.View.extend({

isTextType: function(){
return this.get('questionType') === 'FREE_TEXT' || this.get('questionType') === 'CASCADE';
return this.get('questionType') === 'FREE_TEXT';
}.property('this.questionType'),

isCascadeType: function(){
return this.get('questionType') === 'CASCADE';
}.property('this.questionType'),

isOptionType: function(){
Expand Down Expand Up @@ -74,6 +78,41 @@ FLOW.QuestionAnswerView = Ember.View.extend({

numberValue: null,

cascadeValue: function(key, value, previousValue){
var c = this.content;
// setter
if (arguments.length > 1) {
// split according to pipes
var cascadeNames = value.split("|");
var cascadeResponse = [];
var obj = null;
cascadeNames.forEach(function(item){
if (item.trim().length > 0) {
obj = {};
obj.name = item.trim();
cascadeResponse.push(obj);
}
});

c.set('value', JSON.stringify(cascadeResponse));
}

// getter
var cascadeString = "", cascadeJson;
if (c && c.get('value')) {
if (c.get('value').indexOf("|") > -1) {
cascadeString += c.get('value');
} else {
cascadeJson = JSON.parse(c.get('value'));
cascadeString = cascadeJson.map(function(item){
return item.name;
}).join("|");
}
return cascadeString;
}
return null;
}.property('this.content'),

photoUrl: function(){
var c = this.content;
if (!Ember.empty(c.get('value'))) {
Expand Down Expand Up @@ -138,6 +177,7 @@ FLOW.QuestionAnswerView = Ember.View.extend({
}
FLOW.store.commit();
this.set('inEditMode', false);

},

doValidateNumber: function () {
Expand Down
Loading

0 comments on commit aed0e81

Please sign in to comment.