Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit 716a183

Browse files
committed
* Moved source files to src.
* Moved resources to res. * Added bower.json. * Added package.json. * Added gulpfile.js. * Renamed demo.html to index.html.
1 parent 47359f2 commit 716a183

12 files changed

+449
-593
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
bower_components/
2+
node_modules/

bower.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "jquery-cascading-dropdown",
3+
"version": "1.2.6",
4+
"homepage": "https://github.com/dnasir/jquery-cascading-dropdown",
5+
"authors": [
6+
"Dzulqarnain Nasir <[email protected]>"
7+
],
8+
"description": "A simple and lighweight jQuery plugin for creating cascading dropdowns.",
9+
"main": "dist/jquery.cascadingdropdown.js",
10+
"keywords": [
11+
"jquery",
12+
"cascading",
13+
"dropdown"
14+
],
15+
"license": "MIT",
16+
"private": true,
17+
"ignore": [
18+
"**/.*",
19+
"node_modules",
20+
"bower_components"
21+
],
22+
"dependencies": {
23+
"jquery": "~1.11.2"
24+
}
25+
}

jquery.cascadingdropdown.js renamed to dist/jquery.cascadingdropdown.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
/*
2-
* jQuery Cascading Dropdown Plugin 1.2.5
1+
/*!
2+
* jQuery Cascading Dropdown Plugin 1.2.6
33
* https://github.com/dnasir/jquery-cascading-dropdown
44
*
5-
* Copyright 2013, Dzulqarnain Nasir
5+
* Copyright 2015, Dzulqarnain Nasir
66
* http://dnasir.com
77
*
88
* Licensed under the MIT license:

dist/jquery.cascadingdropdown.min.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jquery.cascadingdropdown.min.js.map

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gulpfile.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
var gulp = require('gulp');
2+
var uglifyjs = require('gulp-uglifyjs');
3+
var header = require('gulp-header');
4+
var pkg = require('./package.json');
5+
6+
var banner = '/*! <%= pkg.name %> <%= pkg.version %> | (c) 2015 <%= pkg.author %> | <%= pkg.license %> */\n';
7+
8+
gulp.task('js', function() {
9+
gulp.src('src/jquery.cascadingdropdown.js')
10+
.pipe(gulp.dest('dist/'))
11+
.pipe(uglifyjs('jquery.cascadingdropdown.min.js', { outSourceMap: true }))
12+
.pipe(header(banner, { pkg: pkg }))
13+
.pipe(gulp.dest('dist/'));
14+
});
15+
16+
gulp.task('default', ['js']);

demo.html renamed to index.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
.cascading-dropdown-loading {
4141
cursor: wait;
42-
background: url('ajax-loader.gif') 85% center no-repeat transparent;
42+
background: url('res/ajax-loader.gif') 85% center no-repeat transparent;
4343
}
4444
</style>
4545
<link rel="stylesheet" type="text/css" href="http://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/styles/shCore.css">
@@ -80,7 +80,7 @@ <h4>Phone finder</h4>
8080
<option value="64">64 GB</option>
8181
</select>
8282

83-
<h4>Matches <img src="ajax-loader.gif" data-bind="visible: loading" /></h4>
83+
<h4>Matches <img src="res/ajax-loader.gif" data-bind="visible: loading" /></h4>
8484
<ul data-bind="foreach: phones, visible: phones().length > 0">
8585
<li>
8686
<span data-bind="text: maker"></span>
@@ -140,7 +140,7 @@ <h4>Phone finder</h4>
140140
<option value="">Storage size</option>
141141
</select>
142142

143-
<h4>Matches <img src="ajax-loader.gif" data-bind="visible: loading" /></h4>
143+
<h4>Matches <img src="res/ajax-loader.gif" data-bind="visible: loading" /></h4>
144144
<ul data-bind="foreach: phones, visible: phones().length > 0">
145145
<li>
146146
<span data-bind="text: maker"></span>
@@ -224,7 +224,7 @@ <h4>Phone finder</h4>
224224
<option value="">Storage size</option>
225225
</select>
226226

227-
<h4>Matches <img src="ajax-loader.gif" data-bind="visible: loading" /></h4>
227+
<h4>Matches <img src="res/ajax-loader.gif" data-bind="visible: loading" /></h4>
228228
<ul data-bind="foreach: phones, visible: phones().length > 0">
229229
<li>
230230
<span data-bind="text: maker"></span>
@@ -290,7 +290,7 @@ <h4>Phone finder</h4>
290290
<select class="step3" name="storage" multiple="multiple">
291291
</select>
292292

293-
<h4>Matches <img src="ajax-loader.gif" data-bind="visible: loading" /></h4>
293+
<h4>Matches <img src="res/ajax-loader.gif" data-bind="visible: loading" /></h4>
294294
<ul data-bind="foreach: phones, visible: phones().length > 0">
295295
<li>
296296
<span data-bind="text: maker"></span>
@@ -306,11 +306,11 @@ <h4>Matches <img src="ajax-loader.gif" data-bind="visible: loading" /></h4>
306306
</div>
307307

308308
<!-- Scripts here -->
309-
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
310-
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/knockout/2.3.0/knockout-min.js"></script>
311-
<script type="text/javascript" src="jquery.mockjax.js"></script>
312-
<script type="text/javascript" src="ajax-mocks.js"></script>
313-
<script type="text/javascript" src="jquery.cascadingdropdown.js"></script>
309+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.js"></script>
310+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/knockout/2.3.0/knockout-min.js"></script>
311+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-mockjax/1.6.1/jquery.mockjax.min.js"></script>
312+
<script type="text/javascript" src="res/ajax-mocks.js"></script>
313+
<script type="text/javascript" src="dist/jquery.cascadingdropdown.min.js"></script>
314314
<script type="text/javascript">
315315
function viewmodel() {
316316
this.phones = ko.observableArray([]);

0 commit comments

Comments
 (0)