Browse Source

removing alerts for this release.

pull/245/head
connors 11 years ago
parent
commit
c75bcfd66f
  1. 3
      Gruntfile.js
  2. 49
      dist/ratchet.css
  3. 37
      dist/ratchet.js
  4. 6
      examples/app-default/index.html
  5. 36
      lib/js/alerts.js
  6. 52
      lib/sass/alerts.scss
  7. 1
      lib/sass/ratchet.scss

3
Gruntfile.js

@ -31,8 +31,7 @@ module.exports = function(grunt) {
'<%= meta.srcPath %>js/push.js',
'<%= meta.srcPath %>js/segmented-controllers.js',
'<%= meta.srcPath %>js/sliders.js',
'<%= meta.srcPath %>js/toggles.js',
'<%= meta.srcPath %>js/alerts.js'
'<%= meta.srcPath %>js/toggles.js'
],
dest: '<%= meta.distPath %><%= pkg.name %>.js'
}

49
dist/ratchet.css vendored

@ -979,55 +979,6 @@ input[type="button"] {
background-color: rgba(0, 0, 0, 0.15);
}
.alert {
position: fixed;
right: 15px;
left: 15px;
bottom: 65px;
padding: 15px;
color: #fff;
border-radius: 3px;
z-index: 10;
-webkit-transition: opacity;
transition: opacity;
-webkit-transition-duration: 0.2s;
transition-duration: 0.2s;
-webkit-transition-timing-function: linear;
transition-timing-function: linear;
}
.alert .close {
position: relative;
top: -2px;
float: right;
color: inherit;
cursor: pointer;
-webkit-transition: opacity;
transition: opacity;
-webkit-transition-duration: 0.2s;
transition-duration: 0.2s;
-webkit-transition-timing-function: linear;
transition-timing-function: linear;
}
.alert .close:active {
opacity: .6;
}
.alert.dismiss {
opacity: 0;
}
.alert-positive {
background-color: rgba(92, 184, 92, 0.97);
}
.alert-negative {
background-color: rgba(217, 83, 79, 0.97);
}
.alert-inline {
position: static;
margin: 15px;
}
.modal {
position: fixed;
top: 0;

37
dist/ratchet.js vendored

@ -783,40 +783,3 @@
});
}();
/* ----------------------------------
* ALERT v0.0.1
* Licensed under The MIT License
* http://opensource.org/licenses/MIT
* ---------------------------------- */
!function () {
var findAlerts = function (target) {
var i, alerts = document.querySelectorAll('a');
for (; target && target !== document; target = target.parentNode) {
for (i = alerts.length; i--;) { if (alerts[i] === target) return target; }
}
};
var onAlertHidden = function () {
var alert = getAlert(event);
alert.style.display = 'none';
alert.removeEventListener('webkitTransitionEnd', onAlertHidden);
}
var getAlert = function (event) {
var alertDismiss = findAlerts(event.target);
if (alertDismiss && alertDismiss.hash) return document.querySelector(alertDismiss.hash);
};
window.addEventListener('click', function (event) {
var alert = getAlert(event);
if (alert) {
if (alert && alert.classList.contains('alert')) alert.classList.add('dismiss');
alert.addEventListener('webkitTransitionEnd', onAlertHidden);
event.preventDefault();
}
});
}();

6
examples/app-default/index.html

@ -18,12 +18,6 @@
</head>
<body>
<!-- Alert -->
<div id="myAlert" class="alert alert-negative">
<a href="#myAlert" class="icon icon-share close"></a>
<strong>This</strong> is an alert.
</div>
<header class="bar-nav">
<h1 class="title">Movie finder</h1>
</header>

36
lib/js/alerts.js

@ -1,36 +0,0 @@
/* ----------------------------------
* ALERT v0.0.1
* Licensed under The MIT License
* http://opensource.org/licenses/MIT
* ---------------------------------- */
!function () {
var findAlerts = function (target) {
var i, alerts = document.querySelectorAll('a');
for (; target && target !== document; target = target.parentNode) {
for (i = alerts.length; i--;) { if (alerts[i] === target) return target; }
}
};
var onAlertHidden = function () {
var alert = getAlert(event);
alert.style.display = 'none';
alert.removeEventListener('webkitTransitionEnd', onAlertHidden);
}
var getAlert = function (event) {
var alertDismiss = findAlerts(event.target);
if (alertDismiss && alertDismiss.hash) return document.querySelector(alertDismiss.hash);
};
window.addEventListener('click', function (event) {
var alert = getAlert(event);
if (alert) {
if (alert && alert.classList.contains('alert')) alert.classList.add('dismiss');
alert.addEventListener('webkitTransitionEnd', onAlertHidden);
event.preventDefault();
}
});
}();

52
lib/sass/alerts.scss

@ -1,52 +0,0 @@
//
// Alerts
// --------------------------------------------------
.alert {
position: fixed;
right: 15px;
left: 15px;
bottom: $bar-tab-height + 15px;
padding: 15px;
color: #fff;
border-radius: 3px;
z-index: 10;
@include transition(opacity);
@include transition-duration(.2s);
@include transition-timing-function(linear);
.close {
position: relative;
top: -2px;
float: right;
color: inherit;
cursor: pointer;
@include transition(opacity);
@include transition-duration(.2s);
@include transition-timing-function(linear);
&:active {
opacity: .6;
}
}
&.dismiss {
opacity: 0;
}
}
// Positive alert (Default color is green)
.alert-positive {
background-color: transparentize($positive-color, .03);
}
// Negative alert (Default color is red)
.alert-negative {
background-color: transparentize($negative-color, .03);
}
// Inline alert
.alert-inline {
position: static;
margin: 15px;
}

1
lib/sass/ratchet.scss

@ -18,7 +18,6 @@
@import "badges.scss";
@import "segmented-controllers.scss";
@import "popovers.scss";
@import "alerts.scss";
// Javascript components
@import "modals.scss";

Loading…
Cancel
Save