Skip to content

Commit

Permalink
Merge branch 'release/1.8.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
jonase committed Jul 28, 2015
2 parents 3343de0 + d5cf21a commit 0780b02
Show file tree
Hide file tree
Showing 51 changed files with 1,443 additions and 540 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,17 @@

(dispatch-loop
:user-auth/create auth
(let [{:keys [user role object-path]} auth]
(let [{:keys [user role object-path object-id]} auth]
(assert (integer? user))
(assert (integer? role))
(assert (string? object-path))
(assert (integer? object-id))
(POST "/rest/user_auth"
(merge ajax/default-ajax-config
{:params {"userId" user
"roleId" role
"objectPath" object-path}
"objectPath" object-path
"securedObjectId" object-id}
:handler (fn [{:strs [user_auth]}]
(swap! app-state assoc-in [:user-auth :by-id (get user_auth "keyId")] user_auth)
(swap! app-state update-in [:user-auth :by-user-id (get user_auth "userId")] conj user_auth))}))))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
[:h2 (t> _roles_and_permissions) ":"]
[:div.form-inline.text-left.paddingTop.roleEditSelect {:role "name"}
[:div.form-group
(om/build b/dropdown ;;b/select
(om/build b/dropdown
{:placeholder (t> _select_a_role)
:selected selected-role
:data (store/get-roles roles-store)
Expand Down Expand Up @@ -183,7 +183,7 @@
current-user-id)))]
(contains? object-paths "/")))))
(cons {"name" (t> _all_folders) "keyId" 0 "projectType" "PROJECT_FOLDER"}
(projects-store/get-projects projects-store nil))
(projects-store/get-projects projects-store 0))
(projects-store/get-projects projects-store (get (peek selected-folders) "keyId")))]
(om/build b/dropdown
{:placeholder (t> _select_a_folder_or_survey)
Expand All @@ -207,7 +207,8 @@
(str "/"
(->> selected-folders
(map #(get % "name"))
(str/join "/"))))}))}
(str/join "/"))))
:object-id (or (get (last selected-folders) "keyId") 0)}))}
:plus (t> _add))]]
(om/build grid
{:data (when-let [user-id (get user "keyId")]
Expand Down
25 changes: 25 additions & 0 deletions Dashboard/app/css/library.scss
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,28 @@ $width-large: 1200px;
color: $color;
}
}


@mixin flexbox {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
}

@mixin flex($values) {
-webkit-box-flex: $values;
-moz-box-flex: $values;
-webkit-flex: $values;
-ms-flex: $values;
flex: $values;
}

@mixin order($val) {
-webkit-box-ordinal-group: $val;
-moz-box-ordinal-group: $val;
-ms-flex-order: $val;
-webkit-order: $val;
order: $val;
}
58 changes: 30 additions & 28 deletions Dashboard/app/css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -502,50 +502,52 @@ input[type="submit"] {
}
}


.editAnswerMenu {
position: relative;
margin: 10px auto;
width: 100%;
background: rgb(205, 205, 205);
ul {
position: relative;
width: 100%;
padding: 1.5em 0.5em;
@include flexbox;
-webkit-align-items: center;
align-items: center;
-webkit-align-content: center;
align-content: center;
-webkit-justify-content: space-around;
justify-content: space-around;
padding:15px 0;
li {
display: inline;
margin: 0 0 10px 0;
flex-grow:1;
text-align:center;
&.deleteBtn {
position: initial;
display: relative;
top:10px;
left:45%;
}
&:first-child {
margin-left: 0.5%;
text-align: left;
}
&:last-child {
margin-right: 0.5%;
text-align:right;
}
}
}
}

.prevNext {
position: relative;
display: block;
margin: 0 auto;
padding: 1em 2% 1.5em 2%;
width: 96%;
background: $darkGrey;
.prevBtn {
position: absolute;
top: 0;
left: 0;
a {
font-weight: bold;
font-size: 1.2em;
display: inline-block;
padding: 0.5em 1em 1em 1em;
}
}
.nextBtn {
position: absolute;
top: 0;
right: 0;
a {
font-weight: bold;
font-size: 1.2em;
display: inline-block;
padding: 0.5em 1em 1em 1em;
}
a {
font-weight: bold;
font-size: 1.2em;
display: inline-block;
padding: 0.5em 1em 1em 1em;
}
}

Expand Down
3 changes: 2 additions & 1 deletion Dashboard/app/js/lib/controllers/data-controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,9 @@ FLOW.surveyInstanceControl = Ember.ArrayController.create({
this.set('content', FLOW.store.findQuery(FLOW.SurveyInstance, {}));
},

doInstanceQuery: function (surveyId, deviceId, since, beginDate, endDate, submitterName, countryCode, level1, level2) {
doInstanceQuery: function (surveyInstanceId, surveyId, deviceId, since, beginDate, endDate, submitterName, countryCode, level1, level2) {
this.set('content', FLOW.store.findQuery(FLOW.SurveyInstance, {
'surveyInstanceId': surveyInstanceId,
'surveyId': surveyId,
'deviceId': deviceId,
'since': since,
Expand Down
Loading

0 comments on commit 0780b02

Please sign in to comment.