Skip to content

Commit

Permalink
update bootstrap switch
Browse files Browse the repository at this point in the history
  • Loading branch information
onokumus committed Oct 12, 2013
1 parent af660b2 commit 52be955
Show file tree
Hide file tree
Showing 300 changed files with 62,730 additions and 1,700 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules/
nbproject/
nbproject/
.idea/
5 changes: 4 additions & 1 deletion dist/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,10 @@ body.padTop53 {
box-shadow: 1px 0px 0px #85d0e7;
}

.box:not(.dark) header .toolbar .nav > li > a {
color: #fff;
}

.box header .toolbar {
display: inline-table;
float: right;
Expand All @@ -849,7 +853,6 @@ body.padTop53 {

.box header .toolbar .nav > li > a {
padding-top: 9px;
color: #fff;
}

.box header .toolbar .nav > li > a:hover,
Expand Down
2 changes: 1 addition & 1 deletion dist/assets/css/main.min.css

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion dist/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,14 @@ function formGeneral() {
/*----------- END timepicker CODE -------------------------*/

/*----------- BEGIN toggleButtons CODE -------------------------*/
$('.make-switch').bootstrapSwitch();
// Resets to the regular style
$('#dimension-switch').bootstrapSwitch('setSizeClass', '');
// Sets a mini switch
$('#dimension-switch').bootstrapSwitch('setSizeClass', 'switch-mini');
// Sets a small switch
$('#dimension-switch').bootstrapSwitch('setSizeClass', 'switch-small');
// Sets a large switch
$('#dimension-switch').bootstrapSwitch('setSizeClass', 'switch-large');
/*----------- END toggleButtons CODE -------------------------*/

/*----------- BEGIN dualListBox CODE -------------------------*/
Expand Down
2 changes: 1 addition & 1 deletion dist/assets/js/main.min.js

Large diffs are not rendered by default.

27 changes: 13 additions & 14 deletions dist/assets/lib/cssbeautify/cssbeautify.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
return (ch >= 'a' && ch <= 'z') ||
(ch >= 'A' && ch <= 'Z') ||
(ch >= '0' && ch <= '9') ||
'-_*.:#'.indexOf(c) >= 0;
'-_*.:#[]'.indexOf(c) >= 0;
}

function appendIndent() {
Expand All @@ -89,13 +89,13 @@
}

function closeBlock() {
var ch;
var last;
depth -= 1;
formatted = trimRight(formatted);

if (autosemicolon) {
ch = formatted.charAt(formatted.length - 1);
if (ch !== ';' && ch !== '{') {
if (formatted.length > 0 && autosemicolon) {
last = formatted.charAt(formatted.length - 1);
if (last !== ';' && last !== '{') {
formatted += ';';
}
}
Expand Down Expand Up @@ -173,14 +173,13 @@
index += 1;
}
continue;
} else {
if (ch === '/' && ch2 === '*') {
comment = true;
formatted += ch;
formatted += ch2;
index += 1;
continue;
}
}
if (ch === '/' && ch2 === '*') {
comment = true;
formatted += ch;
formatted += ch2;
index += 1;
continue;
}

if (state === State.Start) {
Expand All @@ -199,7 +198,7 @@
}

// Selector or at-rule
if (isName(ch) || (ch === '[') || (ch === '@')) {
if (isName(ch) || (ch === '@')) {

// Clear trailing whitespaces and linefeeds.
str = trimRight(formatted);
Expand Down
1 change: 0 additions & 1 deletion dist/assets/lib/cssbeautify/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ <h3>Options:</h3>
<br clear="all"/>
<div class="footer"><strong>CSS Beautify</strong> is an open-source project from <a href="http://senchalabs.org">Sencha Labs</a>.<br>Check the repository at <a href="http://github.com/senchalabs/cssbeautify">github.com/senchalabs/cssbeautify</a>.</div>

</div>
<p><a href="http://github.com/senchalabs/cssbeautify"><img style="position: absolute; top: 0; right: 0; border: 0;" src="images/ribbon.png" alt="Fork me on GitHub"></a></p>
</div>

Expand Down
18 changes: 18 additions & 0 deletions dist/assets/lib/cssbeautify/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,24 @@ var tests = {
]
},

'@media directive (auto-semicolon)': {
input: [
'@media screen {',
' menu { color: navy }',
'}'
],
options: {
autosemicolon: true
},
expected: [
'@media screen {',
' menu {',
' color: navy;',
' }',
'}'
]
},

'URL': {
input: [
'menu { background-image: url(data:image/png;base64,AAAAAAA); }'
Expand Down
8 changes: 4 additions & 4 deletions dist/assets/lib/daterangepicker/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Date Range Picker for Twitter Bootstrap
# Date Range Picker for Bootstrap

![Improvely.com](http://i.imgur.com/LbAMf3D.png)

This date range picker component for Twitter Bootstrap creates a dropdown menu from which a user can
This date range picker component for Bootstrap creates a dropdown menu from which a user can
select a range of dates. I created it while building the UI for [Improvely](http://www.improvely.com),
which needed a way to select date ranges for reports.

Expand All @@ -15,7 +15,7 @@ into the text box. Otherwise, you can provide a custom callback function to rece

## Usage

This component relies on [Twitter Bootstrap](http://twitter.github.com/bootstrap/),
This component relies on [Bootstrap](http://getbootstrap.com),
[Moment.js](http://momentjs.com/) and [jQuery](http://jquery.com/).

Separate stylesheets are included for use with Bootstrap 2 or Bootstrap 3.
Expand Down Expand Up @@ -93,7 +93,7 @@ $('input[name="daterange"]').daterangepicker(

## License

This code is made available under the same license as Twitter Bootstrap. Moment.js is included in this repository
This code is made available under the same license as Bootstrap. Moment.js is included in this repository
for convenience. It is available under the [MIT license](http://www.opensource.org/licenses/mit-license.php).

--
Expand Down
3 changes: 2 additions & 1 deletion dist/assets/lib/daterangepicker/daterangepicker-bs2.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

.daterangepicker.dropdown-menu {
max-width: none;
z-index: 3000;
}

.daterangepicker.opensleft .ranges, .daterangepicker.opensleft .calendar {
Expand Down Expand Up @@ -231,4 +232,4 @@
.daterangepicker select.hourselect, .daterangepicker select.minuteselect, .daterangepicker select.ampmselect {
width: 60px;
margin-bottom: 0;
}
}
3 changes: 2 additions & 1 deletion dist/assets/lib/daterangepicker/daterangepicker-bs3.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

.daterangepicker.dropdown-menu {
max-width: none;
z-index: 3000;
}

.daterangepicker.opensleft .ranges, .daterangepicker.opensleft .calendar {
Expand Down Expand Up @@ -241,4 +242,4 @@
.daterangepicker select.hourselect, .daterangepicker select.minuteselect, .daterangepicker select.ampmselect {
width: 50px;
margin-bottom: 0;
}
}
13 changes: 7 additions & 6 deletions dist/assets/lib/daterangepicker/daterangepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -594,13 +594,13 @@
}

if (isLeft) {
var start = this.startDate;
var start = this.startDate.clone();
start.hour(hour);
start.minute(minute);
this.startDate = start;
this.leftCalendar.month.hour(hour).minute(minute);
} else {
var end = this.endDate;
var end = this.endDate.clone();
end.hour(hour);
end.minute(minute);
this.endDate = end;
Expand Down Expand Up @@ -663,13 +663,14 @@
if (dayOfWeek == this.locale.firstDay)
startDay = daysInLastMonth - 6;

var curDate = moment([lastYear, lastMonth, startDay, hour, minute]);
for (var i = 0, col = 0, row = 0; i < 42; i++, col++, curDate = moment(curDate).add('day', 1)) {
var curDate = moment([lastYear, lastMonth, startDay, 12, minute]);
for (var i = 0, col = 0, row = 0; i < 42; i++, col++, curDate = moment(curDate).add('hour', 24)) {
if (i > 0 && col % 7 == 0) {
col = 0;
row++;
}
calendar[row][col] = curDate;
calendar[row][col] = curDate.clone().hour(hour);
curDate.hour(12);
}

return calendar;
Expand All @@ -694,7 +695,7 @@
var currentYear = selected.year();
var maxYear = (maxDate && maxDate.year()) || (currentYear + 5);
var minYear = (minDate && minDate.year()) || (currentYear - 50);
var yearHtml = '<select class="yearselect">'
var yearHtml = '<select class="yearselect">';

for (var y = minYear; y <= maxYear; y++) {
yearHtml += '<option value="' + y + '"' +
Expand Down
2 changes: 1 addition & 1 deletion dist/assets/lib/daterangepicker/examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html dir="ltr" lang="en-US">
<head>
<meta charset="UTF-8" />
<title>A date range picker for Twitter Bootstrap</title>
<title>A date range picker for Bootstrap</title>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" media="all" href="daterangepicker-bs3.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
Expand Down
7 changes: 7 additions & 0 deletions dist/assets/lib/gmaps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ grunt
Changelog
---------

0.4.6
-----------------------
* Allow initialising GMaps without new
* Added styled map support for static maps
* Fixed name display for styled maps
* Allow no zoom for static map request

0.4.5
-----------------------
* Fix IE8 bug using array_map
Expand Down
2 changes: 1 addition & 1 deletion dist/assets/lib/gmaps/examples/static.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ <h1>GMaps.js &mdash; Static map</h1>
$('&lt;img/&gt;').attr('src', url)
.appendTo('#map');</pre>
<p>You must define a <strong>size</strong> and the <strong>latitude</strong> and <strong>longitude</strong> of the map's center.</p>
<p><span class="label notice">Note: </span> You also can define <strong>zoom</strong> (by default is 15).</p>
<p><span class="label notice">Note: </span> You also can define <strong>zoom</strong> (by default is 15, unless zoom is set to false, in which case Google will set zoom based on marker positions).</p>
</div>
</div>
</body>
Expand Down
73 changes: 73 additions & 0 deletions dist/assets/lib/gmaps/examples/static_styles.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>GMaps.js &mdash; Static map</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script src="../gmaps.js"></script>
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.3.0/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="examples.css" />
<script>
$(document).ready(function(){
var url = GMaps.staticMapURL({
size: [610, 350],
lat: -12.043333,
lng: -77.028333,
styles: [{
featureType: "all",
elementType: "all",
stylers: [
{ hue: '#FF0000' }
]
},
{
featureType: "landscape",
elementType: "all",
stylers: [
{ hue: '#0A2D3F'},
{ saturation: 50 },
{ lightness: -10 }
]
}]
});
$('<img/>').attr('src', url).appendTo('#map');
});
</script>
</head>
<body>
<h1>GMaps.js &mdash; Static map</h1>
<div class="row">
<div class="span11">
<div id="map"></div>
</div>
<div class="span6">
<p>You can use the same styles as for a normal styled map to make a static map using GMaps.js:</p>
<pre>url = GMaps.staticMapURL({
size: [610, 350],
lat: -12.043333,
lng: -77.028333
styles: [{
featureType: "all",
elementType: "all",
stylers: [
{ hue: '#FF0000' }
]
},
{
featureType: "landscape",
elementType: "all",
stylers: [
{ hue: '#0A2D3F'},
{ saturation: 50 },
{ lightness: -10 }
]
}]
});

$('&lt;img/&gt;').attr('src', url)
.appendTo('#map');</pre>
</div>
</div>
</body>
</html>
Loading

0 comments on commit 52be955

Please sign in to comment.