Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Table Maker #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 0 additions & 79 deletions src/icon.svg

This file was deleted.

7 changes: 5 additions & 2 deletions src/resources/js/importable.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,18 @@
addImportButtons: function() {
var self = this;
var main = $('#main');
var tableFields = main.find('.field[data-type="craft\\\\fields\\\\Table"]:not([data-importable])');
var tableFields = main.find('.field[data-type="craft\\\\fields\\\\Table"]:not([data-importable]), .field[data-type="supercool\\\\tablemaker\\\\fields\\\\TableMakerField"] #fields-tiers-rows-field:not([data-importable])');

tableFields.each(function() {
$('.input', this).append('<div class="btn icon ' + self.settings.importButtonSelector + ' right" data-icon="list">Import</div>');
$(this).attr('data-importable','active');
});
},
render: function() {
this.addImportButtons();
var self = this;
setTimeout(function() {
self.addImportButtons();
}, 1000);
},
templates: {
importHud: function() {
Expand Down