meteor

How to use select2 with Meteor?

时光毁灭记忆、已成空白 提交于 2020-01-03 13:02:49
问题 can someone explain to me how select2 works with Meteor? I am using zimme:select2-boostrap3-css and I have no clue on how to use it. I checked both the original select2 github page and the one from the package. The first one explains how to use it without Meteor. Do I just add the jQuery code to one of my *.js-files in order to get it to work? In HTML: <select class="input" id="clientName" name="clientName"> {{#each getClients}} <option value="{{clientName}}" data-id={{_id}}>{{clientName}}<

How to use select2 with Meteor?

三世轮回 提交于 2020-01-03 13:01:00
问题 can someone explain to me how select2 works with Meteor? I am using zimme:select2-boostrap3-css and I have no clue on how to use it. I checked both the original select2 github page and the one from the package. The first one explains how to use it without Meteor. Do I just add the jQuery code to one of my *.js-files in order to get it to work? In HTML: <select class="input" id="clientName" name="clientName"> {{#each getClients}} <option value="{{clientName}}" data-id={{_id}}>{{clientName}}<

Meteor 0.9.x Update

纵饮孤独 提交于 2020-01-03 11:28:52
问题 How do I find out what is holding my app up from updating? I keep getting the 'This project is at the latest release which is compatible with your current package constraints.' message. Here is the output from the update command: Refreshing package metadata. This may take a moment. Figuring out the best package versions to use. This may take a moment. Figuring out the best package versions to use. This may take a moment. Figuring out the best package versions to use. This may take a moment.

Can I override/extend Meteor methods?

一曲冷凌霜 提交于 2020-01-03 11:28:35
问题 Is it possible to somehow override a method in Meteor? Or define another function such that both will get called? In my regular code: Meteor.methods( foo: (parameters) -> bar(parameters) ) Somewhere else that gets loaded later (e.g. in tests ): Meteor.methods( # override foo: (parameters) -> differentBehavior(parameters) # I could call some super() here ) So I would expect to either have both bar and differentBehavior executed or only differentBehavior and some possibility to call super() .

Meteor reset on Heroku

六月ゝ 毕业季﹏ 提交于 2020-01-03 10:42:12
问题 What is the best way to redeploy an alpha version on Heroku, and perform a meteor reset for the server mongo fixtures to be re-executed on the server? 回答1: Couldn't find a good solution. So I need to go in my heroku mongohq interface, and manually remove all collections, then restart heroku. 回答2: I resolved this with a custom method for any hosting(only debug, not in Production): in /server/reset.js Meteor.methods({ resetear: function() { Collection1.remove({}); Collection2.remove({}); //And

Meteor reset on Heroku

断了今生、忘了曾经 提交于 2020-01-03 10:41:33
问题 What is the best way to redeploy an alpha version on Heroku, and perform a meteor reset for the server mongo fixtures to be re-executed on the server? 回答1: Couldn't find a good solution. So I need to go in my heroku mongohq interface, and manually remove all collections, then restart heroku. 回答2: I resolved this with a custom method for any hosting(only debug, not in Production): in /server/reset.js Meteor.methods({ resetear: function() { Collection1.remove({}); Collection2.remove({}); //And

In meteor 0.6.4.1/coffeescript, how does variable visibility work?

牧云@^-^@ 提交于 2020-01-03 08:22:18
问题 I'm new to meteor and coffeescript. I'm using the file layout suggested in the Unofficial Meteor FAQ. In file collections/C.coffee, I have C = new Meteor.Collection 'C' console.log "C: #{C}" In file server/main.coffee, I have C.insert {test: 'test'} When I start meteor, I see on the console: C: [object Object] ReferenceError: C is not defined at app/server/main.coffee.js:5:1 at /home/xxx/yyy/.meteor/local/build/server/server.js:298:12 How do I make C available in files outside of collections

Integrating d3 with meteor? Trying to draw pie charts

╄→гoц情女王★ 提交于 2020-01-03 06:10:30
问题 I'm trying to draw pie charts in Meteor, but I'm very new to both d3 and Meteor and am not really understanding what is going on. The following d3 code to draw pie charts from a csv file works for me outside of Meteor: <!DOCTYPE html> <meta charset="utf-8"> <link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'> <style> body { font: 30px "Montserrat"; text-transform:uppercase; } svg { padding: 10px 0 0 10px; } .arc { stroke: #fff; } </style>

How to prevent local Flow-Router action function overwriting group defined element

有些话、适合烂在心里 提交于 2020-01-03 05:52:13
问题 I have a Flow-Router group definitions similar to: var myRouteGroup = FlowRouter.group({ name: "myGroupName", prefix: "/myPrefix", // Using arbitrary element to pass group wide defaults defaultGroupSettings: {item1: "value1", item2: "value2"}; }); I than define a route in that group: myRouteGroup.route("/home",{ name: "myRoute", triggersEnter: [ /*...*/ ], action: function () { // Get the arbitrary settings object from group definition var settings = this.group.options.defaultGroupSettings; /

Attaching jQuery plugins to Meteor template-generated DOM elements

≯℡__Kan透↙ 提交于 2020-01-03 05:26:07
问题 According to the Meteor documentation, a callback assigned to Template.template_name.rendered will execute after each instance of template_name has finished rendering. I have been trying to use this feature to attach jQuery plugins (such as TagsManager or DotDotDot) to DOM elements generated by the templates. The "natural" way to do this would be something like: Template.template_name.rendered = function () { var template = this; var elem = $('input#tags'+template.data._id); elem.tagsManager(