From: <be...@us...> - 2012-04-15 11:50:25
|
Revision: 9330 http://xoops.svn.sourceforge.net/xoops/?rev=9330&view=rev Author: beckmi Date: 2012-04-15 11:50:18 +0000 (Sun, 15 Apr 2012) Log Message: ----------- updated jGrowl to 1.2.6 (mowaffaq/mamba) Modified Paths: -------------- XoopsCore/branches/2.5.x/2.5.5/docs/changelog.250.txt XoopsCore/branches/2.5.x/2.5.5/htdocs/modules/system/themes/zetadigme/css/style.css XoopsCore/branches/2.5.x/2.5.5/htdocs/themes/suico/css/style.css XoopsCore/branches/2.5.x/2.5.5/htdocs/xoops.css XoopsCore/branches/2.5.x/2.5.5/htdocs/xoops_lib/Frameworks/jquery/plugins/jquery.jgrowl.js Modified: XoopsCore/branches/2.5.x/2.5.5/docs/changelog.250.txt =================================================================== --- XoopsCore/branches/2.5.x/2.5.5/docs/changelog.250.txt 2012-04-15 03:01:40 UTC (rev 9329) +++ XoopsCore/branches/2.5.x/2.5.5/docs/changelog.250.txt 2012-04-15 11:50:18 UTC (rev 9330) @@ -10,6 +10,7 @@ Updated: - phpThumb to 1.7.11 (mamba) + - jGrowl to 1.2.6 (mowaffaq/mamba) =============================== 2011/03/14: Version 2.5.5 RC Modified: XoopsCore/branches/2.5.x/2.5.5/htdocs/modules/system/themes/zetadigme/css/style.css =================================================================== --- XoopsCore/branches/2.5.x/2.5.5/htdocs/modules/system/themes/zetadigme/css/style.css 2012-04-15 03:01:40 UTC (rev 9329) +++ XoopsCore/branches/2.5.x/2.5.5/htdocs/modules/system/themes/zetadigme/css/style.css 2012-04-15 11:50:18 UTC (rev 9330) @@ -1,4 +1,4 @@ - + /* $Id: style.css 3963 2009-11-30 01:08:59Z kris_fr $ */ /* IMPORTANT, PLEASE RESPECT THIS SEMANTIC ORDER !!! : position box; width; heigth; margin; background-color; background-image; padding; content (color, style font, ...); border ... */ @@ -438,7 +438,7 @@ -moz-box-shadow: 2px 2px 10px rgba(102, 102, 102, .5); -webkit-box-shadow: 2px 2px 10px rgba(102, 102, 102, .5) ; } -.jGrowl-notification .header { font-size : 1.2em; /*padding-top: .75em;*/ padding-bottom: .75em;} +.jGrowl-notification .jGrowl-header { font-size : 1.2em; /*padding-top: .75em;*/ padding-bottom: .75em;} #xo-module-log {text-align: center;} .logger {margin: 0 auto !important; text-align: left;} Modified: XoopsCore/branches/2.5.x/2.5.5/htdocs/themes/suico/css/style.css =================================================================== --- XoopsCore/branches/2.5.x/2.5.5/htdocs/themes/suico/css/style.css 2012-04-15 03:01:40 UTC (rev 9329) +++ XoopsCore/branches/2.5.x/2.5.5/htdocs/themes/suico/css/style.css 2012-04-15 11:50:18 UTC (rev 9330) @@ -1,4 +1,4 @@ -/* +/* * Suico theme * In memory of Marcello Brandao * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ @@ -646,4 +646,4 @@ -moz-box-shadow: 2px 2px 10px rgba(102, 102, 102, .5); -webkit-box-shadow: 2px 2px 10px rgba(102, 102, 102, .5) ; } -.jGrowl-notification .header { font-size : 1.2em; /*padding-top: .75em;*/ padding-bottom: .75em;} +.jGrowl-notification .jGrowl-header { font-size : 1.2em; /*padding-top: .75em;*/ padding-bottom: .75em;} Modified: XoopsCore/branches/2.5.x/2.5.5/htdocs/xoops.css =================================================================== --- XoopsCore/branches/2.5.x/2.5.5/htdocs/xoops.css 2012-04-15 03:01:40 UTC (rev 9329) +++ XoopsCore/branches/2.5.x/2.5.5/htdocs/xoops.css 2012-04-15 11:50:18 UTC (rev 9330) @@ -1,4 +1,4 @@ -/* $Id$ */ +/* $Id$ */ /*=== FORMAT BASIC ELEMENTS, can be overwritten in theme styles ===*/ table {width: 100%; border-collapse:collapse; border-spacing: 0;} @@ -96,7 +96,7 @@ body > div.jGrowl.top-right {right: 25%; left: 25%; top: 2px;} body > div.jGrowl.bottom-left {left:0; bottom:0;} body > div.jGrowl.bottom-right {right:0; bottom:0;} -body > div.jGrowl.center {top:0; left:0;} +body > div.jGrowl.center {top:0; width: 50%;left:25%;} body > div.jGrowl.top-left {left:0; top:0;} /* jGrowl Box style */ div.center div.jGrowl-notification, div.center div.jGrowl-closer {margin-left: auto; margin-right: auto;} @@ -118,9 +118,9 @@ -khtml-border-radius: 5px; } div.jGrowl div.jGrowl-notification {min-height: 40px;} -div.jGrowl div.jGrowl-notification div.header {font-weight: bold; font-size: 10px;} +div.jGrowl div.jGrowl-notification div.jGrowl-header {font-weight: bold; font-size: 10px;} /* jGrowl Close button */ -div.jGrowl div.jGrowl-notification div.close {float: right; font-weight: bold; font-size: 12px; cursor: pointer;} +div.jGrowl div.jGrowl-notification div.jGrowl-close {float: right; font-weight: bold; font-size: 12px; cursor: pointer;} div.jGrowl div.jGrowl-closer {height: 15px; padding-top: 4px; padding-bottom: 4px; cursor: pointer; font-size: 11px; font-weight: bold; text-align: center;} /*=== GENERIC CLASS, for use in themes, modules and contents ===*/ Modified: XoopsCore/branches/2.5.x/2.5.5/htdocs/xoops_lib/Frameworks/jquery/plugins/jquery.jgrowl.js =================================================================== --- XoopsCore/branches/2.5.x/2.5.5/htdocs/xoops_lib/Frameworks/jquery/plugins/jquery.jgrowl.js 2012-04-15 03:01:40 UTC (rev 9329) +++ XoopsCore/branches/2.5.x/2.5.5/htdocs/xoops_lib/Frameworks/jquery/plugins/jquery.jgrowl.js 2012-04-15 11:50:18 UTC (rev 9330) @@ -1,11 +1,11 @@ /** - * jGrowl 1.2.4 + * jGrowl 1.2.6 * * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. * * Written by Stan Lemon <sto...@gm...> - * Last updated: 2009.12.13 + * Last updated: 2011.03.27 * * jGrowl is a jQuery plugin implementing unobtrusive userland notifications. These * notifications function similarly to the Growl Framework available for @@ -14,6 +14,19 @@ * To Do: * - Move library settings to containers and allow them to be changed per container * + * Changes in 1.2.6 + * - Fixed js error when a notification is opening and closing at the same time + * + * Changes in 1.2.5 + * - Changed wrapper jGrowl's options usage to "o" instead of $.jGrowl.defaults + * - Added themeState option to control 'highlight' or 'error' for jQuery UI + * - Ammended some CSS to provide default positioning for nested usage. + * - Changed some CSS to be prefixed with jGrowl- to prevent namespacing issues + * - Added two new options - openDuration and closeDuration to allow + * better control of notification open and close speeds, respectively + * Patch contributed by Jesse Vincet. + * - Added afterOpen callback. Patch contributed by Russel Branca. + * * Changes in 1.2.4 * - Fixed IE bug with the close-all button * - Fixed IE bug with the filter CSS attribute (special thanks to gotwic) @@ -98,7 +111,7 @@ $.jGrowl = function( m , o ) { // To maintain compatibility with older version that only supported one instance we'll create the base container. if ( $('#jGrowl').size() == 0 ) - $('<div id="jGrowl"></div>').addClass($.jGrowl.defaults.position).appendTo('body'); + $('<div id="jGrowl"></div>').addClass( (o && o.position) ? o.position : $.jGrowl.defaults.position ).appendTo('body'); // Create a notification on the container. $('#jGrowl').jGrowl(m,o); @@ -137,19 +150,22 @@ header: '', group: '', sticky: false, - position: 'top-right', // Is this still needed? + position: 'top-right', glue: 'after', theme: 'default', + themeState: 'highlight', corners: '10px', check: 250, life: 3000, - speed: 'normal', + closeDuration: 'normal', + openDuration: 'normal', easing: 'swing', closer: true, closeTemplate: '×', closerTemplate: '<div>[ close all ]</div>', log: function(e,m,o) {}, beforeOpen: function(e,m,o) {}, + afterOpen: function(e,m,o) {}, open: function(e,m,o) {}, beforeClose: function(e,m,o) {}, close: function(e,m,o) {}, @@ -173,6 +189,12 @@ create: function( message , o ) { var o = $.extend({}, this.defaults, o); + /* To keep backward compatibility with 1.24 and earlier, honor 'speed' if the user has set it */ + if (typeof o.speed !== 'undefined') { + o.openDuration = o.speed; + o.closeDuration = o.speed; + } + this.notifications.push({ message: message , options: o }); o.log.apply( this.element , [this.element,message,o] ); @@ -183,13 +205,16 @@ var message = notification.message; var o = notification.options; + // Support for jQuery theme-states, if this is not used it displays a widget header + o.themeState = (o.themeState == '') ? '' : 'ui-state-' + o.themeState; + var notification = $( - '<div class="jGrowl-notification ui-state-highlight ui-corner-all' + + '<div class="jGrowl-notification ' + o.themeState + ' ui-corner-all' + ((o.group != undefined && o.group != '') ? ' ' + o.group : '') + '">' + - '<div class="close">' + o.closeTemplate + '</div>' + - '<div class="header">' + o.header + '</div>' + - '<div class="message">' + message + '</div></div>' - ).data("jGrowl", o).addClass(o.theme).children('div.close').bind("click.jGrowl", function() { + '<div class="jGrowl-close">' + o.closeTemplate + '</div>' + + '<div class="jGrowl-header">' + o.header + '</div>' + + '<div class="jGrowl-message">' + message + '</div></div>' + ).data("jGrowl", o).addClass(o.theme).children('div.jGrowl-close').bind("click.jGrowl", function() { $(this).parent().trigger('jGrowl.close'); }).parent(); @@ -211,39 +236,45 @@ $('div.jGrowl-notification:first', self.element).before(notification); } - $(this).animate(o.animateOpen, o.speed, o.easing, function() { + $(this).animate(o.animateOpen, o.openDuration, o.easing, function() { // Fixes some anti-aliasing issues with IE filters. if ($.browser.msie && (parseInt($(this).css('opacity'), 10) === 1 || parseInt($(this).css('opacity'), 10) === 0)) this.style.removeAttribute('filter'); - $(this).data("jGrowl").created = new Date(); + if ( $(this).data("jGrowl") != null ) // Happens when a notification is closing before it's open. + $(this).data("jGrowl").created = new Date(); + + $(this).trigger('jGrowl.afterOpen'); }); } + }).bind('jGrowl.afterOpen', function() { + o.afterOpen.apply( notification , [notification,message,o,self.element] ); }).bind('jGrowl.beforeClose', function() { if ( o.beforeClose.apply( notification , [notification,message,o,self.element] ) != false ) $(this).trigger('jGrowl.close'); }).bind('jGrowl.close', function() { // Pause the notification, lest during the course of animation another close event gets called. $(this).data('jGrowl.pause', true); - $(this).animate(o.animateClose, o.speed, o.easing, function() { - $(this).remove(); - var close = o.close.apply( notification , [notification,message,o,self.element] ); - - if ( $.isFunction(close) ) - close.apply( notification , [notification,message,o,self.element] ); + $(this).animate(o.animateClose, o.closeDuration, o.easing, function() { + if ( $.isFunction(o.close) ) { + if ( o.close.apply( notification , [notification,message,o,self.element] ) !== false ) + $(this).remove(); + } else { + $(this).remove(); + } }); }).trigger('jGrowl.beforeOpen'); /** Optional Corners Plugin **/ - if ( $.fn.corner != undefined ) $(notification).corner( o.corners ); + if ( o.corners != '' && $.fn.corner != undefined ) $(notification).corner( o.corners ); /** Add a Global Closer if more than one notification exists **/ if ( $('div.jGrowl-notification:parent', self.element).size() > 1 && $('div.jGrowl-closer', self.element).size() == 0 && this.defaults.closer != false ) { - $(this.defaults.closerTemplate).addClass('jGrowl-closer ui-state-highlight ui-corner-all').addClass(this.defaults.theme) + $(this.defaults.closerTemplate).addClass('jGrowl-closer ' + this.defaults.themeState + ' ui-corner-all').addClass(this.defaults.theme) .appendTo(self.element).animate(this.defaults.animateOpen, this.defaults.speed, this.defaults.easing) .bind("click.jGrowl", function() { - $(this).siblings().children('div.close').trigger("click.jGrowl"); + $(this).siblings().trigger("jGrowl.beforeClose"); if ( $.isFunction( self.defaults.closer ) ) { self.defaults.closer.apply( $(this).parent()[0] , [$(this).parent()[0]] ); @@ -256,7 +287,7 @@ update: function() { $(this.element).find('div.jGrowl-notification:parent').each( function() { if ( $(this).data("jGrowl") != undefined && $(this).data("jGrowl").created != undefined && - ($(this).data("jGrowl").created.getTime() + $(this).data("jGrowl").life) < (new Date()).getTime() && + ($(this).data("jGrowl").created.getTime() + parseInt($(this).data("jGrowl").life)) < (new Date()).getTime() && $(this).data("jGrowl").sticky != true && ($(this).data("jGrowl.pause") == undefined || $(this).data("jGrowl.pause") != true) ) { @@ -281,7 +312,7 @@ this.element = $(e).addClass('jGrowl').append('<div class="jGrowl-notification"></div>'); this.interval = setInterval( function() { $(e).data('jGrowl.instance').update(); - }, this.defaults.check); + }, parseInt(this.defaults.check)); if ($.browser.msie && parseInt($.browser.version) < 7 && !window["XMLHttpRequest"]) { $(this.element).addClass('ie6'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |