-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Most of the way to a functional real-time advancement collapsible
- Loading branch information
Showing
5 changed files
with
289 additions
and
284 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
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
36 changes: 31 additions & 5 deletions
36
resources/js/calendar/real_time_advancement_collapsible.js
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 |
---|---|---|
@@ -1,7 +1,33 @@ | ||
export default () => ({ | ||
reordering: false, | ||
import CollapsibleComponent from "./collapsible_component"; | ||
|
||
load: function(static_data) { | ||
// | ||
class RealTimeAdvancementCollapsible extends CollapsibleComponent { | ||
collapsible_name = "Real-Time Advancement"; | ||
_clock_enabled = false; | ||
|
||
inboundProperties = { | ||
"advancement": "advancement", | ||
"clock_enabled": "static_data.clock.enabled" | ||
}; | ||
|
||
outboundProperties = { | ||
"advancement": "advancement", | ||
}; | ||
|
||
changeHandlers = { | ||
"advancement": this.debug | ||
}; | ||
|
||
set clock_enabled(value) { | ||
this._clock_enabled = value; | ||
|
||
if (this.advancement.advancement_rate_unit !== 'days') { | ||
this.advancement.advancement_rate_unit = 'days'; | ||
} | ||
}; | ||
|
||
get clock_enabled() { | ||
return this._clock_enabled; | ||
} | ||
}) | ||
} | ||
|
||
export default () => new RealTimeAdvancementCollapsible(); |
222 changes: 109 additions & 113 deletions
222
resources/views/components/clock-collapsible.blade.php
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
Oops, something went wrong.