Import logic is getting large, give it space
This commit is contained in:
parent
9b249bad5b
commit
6ca400ca67
|
|
@ -49,8 +49,8 @@ class ImportExportController extends ControllerBehavior
|
|||
{
|
||||
parent::__construct($controller);
|
||||
|
||||
$this->addJs('js/october.importexport.js', 'core');
|
||||
$this->addCss('css/importexport.css', 'core');
|
||||
$this->addJs('js/october.import.js', 'core');
|
||||
$this->addCss('css/import.css', 'core');
|
||||
|
||||
/*
|
||||
* Build configuration
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
+function ($) { "use strict";
|
||||
|
||||
var ImportExportBehavior = function() {
|
||||
var ImportBehavior = function() {
|
||||
|
||||
this.bindColumnSorting = function() {
|
||||
/*
|
||||
|
|
@ -20,12 +20,18 @@
|
|||
var sortableOptions = {
|
||||
group: 'import-fields',
|
||||
usePlaceholderClone: true,
|
||||
nested: false
|
||||
nested: false,
|
||||
onDrop: $.proxy(this.onDropColumn, this)
|
||||
}
|
||||
|
||||
$('#importDbColumns > ul, .import-column-bindings > ul').sortable(sortableOptions)
|
||||
}
|
||||
|
||||
this.onDropColumn = function ($item, container, _super, event) {
|
||||
|
||||
_super($item, container)
|
||||
}
|
||||
|
||||
this.ignoreFileColumn = function(el) {
|
||||
var $el = $(el),
|
||||
$column = $el.closest('[data-column-id]')
|
||||
|
|
@ -53,5 +59,5 @@
|
|||
}
|
||||
}
|
||||
|
||||
$.oc.importExportBehavior = new ImportExportBehavior;
|
||||
$.oc.importBehavior = new ImportBehavior;
|
||||
}(window.jQuery);
|
||||
|
|
@ -13,5 +13,5 @@
|
|||
</div>
|
||||
|
||||
<script>
|
||||
$.oc.importExportBehavior.bindColumnSorting()
|
||||
$.oc.importBehavior.bindColumnSorting()
|
||||
</script>
|
||||
|
|
@ -13,14 +13,14 @@
|
|||
data-delay="300"
|
||||
data-placement="right"
|
||||
title="Ignore this column"
|
||||
onclick="$.oc.importExportBehavior.ignoreFileColumn(this)"
|
||||
onclick="$.oc.importBehavior.ignoreFileColumn(this)"
|
||||
>
|
||||
<i class="icon-close"></i>
|
||||
</a>
|
||||
<a
|
||||
href="javascript:;"
|
||||
class="column-label"
|
||||
onclick="$.oc.importExportBehavior.loadFileColumnSample(this)"
|
||||
onclick="$.oc.importBehavior.loadFileColumnSample(this)"
|
||||
>
|
||||
<?= $column ?>
|
||||
</a>
|
||||
|
|
@ -40,5 +40,5 @@
|
|||
</div>
|
||||
|
||||
<script>
|
||||
$.oc.importExportBehavior.bindColumnSorting()
|
||||
$.oc.importBehavior.bindColumnSorting()
|
||||
</script>
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
href="javascript:;"
|
||||
id="showIgnoredColumnsButton"
|
||||
class="btn btn-sm btn-default oc-icon-eye disabled"
|
||||
onclick="$.oc.importExportBehavior.showIgnoredColumns()">
|
||||
onclick="$.oc.importBehavior.showIgnoredColumns()">
|
||||
Show ignored columns
|
||||
</a>
|
||||
</div>
|
||||
Loading…
Reference in New Issue