Skip to content

Commit

Permalink
almost at primary secondary and tertiary bold to render after initial…
Browse files Browse the repository at this point in the history
… on change
  • Loading branch information
Kell-Stack committed Oct 3, 2019
1 parent 58f2915 commit 025ce01
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 110 deletions.
74 changes: 37 additions & 37 deletions src/bundle/config_bundle.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/bundle/desktop_bundle.js

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions src/html/config.html
Expand Up @@ -26,19 +26,22 @@ <h1> Table Sorting Plugin</h1>
<br>
<div class="dropdown"></div>

<section class="colandsortchoice">
<div class "dropDownContainer">
<section class="dropDownContainer">
<div class="primary">
<div class="dropdown2"></div>
<div class="dropdown3"></div>
</div>
<div class "dropDownContainer">
<div class="secondary">
<div class="dropdown2"></div>
<div class="dropdown3"></div>
</div>

<div class="tertiary">
<div class="dropdown4"></div>
<div class="dropdown5"></div>
</div>

</section>


</section>


Expand Down
92 changes: 26 additions & 66 deletions src/js/config.js
Expand Up @@ -63,13 +63,13 @@ import {
var subTable = getSubTableList(rsp)
console.log("😡", subTable)
var excluded = excludedFieldTypes(rsp)
console.log(excluded)
console.log("this will be exclusions",excluded)

var getTableColumns = (formLayout, event) => {
var items = [{
label: '--------',
value: '--------',
isDisabled: false
isDisabled: true
}]
const layout = formLayout.layout

Expand All @@ -90,36 +90,6 @@ import {
return items
}

// var dropdown = new kintoneUIComponent.Dropdown({
// items: [{
// label: 'Orange',
// value: 'Orange',
// isDisabled: true
// },
// {
// label: 'Banana',
// value: 'Banana',
// isDisabled: false
// }
// ],
// value: 'Banana'
// });

// var body = document.getElementsByTagName("BODY")[0];
// body.appendChild(dropdown.render());

// dropdown.addItem({
// label: 'Lemon',
// value: 'Lemon',
// isDisabled: true
// });

var tables = {
label: {
table: []
}
}

var dropdown = new kintoneUIComponent.Dropdown({
items: subTable,
value: '--------'
Expand All @@ -129,10 +99,9 @@ import {

dropdown.on('change', function (event) {
console.log("🙃🙃🙃", event);
console.log("bruhhhhh")

//ideally your nex two questions would appear

var chooseColAndSort = (input) => {
// var chooseColAndSort = () => {
var tableColumn = getTableColumns(rsp, event)
var dropdown2 = new kintoneUIComponent.Dropdown({
items: tableColumn,
Expand All @@ -145,7 +114,13 @@ import {
})

var dropdown3 = new kintoneUIComponent.Dropdown({
items: [{
items: [
{
label: '--------',
value: '--------',
isDisabled: true
},
{
label: 'Ascending',
value: 'Ascending',
isDisabled: false
Expand All @@ -154,29 +129,30 @@ import {
label: 'Descending',
value: 'Descending',
isDisabled: false
},
]
}
],
value: '--------'
});

// dropdown2.on('change', function (event) {
// console.log("🙃hey kelly", event);
$('.dropdown2')
.text("Please choose the column from " + event + " you'd like to sort: ")
.append(dropdown2.render())

$('.dropdown4')
.text("Please choose the column from " + event + " you'd like to sort: ")
.append(dropdown4.render())


dropdown2.on('change', function (event) {
console.log("🙃hey kelly", event);

$('.dropdown3')
.text("Then the way you'd like to sort " + event + " ")
.append(dropdown3.render());
})
}

$('.primary').html("primarrrry").css("font-weight", "bold");



// $('.secondary').html("primary secondary").css("font-weight", "bold");
// $('.tertiary').html("primary tertiary").css("font-weight", "bold");



// $('.colandsortchoice').text("primary primary");
chooseColAndSort()

// document.getElementById('primary').chooseColAndSort()
// chooseColAndSort(document.getElementById('.colandsortchoice'))
Expand Down Expand Up @@ -222,20 +198,4 @@ import {

})(kintone.$PLUGIN_ID);

//BUGS
// 1. when you select a drop down of the table you want towork with, a pop up table appears
// that *will* allow you to choose the columns' of that table HOWEVER if you choose that
// same table again in the initial dropdown a new table pops out, will need to disable
// once chose

// 2. if you switch the table the popup doesn't change it just gets added

// 3. popup table is aggregating all column names as opposed to table specific column names

var data = {"0": a, "1": b}

Number(data["0"])

var data = [a,b]
data[0]
data.indexOf(a)

0 comments on commit 025ce01

Please sign in to comment.