Skip to content

Commit 9a9017f

Browse files
committed
Add automatic $.material.init() + example
1 parent 8b21b98 commit 9a9017f

14 files changed

Lines changed: 73 additions & 4 deletions

File tree

meteor/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@ If you encounter an issue while using this package, please CC @dandv when you fi
4747

4848
# DONE
4949

50+
* Automatically initialize the JS on client startup: `$.material.init()`
5051
* Material Design Icons font loading test: EOT, SVG, TTF, WOFF
5152
* Bootstrap plugin loading tests
52-
* Visual check , inclding for the ripple effect
53+
* Visual check, including for the ripple effect
5354

5455

5556
# TODO

meteor/example/.meteor/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
local

meteor/example/.meteor/packages

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Meteor packages used by this project, one per line.
2+
#
3+
# 'meteor add' and 'meteor remove' will edit this file for you,
4+
# but you can also edit it by hand.
5+
6+
meteor-platform
7+
fezvrasta:bootstrap-material-design-noglyph

meteor/example/.meteor/release

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
METEOR@1.0.1

meteor/example/client/bmd.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
body {
2+
background: #8BC34A;
3+
}

meteor/example/client/bmd.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<body>
2+
<h1>Watch the ripple effect on newly created buttons!</h1>
3+
4+
{{> hello}}
5+
</body>
6+
7+
<template name="hello">
8+
<button type="button" class="btn btn-info">Click Me</button>
9+
<hr/>
10+
{{#each buttons}}
11+
<button type="button" class="btn btn-primary">{{name}}</button>
12+
<br/>
13+
{{/each}}
14+
</template>

meteor/example/client/bmd.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
'use strict';
2+
3+
var Buttons = new Mongo.Collection(null);
4+
5+
Template.hello.helpers({
6+
buttons: function () {
7+
return Buttons.find();
8+
}
9+
});
10+
11+
Template.hello.events({
12+
'click button': function (event, template) {
13+
Buttons.insert({name: _.sample(['No, click ME!', 'Click me too!', 'Click here!', 'Hey!', 'Psst!'])});
14+
}
15+
});
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../

meteor/example/run.bat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
mklink ..\..\package.js "meteor/package-noglyph.js"
2+
mklink package.json "../../package.json"
3+
set MONGO_URL=mongodb://
4+
meteor run
5+
del ..\..\package.js package.json

meteor/example/run.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# sanity check: make sure we're in the root directory of the example
2+
cd "$( dirname "$0" )"
3+
4+
# delete temp files even if Ctrl+C is pressed
5+
int_trap() {
6+
echo "Cleaning up..."
7+
}
8+
trap int_trap INT
9+
10+
ln -s "meteor/package-noglyph.js" ../../package.js
11+
ln -s "../../package.json" package.json
12+
13+
MONGO_URL=mongodb:// meteor run
14+
15+
rm ../../package.js package.json

0 commit comments

Comments
 (0)