Allow modal to hardwire partialName for inheritance default template behaviour
This commit is contained in:
@@ -124,6 +124,7 @@ export default Ember.Mixin.create ApplicationRouteMixin,
|
||||
# -edit-distribution-point
|
||||
# modals/-edit-distribution-point
|
||||
#
|
||||
unless controller.get('partialName')
|
||||
partialPath = null
|
||||
while not partialPath and modalNameParts.length
|
||||
if container.lookup "template:#{modalNameParts.join('/')}/-#{partialName}"
|
||||
@@ -142,9 +143,8 @@ export default Ember.Mixin.create ApplicationRouteMixin,
|
||||
console.log message
|
||||
@set "router.globals.flash_message", message
|
||||
return
|
||||
|
||||
@incrementProperty 'router.globals.modals_counter'
|
||||
controller.set 'partialName', partialPath
|
||||
@incrementProperty 'router.globals.modals_counter'
|
||||
controller.willOpenModal() # can be implemented to setup stuff before rendering and hooks
|
||||
@render 'modals/layout',
|
||||
into: 'application'
|
||||
|
||||
Reference in New Issue
Block a user