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