}
});
if (document.location.href.indexOf('month=normal') == -1) {
- if (navigator.userAgent.indexOf('Android') > -1) {
+ if (is_mobile()) {
$('<meta name="viewport" content="width=device-width, initial-scale=0.75" />').insertAfter('title');
$('#view').val('onemonth');
$.invoke('Calendar/OneMonth', {month: '<?=date('Y-m')?>'}, month_actions);
return SERVICE_ROOT + path;
}
+function is_mobile()
+{
+ return navigator.userAgent.indexOf('Android') > -1
+ || navigator.userAgent.indexOf('iPhone') > -1
+ || navigator.userAgent.indexOf('iPad') > -1;
+}
+
(function($){
$.fn.ltag = function() {
return this.prop("tagName").toLowerCase();