Oct 10

The timepicker addon adds a timepicker to jQuery UI Datepicker, thus the datepicker and slider components (jQueryUI) are required for using any of these.

To create your own regional objects per region, use the setDefaults method to tie these together. Setting datepicker and timepicker regionals separtely will help ensure proper wording when only using datepicker or timepicker. Here is an example:

$.datepicker.regional['ru'] = {
closeText: ‘Закрыть’,
prevText: ‘<Пред',
nextText: 'След>‘,
currentText: ‘Сегодня’,
monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь',
'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
'Июл','Авг','Сен','Окт','Ноя','Дек'],
dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
weekHeader: ‘Не’,
dateFormat: ‘dd.mm.yy’,
firstDay: 1,
isRTL: false,
showMonthAfterYear: false,
yearSuffix: ”
};
$.datepicker.setDefaults($.datepicker.regional['ru']);

$.timepicker.regional['ru'] = {
timeOnlyTitle: ‘Выберите время’,
timeText: ‘Время’,
hourText: ‘Часы’,
minuteText: ‘Минуты’,
secondText: ‘Секунды’,
millisecText: ‘миллисекунды’,
currentText: ‘Теперь’,
closeText: ‘Закрыть’,
ampm: false
};
$.timepicker.setDefaults($.timepicker.regional['ru']);

$(‘#example4′).datetimepicker({
timeFormat: ‘h:m’,
separator: ‘ ‘
});

documentation here

Oct 3

in the google custom search results pagination will not keep the number of page just visited,
for example if you go to the page 3 and go back via browser button you will get results from the first page.

To keep visited page some custom modifications should be implemented:

step 1:
In the function searchCompleteCallback(), we need to add to all links parameter &page= with calculated page counter

ex:

if(back_page == '')
 back_page = 0;
else
 back_page = (back_page*10)-10;

with javascript append all links with this parameter.

…’&page=’+back_page;

step 2:

in the function google.setOnLoadCallback(function(){ set the parameter with google custeom search key,to use this application, and concatinate parameter with page number

var customSearchControl = new google.search.CustomSearchControl(‘gcs_customer_key’+'&start=’.$_GET['page']);

This will point the results from the google custom serach to the right page number.

Powered By Wordpress - Theme Provided By Wordpress Theme - Credit Loan