Skip to content

Commit

Permalink
Some size optimizations.
Browse files Browse the repository at this point in the history
  • Loading branch information
hperrin committed Jun 15, 2012
1 parent 58a6e1d commit aa54ddf
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 110 deletions.
117 changes: 55 additions & 62 deletions jquery.pnotify.default.css
Original file line number Diff line number Diff line change
@@ -1,90 +1,83 @@
/*
Document : jquery.pnotify.default.css
Created on : Nov 23, 2009, 3:14:10 PM
Author : Hunter Perrin
Version : 1.2.0dev
Link : http://pinesframework.org/pnotify/
Description:
Default styling for Pines Notify jQuery plugin.
Document : jquery.pnotify.default.css
Created on : Nov 23, 2009, 3:14:10 PM
Author : Hunter Perrin
Version : 1.2.0
Link : http://pinesframework.org/pnotify/
Description:
Default styling for Pines Notify jQuery plugin.
*/

/* Notice
----------------------------------*/
/* -- Notice */
.ui-pnotify {
top: 25px;
right: 25px;
position: absolute;
height: auto;
/* Ensure that the notices are on top of everything else. */
z-index: 9999;
top: 25px;
right: 25px;
position: absolute;
height: auto;
/* Ensures notices are above everything */
z-index: 9999;
}
/* This hides position: fixed from IE6, which doesn't understand it. */
/* Hides position: fixed from IE6 */
html > body .ui-pnotify {
position: fixed;
position: fixed;
}
.ui-pnotify .ui-pnotify-shadow {
-webkit-box-shadow: 0px 2px 10px rgba(50, 50, 50, 0.5);
-moz-box-shadow: 0px 2px 10px rgba(50, 50, 50, 0.5);
-o-box-shadow: 0px 2px 10px rgba(50, 50, 50, 0.5);
box-shadow: 0px 2px 10px rgba(50, 50, 50, 0.5);
-webkit-box-shadow: 0px 2px 10px rgba(50, 50, 50, 0.5);
-moz-box-shadow: 0px 2px 10px rgba(50, 50, 50, 0.5);
box-shadow: 0px 2px 10px rgba(50, 50, 50, 0.5);
}
.ui-pnotify-container {
background-position: 0 0;
padding: .8em;
height: 100%;
margin: 0;
background-position: 0 0;
padding: .8em;
height: 100%;
margin: 0;
}
.ui-pnotify-sharp {
-webkit-border-radius: 0;
-moz-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.ui-pnotify-closer, .ui-pnotify-sticker {
float: right;
margin-left: .2em;
float: right;
margin-left: .2em;
}
.ui-pnotify-title {
display: block;
margin-bottom: .4em;
display: block;
margin-bottom: .4em;
}
.ui-pnotify-text {
display: block;
display: block;
}
.ui-pnotify-icon, .ui-pnotify-icon span {
display: block;
float: left;
margin-right: .2em;
display: block;
float: left;
margin-right: .2em;
}
/* History Pulldown
----------------------------------*/
/* -- History Pulldown */
.ui-pnotify-history-container {
position: absolute;
top: 0;
right: 18px;
width: 70px;
border-top: none;
padding: 0;
-webkit-border-top-left-radius: 0;
-moz-border-top-left-radius: 0;
-o-border-top-left-radius: 0;
border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-moz-border-top-right-radius: 0;
-o-border-top-right-radius: 0;
border-top-right-radius: 0;
/* Ensure that the history container is on top of the notices. */
z-index: 10000;
position: absolute;
top: 0;
right: 18px;
width: 70px;
border-top: none;
padding: 0;
-webkit-border-top-left-radius: 0;
-moz-border-top-left-radius: 0;
border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-moz-border-top-right-radius: 0;
border-top-right-radius: 0;
/* Ensures history container is above notices. */
z-index: 10000;
}
.ui-pnotify-history-container .ui-pnotify-history-header {
padding: 2px;
padding: 2px;
}
.ui-pnotify-history-container button {
cursor: pointer;
display: block;
width: 100%;
cursor: pointer;
display: block;
width: 100%;
}
.ui-pnotify-history-container .ui-pnotify-history-pulldown {
display: block;
margin: 0 auto;
display: block;
margin: 0 auto;
}
28 changes: 14 additions & 14 deletions jquery.pnotify.default.icons.css
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
/*
Document : jquery.pnotify.default.icons.css
Created on : Nov 24, 2009, 2:58:21 PM
Author : Hunter Perrin
Version : 1.1.1
Link : http://pinesframework.org/pnotify/
Description:
Pines Icon styling for Pines Notify.
Document : jquery.pnotify.default.icons.css
Created on : Nov 24, 2009, 2:58:21 PM
Author : Hunter Perrin
Version : 1.2.0
Link : http://pinesframework.org/pnotify/
Description:
Pines Icon styling for Pines Notify.
*/

.ui-pnotify .picon {
background-color: transparent;
background-repeat: no-repeat;
background-position: center center;
width: 17px;
height: 17px;
background-color: transparent;
background-repeat: no-repeat;
background-position: center center;
width: 17px;
height: 17px;
}
.ui-pnotify-title {
line-height: 17px;
min-height: 17px;
line-height: 17px;
min-height: 17px;
}
37 changes: 19 additions & 18 deletions jquery.pnotify.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery Pines Notify (pnotify) Plugin 1.2.0dev
* jQuery Pines Notify (pnotify) Plugin 1.2.0
*
* http://pinesframework.org/pnotify/
* Copyright (c) 2009-2012 Hunter Perrin
Expand Down Expand Up @@ -30,10 +30,10 @@
closer: "ui-icon ui-icon-close",
pin_up: "ui-icon ui-icon-pin-w",
pin_down: "ui-icon ui-icon-pin-s",
history_menu: "ui-state-default ui-corner-bottom",
history_button: "ui-state-default ui-corner-all",
history_button_hover: "ui-state-hover",
history_handle: "ui-icon ui-icon-grip-dotted-horizontal"
hi_menu: "ui-state-default ui-corner-bottom",
hi_btn: "ui-state-default ui-corner-all",
hi_btnhov: "ui-state-hover",
hi_hnd: "ui-icon ui-icon-grip-dotted-horizontal"
},
bootstrap: {
container: "alert",
Expand All @@ -48,10 +48,10 @@
closer: "icon-remove",
pin_up: "icon-pause",
pin_down: "icon-play",
history_menu: "well",
history_button: "btn",
history_button_hover: "",
history_handle: "icon-chevron-down"
hi_menu: "well",
hi_btn: "btn",
hi_btnhov: "",
hi_hnd: "icon-chevron-down"
}
};
// Set global variables.
Expand Down Expand Up @@ -244,7 +244,7 @@
pnotify.container.addClass("ui-pnotify-shadow");

// The current version of Pines Notify.
pnotify.pnotify_version = "1.2.0dev";
pnotify.pnotify_version = "1.2.0";

// This function is for updating the notice.
pnotify.pnotify = function(options) {
Expand Down Expand Up @@ -293,6 +293,7 @@
else
pnotify.text_container.html(opts.insert_brs ? String(opts.text).replace(/\n/g, "<br />") : opts.text).slideDown(200);
}
// Update values for history menu access.
pnotify.pnotify_history = opts.history;
pnotify.pnotify_hide = opts.hide;
// Change the notice type.
Expand Down Expand Up @@ -723,20 +724,20 @@
var history_menu = jwindow.data("pnotify_history");
if (typeof history_menu == "undefined") {
history_menu = $("<div />", {
"class": "ui-pnotify-history-container "+styles.history_menu,
"class": "ui-pnotify-history-container "+styles.hi_menu,
"mouseleave": function(){
history_menu.animate({top: "-"+history_handle_top+"px"}, {duration: 100, queue: false});
}
})
.append($("<div />", {"class": "ui-pnotify-history-header", "text": "Redisplay"}))
.append($("<button />", {
"class": "ui-pnotify-history-all "+styles.history_button,
"class": "ui-pnotify-history-all "+styles.hi_btn,
"text": "All",
"mouseenter": function(){
$(this).addClass(styles.history_button_hover);
$(this).addClass(styles.hi_btnhov);
},
"mouseleave": function(){
$(this).removeClass(styles.history_button_hover);
$(this).removeClass(styles.hi_btnhov);
},
"click": function(){
// Display all notices. (Disregarding non-history notices.)
Expand All @@ -753,13 +754,13 @@
}
}))
.append($("<button />", {
"class": "ui-pnotify-history-last "+styles.history_button,
"class": "ui-pnotify-history-last "+styles.hi_btn,
"text": "Last",
"mouseenter": function(){
$(this).addClass(styles.history_button_hover);
$(this).addClass(styles.hi_btnhov);
},
"mouseleave": function(){
$(this).removeClass(styles.history_button_hover);
$(this).removeClass(styles.hi_btnhov);
},
"click": function(){
// Look up the last history notice, and display it.
Expand All @@ -785,7 +786,7 @@

// Make a handle so the user can pull down the history tab.
var handle = $("<span />", {
"class": "ui-pnotify-history-pulldown "+styles.history_handle,
"class": "ui-pnotify-history-pulldown "+styles.hi_hnd,
"mouseenter": function(){
history_menu.animate({top: "0"}, {duration: 100, queue: false});
}
Expand Down
Loading

0 comments on commit aa54ddf

Please sign in to comment.