Skip to content

Commit

Permalink
Merge branch 'release/1.5.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
iperdomo committed Jul 3, 2013
2 parents 86c02dc + 48fe543 commit d1fe24c
Show file tree
Hide file tree
Showing 64 changed files with 1,097 additions and 438 deletions.
15 changes: 7 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,12 @@ WFPMapping/device/survey/gen/com/gallatinsystems/survey/device/R.java
deploy
gwt-unitcache

# Reports service
reports/.externalToolBuilders/*
reports/.lein-failures
reports/.lein-repl-history
reports/bin/*
reports/target/*

# Clojure smoke tests
tests/clojure/akvo-tests/.lein-failures
tests/clojure/akvo-tests/.lein-repl-history
tests/clojure/akvo-tests/target/*
tests/clojure/akvo-tests/bin/*

# Vagrant
.vagrant
.vagrant
GAE/war/index.html
2 changes: 1 addition & 1 deletion Dashboard/app/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,7 @@ th.action { width: 7%; }
.no-textshadow #groupBar h2, .no-textshadow #newSurveyInfo h2 { color: rgb(125, 125, 125); }
nav.menuGroupWrap {
overflow-y: hidden;
height: 361px;
height: 361px;
background: rgb(58,58,58);
}
nav.menuGroupWrap ul.menuGroup { }
Expand Down
17 changes: 17 additions & 0 deletions Dashboard/app/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,22 @@
loader.require('akvo-flow/main');
</script>
<script src="js/flowDashboard.js"></script>

<script type="text/javascript">
var _paq = _paq || [];
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["setCookieDomain", "*.akvoflow.org"]);
_paq.push(["setDomains", ["*.akvoflow.org"]]);
_paq.push(["trackPageView"]);
_paq.push(["enableLinkTracking"]);

(function() {
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://analytics.akvo.org/";
_paq.push(["setTrackerUrl", u+"piwik.php"]);
_paq.push(["setSiteId", "10"]);
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
})();
</script>
</body>
</html>
1 change: 1 addition & 0 deletions Dashboard/app/js/lib/controllers/data-controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ FLOW.surveyInstanceControl = Ember.ArrayController.create({
selectedSurvey: null,
content: null,
sinceArray: [],
pageNumber:0,

populate: function() {
this.get('sinceArray').pushObject(FLOW.metaControl.get('since'));
Expand Down
4 changes: 2 additions & 2 deletions Dashboard/app/js/lib/controllers/device-controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ FLOW.devicesInGroupControl = Ember.ArrayController.create({
// 1 means all unassigned devices
if(deviceGroupId == 1) {
this.set('content', FLOW.store.filter(FLOW.Device, function(item) {
return(Ember.empty(item.get('deviceGroup')));
return Ember.empty(item.get('deviceGroup'));
}));
} else {
this.set('content', FLOW.store.filter(FLOW.Device, function(item) {
return(parseInt(item.get('deviceGroup'), 10) == deviceGroupId);
return parseInt(item.get('deviceGroup'), 10) == deviceGroupId;
}));
}
}
Expand Down
20 changes: 10 additions & 10 deletions Dashboard/app/js/lib/controllers/survey-controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ FLOW.surveyGroupControl = Ember.ArrayController.create({
return true;
}
});
return(surveys.get('content').length > 0);
return surveys.get('content').length > 0;
},

deleteSurveyGroup: function(keyId){
Expand All @@ -166,7 +166,7 @@ FLOW.surveyControl = Ember.ArrayController.create({
if(FLOW.selectedControl.get('selectedSurveyGroup') && FLOW.selectedControl.selectedSurveyGroup.get('keyId') > 0) {
sgId = FLOW.selectedControl.selectedSurveyGroup.get('keyId');
this.set('content', FLOW.store.filter(FLOW.Survey, function(item) {
return(item.get('surveyGroupId') == sgId);
return item.get('surveyGroupId') == sgId;
}));
} else {
this.set('content', null);
Expand All @@ -178,7 +178,7 @@ FLOW.surveyControl = Ember.ArrayController.create({
if(FLOW.selectedControl.get('selectedSurveyGroup') && FLOW.selectedControl.selectedSurveyGroup.get('keyId') > 0) {
sgId = FLOW.selectedControl.selectedSurveyGroup.get('keyId');
this.set('publishedContent', FLOW.store.filter(FLOW.Survey, function(item) {
return (item.get('surveyGroupId') == sgId && item.get('status') == 'PUBLISHED');
return item.get('surveyGroupId') == sgId && item.get('status') == 'PUBLISHED';
}));
} else {
this.set('publishedContent', null);
Expand Down Expand Up @@ -226,7 +226,7 @@ FLOW.questionGroupControl = Ember.ArrayController.create({
if(!Ember.empty(FLOW.selectedControl.selectedSurvey.get('keyId'))) {
sId = FLOW.selectedControl.selectedSurvey.get('keyId');
this.set('content', FLOW.store.filter(FLOW.QuestionGroup, function(item) {
return(item.get('surveyId') == sId);
return item.get('surveyId') == sId;
}));
} else {
// this happens when we have created a new survey, which has no id yet
Expand Down Expand Up @@ -299,7 +299,7 @@ FLOW.questionControl = Ember.ArrayController.create({

// restore order
questionsInGroup = FLOW.store.filter(FLOW.Question, function(item) {
return(item.get('questionGroupId') == qgId);
return item.get('questionGroupId') == qgId;
});

questionsInGroup.forEach(function(item) {
Expand All @@ -315,7 +315,7 @@ FLOW.questionControl = Ember.ArrayController.create({
if(FLOW.selectedControl.get('selectedSurvey') && FLOW.selectedControl.selectedSurvey.get('keyId') > 0) {
sId = FLOW.selectedControl.selectedSurvey.get('keyId');
this.set('filterContent', FLOW.store.filter(FLOW.Question, function(item) {
return(item.get('surveyId') == sId);
return item.get('surveyId') == sId;
}));
} else {
this.set('filterContent',null);
Expand All @@ -327,7 +327,7 @@ FLOW.questionControl = Ember.ArrayController.create({
if(FLOW.selectedControl.get('selectedQuestionGroup') && FLOW.selectedControl.selectedSurvey.get('keyId') > 0) {
var qId = FLOW.selectedControl.selectedQuestionGroup.get('keyId');
this.set('content', FLOW.store.filter(FLOW.Question, function(item) {
return(item.get('questionGroupId') == qId);
return item.get('questionGroupId') == qId;
}));
}
}.observes('FLOW.selectedControl.selectedQuestionGroup'),
Expand All @@ -337,7 +337,7 @@ FLOW.questionControl = Ember.ArrayController.create({
if(FLOW.selectedControl.get('selectedSurvey')) {
sId = FLOW.selectedControl.selectedSurvey.get('keyId');
this.set('OPTIONcontent', FLOW.store.filter(FLOW.Question, function(item) {
return(item.get('type') == 'OPTION' && item.get('surveyId') == sId);
return item.get('type') == 'OPTION' && item.get('surveyId') == sId;
}));
} else {
this.set('OPTIONcontent', null);
Expand All @@ -359,7 +359,7 @@ FLOW.questionControl = Ember.ArrayController.create({
if(qgOrder > questionGroupOrder) {return false;}
if(qgOrder < questionGroupOrder) {return true;}
// when we arrive there qgOrder = questionGroupOrder, so we have to check question order
return (item.get('order') < questionOrder);
return item.get('order') < questionOrder;
});

this.set('earlierOptionQuestions', optionQuestionList);
Expand Down Expand Up @@ -416,7 +416,7 @@ FLOW.notificationControl = Ember.ArrayController.create({
if(FLOW.selectedControl.get('selectedSurvey') && FLOW.selectedControl.selectedSurvey.get('keyId') > 0) {
sId = FLOW.selectedControl.selectedSurvey.get('keyId');
this.set('content', FLOW.store.filter(FLOW.NotificationSubscription, function(item) {
return(item.get('entityId') == sId);
return item.get('entityId') == sId;
}));
}
}.observes('FLOW.selectedControl.selectedSurvey')
Expand Down
1 change: 1 addition & 0 deletions Dashboard/app/js/lib/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
require('akvo-flow/all_locales');
require('akvo-flow/models/FLOWrest-adapter-v2-common');
require('akvo-flow/models/models');
//require('akvo-flow/models/fixtures');
require('akvo-flow/flowenv');
require('akvo-flow/controllers/controllers');
require('akvo-flow/views/views');
Expand Down
6 changes: 3 additions & 3 deletions Dashboard/app/js/lib/models/FLOWrest-adapter-v2-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ DS.FLOWRESTAdapter = DS.RESTAdapter.extend({
this._super(store, type, json, root);
// only change metaControl info if there is actual meta info in the server response
if (Object.keys(this.extractMeta(json)).length !== 0) {
FLOW.metaControl.set('since', this.extractMeta(json).since);
FLOW.metaControl.set('num', this.extractMeta(json).num);
if (type == 'FLOW.SurveyInstance') {
if (type == FLOW.SurveyInstance) {
FLOW.metaControl.set('numSILoaded', this.extractMeta(json).num);
FLOW.metaControl.set('since', this.extractMeta(json).since);
FLOW.metaControl.set('num', this.extractMeta(json).num);
}
msg = this.extractMeta(json).message;
status = this.extractMeta(json).status;
Expand Down
Loading

0 comments on commit d1fe24c

Please sign in to comment.