meteor

Meteor update a Collection object

ぐ巨炮叔叔 提交于 2019-12-25 03:44:15
问题 in Meteor, I'm having a collection with a Schema, and a number of items are added dynamically. In this case, I'm dealing with milestones object , and once the user check one off I want to update complete in this Collections item to true (default is false) Here is my schema milestones: { type: Array, optional: true }, 'milestones.$': { type: Object }, 'milestones.$.name': { type: String }, 'milestones.$.hours': { type: Number }, 'milestones.$.complete': { type: Boolean } How do I write a $set

Meteor update a Collection object

此生再无相见时 提交于 2019-12-25 03:44:03
问题 in Meteor, I'm having a collection with a Schema, and a number of items are added dynamically. In this case, I'm dealing with milestones object , and once the user check one off I want to update complete in this Collections item to true (default is false) Here is my schema milestones: { type: Array, optional: true }, 'milestones.$': { type: Object }, 'milestones.$.name': { type: String }, 'milestones.$.hours': { type: Number }, 'milestones.$.complete': { type: Boolean } How do I write a $set

Table row disappears when the edit button is clicked

倾然丶 夕夏残阳落幕 提交于 2019-12-25 03:34:53
问题 When I click the edit button, the whole row disappears, as if it was deleted, and does not go into the editMode of the template. The row comes back if you refresh the page. I have tried commenting out code to find an issue there, but that comes back clean. I have referenced other code that does work in editMode, and there is no difference. And I have tried googling. How can I change/add to the code to get it to engage editMode? Created using Meteor platform. html: <template name=

meteorjs 0.9.4 Could not resolve the specified constraints for this project: Error: tunneling socket could not be established

北城余情 提交于 2019-12-25 03:34:24
问题 I was trying to run a friend's project (he did it in a mac) on my ubuntu 14.04 and I got the error specified in the title. More detailed error: Could not resolve the specified constraints for this project: Error: tunneling socket could not be established, cause=140487912306560:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:787: JIC I have a proxy system set in my machine. 回答1: It was a proxy configuration, it seems that with a low

Recompile after imported file changed in meteor app

给你一囗甜甜゛ 提交于 2019-12-25 03:14:23
问题 I'm creating babel plugin to manage import paths according to some conditions based on file existence. On initial build everything works fine, but when I add or remove file that would impact result of the conditions, compiler doesn't recompile file that is importing changed file, therefore conditions are still resolved as if referenced file existed, but compiler is not able to find it. I believe this is due to cache. So how can I manage/clear cache? Of course I would like to keep as much

Detect which template includes the current one in Meteor

柔情痞子 提交于 2019-12-25 03:13:06
问题 I want to detect which template includes another, because I want to have a css class only for one specific template. Here is how it should work: <template name="includedTempl"> <div class="panel panel-default {{#if templateX}}specialCSS{{/if}}" id="{{_id}}"> </template> Template.includedTempl.helpers({ templateX: function() { if (this.includedBy('templX.html')) { return true; } return false; } }); How can I do this? Any help would be greatly appreciated. 回答1: In general it can be challenging

cost of observing large collection with oplog tailing

烂漫一生 提交于 2019-12-25 03:12:27
问题 I have some large collections which need to be observed for changes. In the old days of polling the whole collection would be compared to the in-memory version every 10 seconds in order to determine if something has changed. With oplog tailing, this is not necessary anymore. Is it still expensive to have an observe without any parameters or is this a good way to create a trigger on a collection? 回答1: The current implementation of Oplog Observe Driver (as of Meteor 0.8.1) would require all

How to Search and output from Meteor Collection

安稳与你 提交于 2019-12-25 03:12:23
问题 The JS Colors = new Meteor.Collection("colors"); Template.col_list.cols = function () { return Colors.find(); }; So this code will output everything from Col.find into the handlebar cols in the html The HTML {{#each cols}} {{name}}, {{RGB}}, {{HEX}} {{/each}} But say I want to have a input box so I can search for a name of the color, so it only shows the information for that color or any color that starts with whatever I type into the input box. example: Input = "bl" output should be black,

Why is Meteor.call() not recognized?

时间秒杀一切 提交于 2019-12-25 03:00:34
问题 This question has morphed enough from its ancestor that it was suggested I post a new question. When I call my " insertPerson " method, which then calls my " getTextAddrAsEmailAddr " method, I see, in the console, my two debug console.log msgs: I20151022-07:59:07.240(-7)? insertPerson reached I20151022-07:59:07.365(-7)? phone is 0871632810 ...followed by this exception: I20151022-07:59:07.365(-7)? Exception while invoking method 'insertPerson' TypeE rror: Cannot call method 'call' of

Initialize multiple instances of No UI Slider in meteor

折月煮酒 提交于 2019-12-25 02:58:19
问题 How do I initialize mutliple instances of the No UI Slider in Meteor? I'd like to have multiple sliders on a page. I've been trying with... Template: <input type="checkbox" checked="{{checked}}" class="toggle-checked" /> <span class="example-val" name="body" id="range{{this._id}}"></span> JS: Template.task.rendered = function() { $('#slider'+this._id).noUiSlider({ start: 5, connect: "lower", step: 0, format: wNumb({ decimals: 0, }), range: { 'min': 0, 'max': 10 } }); $('#slider'+this._id)