Skip to content

Commit 770e1bc

Browse files
committedJun 22, 2015
Add define plugin.
1 parent 739afc6 commit 770e1bc

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed
 

‎.meteor/packages

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ autopublish
99
insecure
1010
iron:router
1111
classcraft:stylus-autoprefixer
12+
mrt:define

‎.meteor/versions

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
amd:manager@0.1.1
12
autopublish@1.0.3
23
autoupdate@1.2.1
34
base64@1.0.3
@@ -37,6 +38,7 @@ minifiers@1.1.5
3738
minimongo@1.0.8
3839
mobile-status-bar@1.0.3
3940
mongo@1.1.0
41+
mrt:define@0.11.0
4042
observe-sequence@1.0.6
4143
ordered-dict@1.0.3
4244
random@1.0.3

‎client/js/audio.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
define('audio', [], function() {
2+
var audio = document.createElement('audio');
3+
audio.id = 'player';
4+
5+
return audio;
6+
});

‎client/views/palbum.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
define('palbum', ['audio'], function(audio) {
2+
Template.PalbumContent.onRendered(function() {
3+
// 添加 audio 對象到 DOM 結構中
4+
$('body audio.main').remove();
5+
$('body').append(audio);
6+
7+
8+
});
9+
});

0 commit comments

Comments
 (0)
Please sign in to comment.