fixws and 'new' button in grid query

This commit is contained in:
Massimo Di Pierro
2011-12-05 11:39:42 -06:00
parent 01f6f82cdf
commit d281acb421
305 changed files with 8352 additions and 8032 deletions
@@ -4,4 +4,4 @@ border-radius: 10px;
-webkit-border-radius: 10px;
}.calendar table{margin:0px;font-size:11px;color:#000;cursor:default;font-family:tahoma,verdana,sans-serif;}.calendar .button{text-align:center;padding:1px;color:#fff;background:#000;}.calendar .nav{background:#000;color:#fff}.calendar thead .title{font-weight:bold;padding:1px;background:#000;color:#fff;text-align:center;}.calendar thead .name{padding:2px;text-align:center;background:#bbb;}.calendar thead .weekend{color:#f00;}.calendar thead .hilite {background-color:#666;}.calendar thead .active{padding:2px 0 0 2px;background-color:#c4c0b8;}.calendar tbody .day{width:2em;text-align:right;padding:2px 4px 2px 2px;}.calendar tbody .day.othermonth{color:#aaa;}.calendar tbody .day.othermonth.oweekend{color:#faa;}.calendar table .wn{padding:2px 3px 2px 2px;background:#bbb;}.calendar tbody .rowhilite td{background:#ddd;}.calendar tbody td.hilite{background:#bbb;}.calendar tbody td.active{background:#bbb;}.calendar tbody td.selected{font-weight:bold;background:#ddd;}.calendar tbody td.weekend{color:#f00;}.calendar tbody td.today{font-weight:bold;color:#00f;}.calendar tbody .disabled{color:#999;}.calendar tbody .emptycell{visibility:hidden;}.calendar tbody .emptyrow{display:none;}.calendar tfoot .ttip{background:#bbb;padding:1px;background:#000;color:#fff;text-align:center;}.calendar tfoot .hilite{background:#ddd;}.calendar tfoot .active{}.calendar .combo{position:absolute;display:none;width:4em;top:0;left:0;cursor:default;background:#e4e0d8;padding:1px;z-index:100;}.calendar .combo .label,.calendar .combo .label-IEfix{text-align:center;padding:1px;}.calendar .combo .label-IEfix{width:4em;}.calendar .combo .active{background:#c4c0b8;}.calendar .combo .hilite{background:#048;color:#fea;}.calendar td.time{padding:1px 0;text-align:center;background-color:#bbb;}.calendar td.time .hour,.calendar td.time .minute,.calendar td.time .ampm{padding:0 3px 0 4px;font-weight:bold;}.calendar td.time .ampm{text-align:center;}.calendar td.time .colon{padding:0 2px 0 3px;font-weight:bold;}.calendar td.time span.hilite{}.calendar td.time span.active{border-color:#f00;background-color:#000;color:#0f0;}.hour,.minute{font-size:2em;}
#CP_hourcont{z-index:99;padding:0;position:absolute;border:1px dashed #666;background-color:#eee;display:none;}#CP_minutecont{z-index:99;background-color:#ddd;padding:1px;position:absolute;width:45px;display:none;}.floatleft{float:left;}.CP_hour{z-index:99;padding:1px;font-family:Arial,Helvetica,sans-serif;font-size:9px;white-space:nowrap;cursor:pointer;width:35px;}.CP_minute{z-index:99;padding:1px;font-family:Arial,Helvetica,sans-serif;font-size:9px;white-space:nowrap;cursor:pointer;width:auto;}.CP_over{background-color:#fff;z-index:99}
#CP_hourcont{z-index:99;padding:0;position:absolute;border:1px dashed #666;background-color:#eee;display:none;}#CP_minutecont{z-index:99;background-color:#ddd;padding:1px;position:absolute;width:45px;display:none;}.floatleft{float:left;}.CP_hour{z-index:99;padding:1px;font-family:Arial,Helvetica,sans-serif;font-size:9px;white-space:nowrap;cursor:pointer;width:35px;}.CP_minute{z-index:99;padding:1px;font-family:Arial,Helvetica,sans-serif;font-size:9px;white-space:nowrap;cursor:pointer;width:auto;}.CP_over{background-color:#fff;z-index:99}
+21 -21
View File
@@ -1,21 +1,21 @@
.statusbar {padding-top: 2px; padding-bottom: 2px; border: 0; margin-bottom: 60px;
background: url('../images/menu.png') repeat-x; }
.statusbar a, .statusbar a:visited {color: #406361}
a, a:visited, a:hover, h1,h2,h3,h4,h5 {color: #658883}
.wrapper { background: url('../images/back-02.png') repeat-x; padding-top:10px;}
h1 { font-size: 32px }
h2 { font-size: 24px }
h3 { font-size: 20px }
h4 { font-size: 14px }
sup { font-size: 0.5em; line-height: 2em; vertical-align: top;}
.frame { border: 3px solid #959595; margin-bottom: 5px; }
ul { list-style: circle outside;}
.announce { position:absolute;align:center;color:white;top:120px;font-weight:bold;text-align:center;
}
.announce a { color: white !important;}
input:focus,textarea:focus {background:#f0f0f0!important}
table.downloads { width:100%; }
table.downloads th, table.downloads td {text-align:center;}
table.downloads a.button { width: 150px; }
th,td {padding-right: 10px;}
.statusbar {padding-top: 2px; padding-bottom: 2px; border: 0; margin-bottom: 60px;
background: url('../images/menu.png') repeat-x; }
.statusbar a, .statusbar a:visited {color: #406361}
a, a:visited, a:hover, h1,h2,h3,h4,h5 {color: #658883}
.wrapper { background: url('../images/back-02.png') repeat-x; padding-top:10px;}
h1 { font-size: 32px }
h2 { font-size: 24px }
h3 { font-size: 20px }
h4 { font-size: 14px }
sup { font-size: 0.5em; line-height: 2em; vertical-align: top;}
.frame { border: 3px solid #959595; margin-bottom: 5px; }
ul { list-style: circle outside;}
.announce { position:absolute;align:center;color:white;top:120px;font-weight:bold;text-align:center;
}
.announce a { color: white !important;}
input:focus,textarea:focus {background:#f0f0f0!important}
table.downloads { width:100%; }
table.downloads th, table.downloads td {text-align:center;}
table.downloads a.button { width: 150px; }
th,td {padding-right: 10px;}
+1
View File
@@ -626,3 +626,4 @@
}
@@ -89,7 +89,7 @@ ul.sf-menu li li li.sfHover ul {
padding-bottom: 0.25em;
color: #959595;
}
.sf-menu li:hover, .sf-menu a:focus, .sf-menu a:active, .sf-menu li.sfHover, .sf-menu a:hover {
.sf-menu li:hover, .sf-menu a:focus, .sf-menu a:active, .sf-menu li.sfHover, .sf-menu a:hover {
color: #FFFFFF;
background-color: #303030;
outline: 0;
@@ -109,7 +109,7 @@ ul.sf-menu li li li.sfHover ul {
width: 10px;
height: 10px;
text-indent: -999em;
overflow: hidden;
overflow: hidden;
background: url('../images/arrows-ffffff.png') no-repeat -10px -100px; /* 8-bit indexed alpha png. IE6 gets solid image only */
}
a > .sf-sub-indicator { /* give all except IE6 the correct values */
@@ -149,3 +149,4 @@ li.sfHover > a > .sf-sub-indicator {
.sf-shadow ul.sf-shadow-off {
background: transparent;
}
+10 -9
View File
@@ -50,22 +50,22 @@ html, body {
.footer, .push {
height: 6em;
padding: 1em 0;
clear: both;
clear: both;
}
.footer-content {position: relative; bottom: -4em; width: 100%;}
.auth_navbar {
white-space: nowrap;
.auth_navbar {
white-space: nowrap;
}
/* Sticky footer end */
body {
background-color: #FFFFFF;
background-color: #FFFFFF;
}
.footer {
background-color: #ECECEC;
background-color: #ECECEC;
}
.header {
@@ -94,7 +94,7 @@ td.w2p_fl, td.w2p_fc { padding-top: 4px; }
a, a:visited, a:hover { color:#0069D6}
/*********** web2py specific ***********/
/*********** web2py specific ***********/
div.flash {
font-weight: bold;
display: none;
@@ -169,7 +169,7 @@ div.error {
.copyright {float: left;}
/* #MEDIA QUERIES SECTION */
/* All Mobile Sizes (devices and browser) */
@media only screen and (max-width: 767px) {
@@ -210,7 +210,7 @@ div.error {
}
.web2py_grid thead th {
background-color:#EAEAEA;
background-color:#EAEAEA;
padding: 10px 5px 10px 5px;
line-height: 13.5px;
vertical-align: middle;
@@ -263,7 +263,7 @@ div.error {
.web2py_console input[type=submit],
.web2py_console input[type=button],
.web2py_console button {
line-height: 20px;
line-height: 20px;
margin-right: 5px; display: inline-block;
padding: 3px 5px 3px 5px;
font-family: 'lucida grande', tahoma, verdana, arial, sans-serif;
@@ -348,3 +348,4 @@ color: #222;
border-radius:2px;
}
.ie9 #query_panel {padding-bottom:2px;}
File diff suppressed because one or more lines are too long
+116 -116
View File
@@ -1,116 +1,116 @@
$(function(){
// hide/show header
$('#close-open-top a').bind('click', function() {
if($('header:visible').length) {
$('img', this).attr('src', 'images/open.png');
} else {
$('img', this).attr('src', 'images/close.png');
}
$('header').slideToggle('slow');
return false;
});
// tabs
$('.tab_content').hide();
$('ul.tabs li:first').addClass('active').show();
$('.tab_content:first').show();
$('ul.tabs li').click(function() {
$('ul.tabs li').removeClass('active');
$(this).addClass('active');
$('.tab_content').hide();
var activeTab = $(this).find('a').attr('href');
$(activeTab).fadeIn();
return false;
});
// hide/show default text when user focuses on newsletter subscribe field
var defaultEmailTxt = $('#email-address').val();
$('#email-address').focus(function() {
if ($('#email-address').val() == defaultEmailTxt) {
$('#email-address').val('');
}
});
$('#email-address').blur(function() {
if ($('#email-address').val() == '') {
$('#email-address').val(defaultEmailTxt);
}
});
// Lightbox
$(".gallery a[rel^='prettyPhoto']").prettyPhoto({animationSpeed:'slow',theme:'dark_rounded',slideshow:4000, autoplay_slideshow: false});
// Tipsy
$('#social li a img').tipsy({delayIn: 1200, delayOut: 1200, gravity: 's'});
// init newsletter subscription AJAX handling
$('#newslettersubmit').click(function() { $('#newsletterform').submit(); return false; });
$('#newsletterform').ajaxForm({dataType: 'json',
timeout: 2000,
success: newsletterResponse});
// Twitter script config
if ($('#tweet').length) {
getTwitters('tweet', {
id: 'envatowebdesign',
count: 3,
enableLinks: true,
ignoreReplies: true,
template: '"%text%" <a class="meta" href="http://twitter.com/%user_screen_name%/status/%id%">%time%</a>'});
}
// init contact form validation and AJAX handling
if ($("#contactform").length > 0) {
$("#contactform").validate({ rules: { name: "required",
email: { required: true, email: true },
message: "required"},
messages: { name: "This field is required.",
email: { required: "This field is required.",
email: "Please enter a valied email address."},
message: "This field is required."},
submitHandler: function(form) { $(form).ajaxSubmit({dataType: 'json', success: contactFormResponse}); }
});
}
});
// handle newsletter subscribe AJAX response
function newsletterResponse(response) {
if (response.responseStatus == 'err') {
if (response.responseMsg == 'ajax') {
alert('Error - this script can only be invoked via an AJAX call.');
} else if (response.responseMsg == 'fileopen') {
alert('Error opening $emailsFile. Please refer to documentation for help.');
} else if (response.responseMsg == 'email') {
alert('Please enter a valid email address.');
} else if (response.responseMsg == 'duplicate') {
alert('You are already subscribed to our newsletter.');
} else if (response.responseMsg == 'filewrite') {
alert('Error writing to $emailsFile. Please refer to documentation for help.');
} else {
alert('Undocumented error. Please refresh the page and try again.');
}
} else if (response.responseStatus == 'ok') {
alert('Thank you for subscribing to our newsletter! We will not abuse your address.');
} else {
alert('Undocumented error. Please refresh the page and try again.');
}
} // newsletterResponse
// handle contact form AJAX response
function contactFormResponse(response) {
if (response.responseStatus == 'err') {
if (response.responseMsg == 'ajax') {
alert('Error - this script can only be invoked via an AJAX call.');
} else if (response.responseMsg == 'notsent') {
alert('We are having some mail server issues. Please refresh the page or try again later.');
} else {
alert('Undocumented error. Please refresh the page and try again.');
}
} else if (response.responseStatus == 'ok') {
alert('Thank you for contacting us! We\'ll get back to you ASAP.');
} else {
alert('Undocumented error. Please refresh the page and try again.');
}
} // contactFormResponse
$(function(){
// hide/show header
$('#close-open-top a').bind('click', function() {
if($('header:visible').length) {
$('img', this).attr('src', 'images/open.png');
} else {
$('img', this).attr('src', 'images/close.png');
}
$('header').slideToggle('slow');
return false;
});
// tabs
$('.tab_content').hide();
$('ul.tabs li:first').addClass('active').show();
$('.tab_content:first').show();
$('ul.tabs li').click(function() {
$('ul.tabs li').removeClass('active');
$(this).addClass('active');
$('.tab_content').hide();
var activeTab = $(this).find('a').attr('href');
$(activeTab).fadeIn();
return false;
});
// hide/show default text when user focuses on newsletter subscribe field
var defaultEmailTxt = $('#email-address').val();
$('#email-address').focus(function() {
if ($('#email-address').val() == defaultEmailTxt) {
$('#email-address').val('');
}
});
$('#email-address').blur(function() {
if ($('#email-address').val() == '') {
$('#email-address').val(defaultEmailTxt);
}
});
// Lightbox
$(".gallery a[rel^='prettyPhoto']").prettyPhoto({animationSpeed:'slow',theme:'dark_rounded',slideshow:4000, autoplay_slideshow: false});
// Tipsy
$('#social li a img').tipsy({delayIn: 1200, delayOut: 1200, gravity: 's'});
// init newsletter subscription AJAX handling
$('#newslettersubmit').click(function() { $('#newsletterform').submit(); return false; });
$('#newsletterform').ajaxForm({dataType: 'json',
timeout: 2000,
success: newsletterResponse});
// Twitter script config
if ($('#tweet').length) {
getTwitters('tweet', {
id: 'envatowebdesign',
count: 3,
enableLinks: true,
ignoreReplies: true,
template: '"%text%" <a class="meta" href="http://twitter.com/%user_screen_name%/status/%id%">%time%</a>'});
}
// init contact form validation and AJAX handling
if ($("#contactform").length > 0) {
$("#contactform").validate({ rules: { name: "required",
email: { required: true, email: true },
message: "required"},
messages: { name: "This field is required.",
email: { required: "This field is required.",
email: "Please enter a valied email address."},
message: "This field is required."},
submitHandler: function(form) { $(form).ajaxSubmit({dataType: 'json', success: contactFormResponse}); }
});
}
});
// handle newsletter subscribe AJAX response
function newsletterResponse(response) {
if (response.responseStatus == 'err') {
if (response.responseMsg == 'ajax') {
alert('Error - this script can only be invoked via an AJAX call.');
} else if (response.responseMsg == 'fileopen') {
alert('Error opening $emailsFile. Please refer to documentation for help.');
} else if (response.responseMsg == 'email') {
alert('Please enter a valid email address.');
} else if (response.responseMsg == 'duplicate') {
alert('You are already subscribed to our newsletter.');
} else if (response.responseMsg == 'filewrite') {
alert('Error writing to $emailsFile. Please refer to documentation for help.');
} else {
alert('Undocumented error. Please refresh the page and try again.');
}
} else if (response.responseStatus == 'ok') {
alert('Thank you for subscribing to our newsletter! We will not abuse your address.');
} else {
alert('Undocumented error. Please refresh the page and try again.');
}
} // newsletterResponse
// handle contact form AJAX response
function contactFormResponse(response) {
if (response.responseStatus == 'err') {
if (response.responseMsg == 'ajax') {
alert('Error - this script can only be invoked via an AJAX call.');
} else if (response.responseMsg == 'notsent') {
alert('We are having some mail server issues. Please refresh the page or try again later.');
} else {
alert('Undocumented error. Please refresh the page and try again.');
}
} else if (response.responseStatus == 'ok') {
alert('Thank you for contacting us! We\'ll get back to you ASAP.');
} else {
alert('Undocumented error. Please refresh the page and try again.');
}
} // contactFormResponse
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -66,4 +66,4 @@ function _getFileType(itemSrc){if(itemSrc.match(/youtube\.com\/watch/i)){return'
function _buildOverlay(caller){$('body').append(settings.markup);$pp_pic_holder=$('.pp_pic_holder'),$ppt=$('.ppt'),$pp_overlay=$('div.pp_overlay');if(isSet&&settings.overlay_gallery){currentGalleryPage=0;toInject="";for(var i=0;i<pp_images.length;i++){if(!pp_images[i].match(/\b(jpg|jpeg|png|gif)\b/gi)){classname='default';}else{classname='';}
toInject+="<li class='"+classname+"'><a href='#'><img src='"+pp_images[i]+"' width='50' alt='' /></a></li>";};toInject=settings.gallery_markup.replace(/{gallery}/g,toInject);$pp_pic_holder.find('#pp_full_res').after(toInject);$pp_pic_holder.find('.pp_gallery .pp_arrow_next').click(function(){$.prettyPhoto.changeGalleryPage('next');$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find('.pp_gallery .pp_arrow_previous').click(function(){$.prettyPhoto.changeGalleryPage('previous');$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find('.pp_content').hover(function(){$pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeIn();},function(){$pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeOut();});itemWidth=52+5;$pp_pic_holder.find('.pp_gallery ul li').each(function(i){$(this).css({'position':'absolute','left':i*itemWidth});$(this).find('a').unbind('click').click(function(){$.prettyPhoto.changePage(i);$.prettyPhoto.stopSlideshow();return false;});});};if(settings.slideshow){$pp_pic_holder.find('.pp_nav').prepend('<a href="#" class="pp_play">Play</a>')
$pp_pic_holder.find('.pp_nav .pp_play').click(function(){$.prettyPhoto.startSlideshow();return false;});}
$pp_pic_holder.attr('class','pp_pic_holder '+settings.theme);$pp_overlay.css({'opacity':0,'height':$(document).height(),'width':$(window).width()}).bind('click',function(){if(!settings.modal)$.prettyPhoto.close();});$('a.pp_close').bind('click',function(){$.prettyPhoto.close();return false;});$('a.pp_expand').bind('click',function(e){if($(this).hasClass('pp_expand')){$(this).removeClass('pp_expand').addClass('pp_contract');doresize=false;}else{$(this).removeClass('pp_contract').addClass('pp_expand');doresize=true;};_hideContent(function(){$.prettyPhoto.open();});return false;});$pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').bind('click',function(){$.prettyPhoto.changePage('previous');$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').bind('click',function(){$.prettyPhoto.changePage('next');$.prettyPhoto.stopSlideshow();return false;});_center_overlay();};return this.unbind('click.prettyphoto').bind('click.prettyphoto',$.prettyPhoto.initialize);};function grab_param(name,url){name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var regexS="[\\?&]"+name+"=([^&#]*)";var regex=new RegExp(regexS);var results=regex.exec(url);return(results==null)?"":results[1];}})(jQuery);
$pp_pic_holder.attr('class','pp_pic_holder '+settings.theme);$pp_overlay.css({'opacity':0,'height':$(document).height(),'width':$(window).width()}).bind('click',function(){if(!settings.modal)$.prettyPhoto.close();});$('a.pp_close').bind('click',function(){$.prettyPhoto.close();return false;});$('a.pp_expand').bind('click',function(e){if($(this).hasClass('pp_expand')){$(this).removeClass('pp_expand').addClass('pp_contract');doresize=false;}else{$(this).removeClass('pp_contract').addClass('pp_expand');doresize=true;};_hideContent(function(){$.prettyPhoto.open();});return false;});$pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').bind('click',function(){$.prettyPhoto.changePage('previous');$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').bind('click',function(){$.prettyPhoto.changePage('next');$.prettyPhoto.stopSlideshow();return false;});_center_overlay();};return this.unbind('click.prettyphoto').bind('click.prettyphoto',$.prettyPhoto.initialize);};function grab_param(name,url){name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var regexS="[\\?&]"+name+"=([^&#]*)";var regex=new RegExp(regexS);var results=regex.exec(url);return(results==null)?"":results[1];}})(jQuery);
File diff suppressed because one or more lines are too long
+10 -9
View File
@@ -28,7 +28,7 @@
o.retainPath=($.inArray($$[0],o.$path)>-1);
$$.hideSuperfishUl();
if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}
},o.delay);
},o.delay);
},
getMenu = function($menu){
var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
@@ -36,7 +36,7 @@
return menu;
},
addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };
return this.each(function() {
var s = this.serial = sf.o.length;
var o = $.extend({},sf.defaults,op);
@@ -45,20 +45,20 @@
.filter('li:has(ul)').removeClass(o.pathClass);
});
sf.o[s] = sf.op = o;
$('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {
if (o.autoArrows) addArrow( $('>a:first-child',this) );
})
.not('.'+c.bcClass)
.hideSuperfishUl();
var $a = $('a',this);
$a.each(function(i){
var $li = $a.eq(i).parents('li');
$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
});
o.onInit.call(this);
}).each(function() {
var menuClasses = [c.menuClass];
if (sf.op.dropShadows && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass);
@@ -159,7 +159,7 @@
// cache all ul elements
$ULs = $$.find('ul');
// loop through each ul in menu
$ULs.each(function(i) {
$ULs.each(function(i) {
// cache this ul
var $ul = $ULs.eq(i);
// get all (li) children of this ul
@@ -199,7 +199,7 @@
$childUl.css(offsetDirection,$ul.width());
});
});
});
};
// expose defaults
@@ -208,15 +208,16 @@
maxWidth : 25, // requires em unit.
extraWidth : 0 // extra width can ensure lines don't sometimes turn over due to slight browser differences in how they round-off values
};
})(jQuery); // plugin code ends
/**
* hoverIntent r6 // 2011.02.26 // jQuery 1.5.1+
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
*
*
* @param f onMouseOver function || An object with configuration options
* @param g onMouseOut function || Nothing (use configuration options object)
* @author Brian Cherne brian(at)cherne(dot)net
*/
(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev])}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev])};var handleHover=function(e){var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t)}if(e.type=="mouseenter"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)}}};return this.bind('mouseenter',handleHover).bind('mouseleave',handleHover)}})(jQuery);
+10 -9
View File
@@ -18,7 +18,7 @@ function ajax(u,s,t) {
}
if (pcs.length>0){query = pcs.join("&");}
}
jQuery.ajax({type: "POST", url: u, data: query, success: function(msg) { if(t) { if(t==':eval') eval(msg); else jQuery("#" + t).html(msg); } } });
jQuery.ajax({type: "POST", url: u, data: query, success: function(msg) { if(t) { if(t==':eval') eval(msg); else jQuery("#" + t).html(msg); } } });
}
String.prototype.reverse = function () { return this.split('').reverse().join('');};
@@ -30,9 +30,9 @@ function web2py_ajax_fields(target) {
var date_format = (typeof w2p_ajax_date_format != 'undefined') ? w2p_ajax_date_format : "%Y-%m-%d";
var datetime_format = (typeof w2p_ajax_datetime_format != 'undefined') ? w2p_ajax_datetime_format : "%Y-%m-%d %H:%M:%S";
jQuery("input.date",target).each(function() {Calendar.setup({inputField:this, ifFormat:date_format, showsTime:false });});
jQuery("input.datetime",target).each(function() {Calendar.setup({inputField:this, ifFormat:datetime_format, showsTime: true, timeFormat: "24" });});
jQuery("input.datetime",target).each(function() {Calendar.setup({inputField:this, ifFormat:datetime_format, showsTime: true, timeFormat: "24" });});
jQuery("input.time",target).each(function(){jQuery(this).timeEntry();});
};
function web2py_ajax_init(target) {
@@ -43,7 +43,7 @@ function web2py_ajax_init(target) {
web2py_ajax_fields(target);
};
jQuery(function() {
jQuery(function() {
var flash = jQuery('.flash');
flash.hide();
if(flash.html()) flash.slideDown();
@@ -68,7 +68,7 @@ function web2py_trap_link(target) {
web2py_ajax_page('get',link.attr('href'),[],target);
e.preventDefault();
});
});
});
}
function web2py_ajax_page(method,action,data,target) {
jQuery.ajax({'type':method,'url':action,'data':data,
@@ -77,16 +77,16 @@ function web2py_ajax_page(method,action,data,target) {
xhr.setRequestHeader('web2py-component-element',target);},
'complete':function(xhr,text){
var html=xhr.responseText;
var content=xhr.getResponseHeader('web2py-component-content');
var content=xhr.getResponseHeader('web2py-component-content');
var command=xhr.getResponseHeader('web2py-component-command');
var flash=xhr.getResponseHeader('web2py-component-flash');
var t = jQuery('#'+target);
if(content=='prepend') t.prepend(html);
if(content=='prepend') t.prepend(html);
else if(content=='append') t.append(html);
else if(content!='hide') t.html(html);
else if(content!='hide') t.html(html);
web2py_trap_form(action,target);
web2py_trap_link(target);
web2py_ajax_init('#'+target);
web2py_ajax_init('#'+target);
if(command) eval(command);
if(flash) jQuery('.flash').html(flash).slideDown();
}
@@ -104,3 +104,4 @@ function web2py_comet(url,onmessage,onopen,onclose) {
return true; // supported
} else return false; // not supported
}