forked from wikirate/wikirate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request wikirate#1634 from ethn/answerpage
details
- Loading branch information
Showing
44 changed files
with
37,762 additions
and
1,382 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
mod/deckorate_calculations/set/metric_type/score/thumbnail_subtitle.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.thumbnail-subtitle | ||
.subtitle-designer{ title: "Designer" } | ||
= nest card.metric_designer_card, view: :thumbnail, size: :icon | ||
.subtitle-scorer{ title: "Scorer" } | ||
= nest card.scorer_card, view: :thumbnail, size: :icon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
mod/deckorate_core/assets/script/customize_fields.js.coffee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
$ -> | ||
deckorate.customFields = | ||
headquarters: | ||
title: "Company Headquarters" | ||
selector: ".TYPE-company.thumbnail .RIGHT-headquarter.content-view" | ||
identifiers: | ||
title: "Company Identifiers" | ||
selector: ".TYPE-company.thumbnail .thumbnail-subtitle" | ||
metric_type: | ||
title: "Metric Type" | ||
selector: ".TYPE-metric.thumbnail .thumbnail-title-right" | ||
metric_designer: | ||
title: "Metric Designer" | ||
selector: ".TYPE-metric.thumbnail .thumbnail-subtitle" | ||
contributor: | ||
title: "Contributor" | ||
selector: ".bar-middle .credit" | ||
|
||
$("body").on "change", "._custom-field-checkboxes input", (e) -> | ||
box = $(this) | ||
selector = box.data "fieldSelector" | ||
$(".answer-result-items").find(selector).toggle box.is(":checked") | ||
|
||
|
||
decko.slot.ready (slot) -> | ||
for field, config of deckorate.customFields | ||
addInput slot, field, config | ||
|
||
addInput = (slot, field, config) -> | ||
input = slot.find("._custom-field-template .custom-field").clone() | ||
id = "custom-field-" + field | ||
box = input.find "input" | ||
box.attr "id", id | ||
box.data "fieldSelector", config["selector"] | ||
label = input.find "label" | ||
label.html config["title"] | ||
label.attr "for", id | ||
slot.find("._custom-field-checkboxes").append input |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
mod/deckorate_core/data/files/mod_deckorate_core_script_asset_output/file.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,5 @@ | |
.ps-1 | ||
+ | ||
= answer_count_badge :year, (answer_count - 1) | ||
.bar-menu | ||
= render :bar_menu |
Oops, something went wrong.