Page 4 of 7

Working with plugins

Posted: Sat Jan 18, 2014 8:16 am
by Igor

Hello,

Sorry, no updates yet. We need more time.


Working with plugins

Posted: Sat Jan 18, 2014 10:30 pm
by Alex GG

Oleg, Can you help me with this?
I ́m also struggling on how to take the value, once the user rate a bussiness...I want to take this value, and do an average with last saved value on DB...and finally refresh this rating and save it again in DB...
I know how to do this,..just help on how to capture that value (for example, if anyones hits 2 starts, I would assign to a variable that value)..

thanks


Working with plugins

Posted: Mon Jan 20, 2014 5:11 pm
by Alex GG

No one here? should I post a new topic??
Please help!


Working with plugins

Posted: Mon Jan 20, 2014 5:21 pm
by Maryna Brodina

Hello! We're working on your request. I'll post and update soon.


Working with plugins

Posted: Mon Jan 20, 2014 5:23 pm
by Maryna Brodina

Please post your public app link and steps to reproduce.


Working with plugins

Posted: Mon Jan 20, 2014 5:48 pm
by Alex GG

http://appery.io/app/mobile-frame?src.....

just run the APP, and in starScreen is a list (REST) of different ids, with its corresponding name...there are 5 records, and for test purposes each has values from 1 up to 5.

What I ́m trying to do, is to show that rating, and then after clicking on the stars, take that value, asign to a variable, and make the average with the value in DB, and then refresh to show the actual rate...

hope my explanation helps..

But as i said before,,,I still get this error code along with the spinning circle in the screen: Error: cannot call methods on checkboxradio prior to initialization; attempted to call method 'refresh'


Working with plugins

Posted: Mon Jan 20, 2014 8:31 pm
by Maryna Brodina

In mapping use the following code: prevar inputText, inputChecked, allInputs, starsNumb = 6;currRatingId++;allInputs = '&#39for (var i = 1; i < starsNumb; i++) { allInputs += '<input name="star' + currRatingId + '" data-need-autorefresh="false" value="' + i + '" type="radio" class="star"' + ((value == i) ? ' checked="checked"' : '') + '&#47;>&#39} return allInputs;/pre2) On Source tab you would need to change 3157 line in WEB_RESOURCES - files - resources - lib - base - appery.js from prectx&#46;find("input[type='radio'], input[type='checkbox']")&#46;checkboxradio("refresh");/pretoprectx&#46;find("input[type='radio'], input[type='checkbox']")&#46;not('[data-need-autorefresh="false"]')&#46;checkboxradio("refresh");/pre3) To get number of selected stars do something like this pre$('[name=star1]:checked')&#46;val();/pre


Working with plugins

Posted: Mon Jan 20, 2014 9:16 pm
by Alex GG

MAryna: It still doesn ́t work...
this is what I have in mapping:
1)
var inputText, inputChecked, allInputs, starsNumb = 6;
inputText = '';
inputChecked = '';
currRatingId++;
allInputs = '';
for (var i = 1; i < starsNumb; i++) {
allInputs += ((value == i) ? inputChecked : inputText);
}
return allInputs;

Whit this code, It works well.

2) I replace the line 3157 with the code you gave me, and it still shows same error code :

Image

3) I use alert($('[name=star]:checked').val()); on click event of the panel (html) to get the number of selected stars, and get UNDEFINED on the alert...

Hope you can update this soon ,,Regards


Working with plugins

Posted: Mon Jan 20, 2014 9:47 pm
by Maryna Brodina

Sorry, there was added incorrect code, I updated it https://getsatisfaction.com/apperyio/.... Please try again.


Working with plugins

Posted: Tue Jan 21, 2014 12:12 am
by Alex GG

Super, you get 5 stars!!! It works ok now....thanks!!!