Removing serverInformationModal from DOM
This commit is contained in:
1 parent
2a5699a5b7
commit
91abaf8a60
19 files changed
+72
-86
No files matched your search
+1
-1
@@ -34,7 +34,7 @@ Template.serverInformationForm.onCreated(() => {
|
||||
Template.serverInformationForm.onRendered(() => {
|
||||
const instance = Template.instance();
|
||||
|
||||
instance.data.$form = instance.$('form:first');
|
||||
instance.data.$form = instance.$('form').first();
|
||||
instance.data.form = instance.data.$form.data('component');
|
||||
|
||||
// Handle the server type
|
||||
|
||||
+10
-25
@@ -1,27 +1,12 @@
|
||||
<template name="serverInformationModal">
|
||||
<div class="modal" id="serverInformationModal" tabindex="-1" role="dialog" aria-labelledby="serverInformationModalLabel">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
{{#let isList=(eq instance.container.mode.get "list")}}
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="serverInformationModalLabel">Server Information</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{{#if isList}}
|
||||
{{>serverInformationList instance.container}}
|
||||
{{else}}
|
||||
{{>serverInformationForm instance.container}}
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
{{#unless isList}}
|
||||
<button type="button" class="btn btn-default js-back">Back</button>
|
||||
{{/unless}}
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
{{/let}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{#dialogSimple (extend this dialogClass='modal-lg' title='Server Information')}}
|
||||
{{#if (eq instance.container.mode.get "list")}}
|
||||
{{>serverInformationList instance.container}}
|
||||
{{else}}
|
||||
{{>serverInformationForm instance.container}}
|
||||
{{/if}}
|
||||
{{#section 'dialogFooter'}}{{#unless (eq instance.container.mode.get "list")}}{{!
|
||||
}}<button type="button" class="btn btn-default js-back">Back</button>{{!
|
||||
}}{{/unless}}{{/section}}
|
||||
{{/dialogSimple}}
|
||||
</template>
|
||||
+5
-2
@@ -1,5 +1,8 @@
|
||||
import { Template } from 'meteor/templating';
|
||||
import { ReactiveVar } from 'meteor/reactive-var';
|
||||
|
||||
Template.serverInformationModal.onCreated(function() {
|
||||
var instance = Template.instance();
|
||||
const instance = Template.instance();
|
||||
instance.container = {
|
||||
mode: new ReactiveVar('list'),
|
||||
serverType: new ReactiveVar(null),
|
||||
@@ -14,7 +17,7 @@ Template.serverInformationModal.onCreated(function() {
|
||||
});
|
||||
|
||||
Template.serverInformationModal.events({
|
||||
'click .js-back, click [data-dismiss=modal]': function(event, instance) {
|
||||
'click .js-back'(event, instance) {
|
||||
instance.container.resetState();
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user