Skip to content
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

Fix label-important to label-danger #16

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions src/upgrader.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,15 +314,27 @@
},

{
title: "Upgrade Label Classes.",
title: "Add Default Label Class.",
description: "Changes <code>.label</code> to <code>.label.label-default</code>",
run: function(doc) {
var count = 0;
var types = [];

var defaults = $(doc).find(".label:not(.label-success, .label-warning, .label-important, .label-info, .label-inverse)");
count += defaults.addClass("label-default");

return (count > 0) ? count + ' Replaced' : false;
}
},

{
title: "Upgrade Old Label Classes.",
description: "Changes <code>.label.label-important</code> to <code>.label.label-default</code>",
run: function(doc) {
var count = 0;

var items = $(doc).find(".label.label-important");
count += items.addClass("label-danger").removeClass("label-important");

return (count > 0) ? count + ' Replaced' : false;
}
}
Expand Down Expand Up @@ -364,4 +376,4 @@
}

window.BootstrapUpgrader = Upgrader;
})()
})()