-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added linking feature #40
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
* Dual licensed under the MIT and GPL licenses. | ||
* | ||
* Date: February 24, 2012 | ||
* Version: 1.7.4 | ||
* Version: 1.7.4.1 | ||
*/ | ||
|
||
(function($){ | ||
|
@@ -80,7 +80,7 @@ | |
_is_setup: 0, | ||
_tpl_close: '<div class="gritter-close"></div>', | ||
_tpl_title: '<span class="gritter-title">[[title]]</span>', | ||
_tpl_item: '<div id="gritter-item-[[number]]" class="gritter-item-wrapper [[item_class]]" style="display:none"><div class="gritter-top"></div><div class="gritter-item">[[close]][[image]]<div class="[[class_name]]">[[title]]<p>[[text]]</p></div><div style="clear:both"></div></div><div class="gritter-bottom"></div></div>', | ||
_tpl_item: '<a href="[[href]]" id="gritter-item-[[number]]" class="gritter-item-wrapper [[item_class]]" style="display:none"><div class="gritter-item">[[close]][[image]]<div class="[[class_name]]">[[title]]<p>[[text]]</p></div><div style="clear:both"></div></div></a>', | ||
_tpl_wrap: '<div id="gritter-notice-wrapper"></div>', | ||
|
||
/** | ||
|
@@ -111,7 +111,8 @@ | |
sticky = params.sticky || false, | ||
item_class = params.class_name || $.gritter.options.class_name, | ||
position = $.gritter.options.position, | ||
time_alive = params.time || ''; | ||
time_alive = params.time || '', | ||
href = params.href || '#'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So if someone scrolls half way down the page, then clicks on the gritter message and href == '#', it'll jump to the top, right? If so, that needs to be stopped from happening. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you are correct sir. I will modify. On Mar 16, 2013, at 4:40 PM, Jordan Boesch [email protected] wrote:
|
||
|
||
this._verifyWrapper(); | ||
|
||
|
@@ -143,8 +144,8 @@ | |
} | ||
|
||
tmp = this._str_replace( | ||
['[[title]]', '[[text]]', '[[close]]', '[[image]]', '[[number]]', '[[class_name]]', '[[item_class]]'], | ||
[title, text, this._tpl_close, image_str, this._item_count, class_name, item_class], tmp | ||
['[[title]]', '[[text]]', '[[close]]', '[[image]]', '[[number]]', '[[class_name]]', '[[item_class]]','[[href]]'], | ||
[title, text, this._tpl_close, image_str, this._item_count, class_name, item_class, href], tmp | ||
); | ||
|
||
// If it's false, don't show another gritter message | ||
|
@@ -180,7 +181,8 @@ | |
}); | ||
|
||
// Clicking (X) makes the perdy thing close | ||
$(item).find('.gritter-close').click(function(){ | ||
$(item).find('.gritter-close').click(function(e){ | ||
e.preventDefault(); | ||
Gritter.removeSpecific(number, {}, null, true); | ||
}); | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be tested in IE7/8 before being considered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough. This is my first ever pull request. Give me some time to meet that requirement.
On Mar 16, 2013, at 4:42 PM, Jordan Boesch [email protected] wrote:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No prob! I appreciate the pull request :)
Jordan Boesch
www.boedesign.com
On Saturday, 16 March, 2013 at 4:48 PM, Isaac Shapira wrote: