Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

upgrade problem saving toggle val

Hi,
this is another upgrade problem
attached are s/s of builder settings, app in browser with the save result in localstorage and code used to save to array

1, the text in the toggle wont fit, it did in last builder.
How do I move the text to the left or reduce the font?

2.
when I click order in browser the following code is run to save this option to kebabsarray in local storage.
The text for toggles are set in builder, but my result in the array for toggles is on or off

All component names are correct
no errors in console

How do I save the text value in the array as the settings have changed in the new builder

Image

Image

code$grid = $(this).closest("[name=kebabfullgrid]");
save({'Kebab':$grid.find("[name=chickenpizza_item_label]").text(),
'Served_With':$grid.find("[name=thin_deeptoggle]").val(),
'Sauce':$grid.find("[name=saucetoggle]").val(),
//'Pricelabel':$grid.find("[name=pricelabel]").text(),
'Price':$grid.find("[name=chickenpizzaPricelabel]").text()},
"kebabArray");
/code

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

upgrade problem saving toggle val

Michael,

Please try to use this code:
pre$("[name=COMPONENT_NAME] :selected").val()/pre

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

upgrade problem saving toggle val

Hi,
I changed js on "thin_deeptoggle" as suggested,I tried both variations but the result is still on or off

code$grid = $(this).closest("[name=kebabfullgrid]");
save({'Kebab':$grid.find("[name=chickenpizza_item_label]").text(),
'Served_With':$grid.find("[name=thin_deeptoggle] :selected").val(),
'Sauce':$grid.find("[name=saucetoggle]").val(),
//'Pricelabel':$grid.find("[name=pricelabel]").text(),
'Price':$grid.find("[name=chickenpizzaPricelabel]").text()},
"kebabArray");/code

code$grid = $(this).closest("[name=kebabfullgrid]");
save({'Kebab':$grid.find("[name=chickenpizza_item_label]").text(),
'Served_With':$("[name=thin_deeptoggle] :selected").val(),
'Sauce':$grid.find("[name=saucetoggle]").val(),
//'Pricelabel':$grid.find("[name=pricelabel]").text(),
'Price':$grid.find("[name=chickenpizzaPricelabel]").text()},
"kebabArray");/code

also any ideas here
the text in the toggle wont fit, it did in last builder.
How do I move the text to the left or reduce the font?

thanks

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

upgrade problem saving toggle val

This is an ugrade to new builder,
very disapointed in the level of support.
New build would be outside of your support, but update to new builder with a published app used to be alot better.

very pissed off

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

upgrade problem saving toggle val

Hello Michael,

We are very sorry that you are disappointed with our support, but I'm not sure that I understand you correctly - we support the new builder of our platform for sure.
[quote:]How do I move the text to the left or reduce the font?[/quote]
1) please add css file
2) write styles for your toggle component
3) don't forget about weight of the css rules, if you will not succeed at first time

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

upgrade problem saving toggle val

OK Evegene,
I will find css to move text,

however look at what happen when the toggle is switched,
there is no text.

Image

These problems are caused by my attempts to upgrade this fully functional old builder app

this code does not save the text value of the toggle, just saves "on or off" examples tried shown above
$("[name=COMPONENT_NAME] :selected").val()

I fully understand your support policy if its a new build,
but supports reluctance to help me fix these upgrade issues makes no sense

These topisc is also unresolved and 11 days old
https://getsatisfaction.com/apperyio/...

And this is 12 days old also unresolved
https://getsatisfaction.com/apperyio/...

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

upgrade problem saving toggle val

Evegene
thank you, this css workd for my toggles, centered the text and solved the no text problem

can you help any further on saving the text value?

.ui-flipswitch{
width: 6.875em!important;
}
.ui-flipswitch.ui-flipswitch-active{
width: 2.875em!important;
padding-left: 4em!important;
}
.ui-flipswitch.ui-flipswitch-active .ui-btn.ui-flipswitch-on{
margin-left: 1.1em;
}
.ui-flipswitch .ui-btn.ui-flipswitch-on{
text-indent: -4.5em!important;
}
.ui-flipswitch .ui-flipswitch-off {
text-indent: 0.2em;
}

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

upgrade problem saving toggle val

Update
I have this code to change the values of toggle, I run it on page show
it worked in old builder but in new it causes error in colsole

Image

codeAppery("thin_deeptoggle")&#46;empty()&#46;append("<option value='Fresh Salad' >Salad</option><option value='Portion Of Chips'>Chips</option>")&#46;trigger('create');
Appery("thin_deeptoggle")&#46;parent()&#46;find("&#46;ui-slider-label-a")&#46;text("Chips");
Appery("thin_deeptoggle")&#46;parent()&#46;find("&#46;ui-slider-label-b")&#46;text("Salad");
/code

does this code need altering for new builder?

when I click order it will save the first kebab in the grid with the value from the code but when any of the other order buttons in the grid are clicked it shows original value "on and off"

[{"Kebab":"Donner Kebab ","Served_With":"Fresh Salad","Sauce":"Chilli Sauce","Price":"£5.00"},
{"Kebab":"Shish Kebab ","Served_With":"off","Sauce":"on","Price":"£8.50"}]

Image

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

upgrade problem saving toggle val

Hello Michael!

It is better to save text based on slider id, instead of searching it in the structure
so if it is on - text is equal to text1, else text2

[quote:]does this code need altering for new builder?[/quote]
You work in a wrong way in terms of Appery.io, because you are changing page structure in run time, which is causing problems, thus layout, logic, event handlers will be lost.
You can easily change toggle text in the editor
http://gyazo.com/dfbe96521e209af3b93a...

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

upgrade problem saving toggle val

Hi Maryna,
thanks for reply,
I have the label text changed in editor, see screenshot.

Image

The code I was trying to use is the code used in old builder to set the toggle values so when I save users choice I save "portion of chips or frersh salad" instead of default values of "on and off"

Maryna I didnt think the app would almost need rebuilding for the new builder
js is not my strong point as you probally know and js is outside of your support so Im pretty well stuck.
I have 12 or more toggles that need to work like it used to in old builder

can you help here or is it possible to change toggle value in more properties for toggle in editor?

thanks again

Return to “Issues”