+
Export |
+
Import |
+
<%= meta.name %> |
#{g.VERSION} |
Issues |
@@ -68,6 +72,10 @@ Settings =
className: 'dialog'
innerHTML: html
+ $.on $('.export', Settings.dialog), 'click', Settings.export
+ $.on $('.import', Settings.dialog), 'click', Settings.import
+ $.on $('input', Settings.dialog), 'change', Settings.onImport
+
links = []
for section in Settings.sections
link = $.el 'a',
@@ -114,18 +122,6 @@ Settings =
section.scrollTop = 0
main: (section) ->
- section.innerHTML = """
-
-
-
-
-
-
- """
- $.on $('.export', section), 'click', Settings.export
- $.on $('.import', section), 'click', Settings.import
- $.on $('input', section), 'change', Settings.onImport
-
items = {}
inputs = {}
for key, obj of Config.main
@@ -201,7 +197,7 @@ Settings =
@nextElementSibling.click()
onImport: ->
return unless file = @files[0]
- output = @parentNode.nextElementSibling
+ output = $('.imp-exp-result')
unless confirm 'Your current settings will be entirely overwritten, are you sure?'
output.textContent = 'Import aborted.'
return